Examples of canSet()


Examples of org.apache.isis.applib.services.memento.MementoService.canSet()

                // otherwise, include
                final ObjectAdapter propertyValueAdapter = property.get(adapterManager.adapterFor(viewModelPojo));
                if(propertyValueAdapter != null) {
                    final Object propertyValue = propertyValueAdapter.getObject();
                    if(mementoService.canSet(propertyValue)) {
                        memento.set(property.getId(), propertyValue);
                    } else {
                        final Bookmark propertyValueBookmark = bookmarkService.bookmarkFor(propertyValue);
                        memento.set(property.getId() + ".bookmark", propertyValueBookmark);
                    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ObjectContent.canSet()

        return size;
    }

    private Consent canDrop(final ObjectAdapter dragSource) {
        final ObjectContent content = (ObjectContent) getContent();
        return content.canSet(dragSource);
    }

    @Override
    public void dragIn(final ContentDrag drag) {
        final Content sourceContent = drag.getSourceContent();
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ObjectContent.canSet()

    protected Consent canDrop(final Content dropContent) {
        if (dropContent instanceof ObjectContent) {
            final ObjectAdapter source = ((ObjectContent) dropContent).getObject();
            final ObjectContent content = (ObjectContent) getContent();
            return content.canSet(source);
        } else {
            return Veto.DEFAULT;
        }
    }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ObjectContent.canSet()

        return size;
    }

    private Consent canDrop(final ObjectAdapter dragSource) {
        final ObjectContent content = (ObjectContent) getContent();
        return content.canSet(dragSource);
    }

    @Override
    public void dragIn(final ContentDrag drag) {
        final Content sourceContent = drag.getSourceContent();
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ObjectContent.canSet()

        return size;
    }

    private Consent canDrop(final ObjectAdapter dragSource) {
        final ObjectContent content = (ObjectContent) getContent();
        return content.canSet(dragSource);
    }

    @Override
    public void dragIn(final ContentDrag drag) {
        final Content sourceContent = drag.getSourceContent();
View Full Code Here

Examples of org.apache.isis.viewer.dnd.view.ObjectContent.canSet()

    protected Consent canDrop(final Content dropContent) {
        if (dropContent instanceof ObjectContent) {
            final ObjectAdapter source = ((ObjectContent) dropContent).getObject();
            final ObjectContent content = (ObjectContent) getContent();
            return content.canSet(source);
        } else {
            return Veto.DEFAULT;
        }
    }
View Full Code Here

Examples of org.spout.vanilla.inventory.entity.ArmorInventory.canSet()

      // Check if this item is equipable armor and has more protection than the currently equipped item
      boolean equip = false;
      if (item.getItemStack().getMaterial() instanceof Armor) {
        Armor armor = (Armor) item.getItemStack().getMaterial();
        for (int i = 0; i < armorInv.size(); i++) {
          if (armorInv.canSet(i, item.getItemStack())) {
            ItemStack slot = armorInv.get(i);
            if (slot == null || (slot.getMaterial() instanceof Armor && ((Armor) slot.getMaterial()).getBaseProtection() < armor.getBaseProtection())) {
              getOwner().getNetwork().callProtocolEvent(new EntityCollectItemEvent(getOwner(), entity));
              if (slot != null) {
                Item.drop(getOwner().getPhysics().getPosition(), slot, Vector3f.ZERO);
View Full Code Here

Examples of prefuse.data.column.Column.canSet()

     * method.
     * @see #set(int, String, Object)
     */
    public boolean canSet(String field, Class type) {
        Column c = getColumn(field);
        return ( c==null ? false : c.canSet(type) );
    }
   
    /**
     * Get the data value at the given row and field as an Object.
     * @param row the table row to get
View Full Code Here

Examples of prefuse.data.column.Column.canSet()

       
        for ( int i=0; i < names.length; ++i ) {
            t.addColumn(names[i], types[i]);
            Column col = t.getColumn(names[i]);
            assertTrue(col.getRowCount() >= t.getRowCount());
            assertTrue(col.canSet(types[i]));
            assertFalse(col.canSet(Math.class));
           
            assertEquals(NCOLS+i+1, t.getColumnCount());
            assertEquals(types[i], t.getColumnType(names[i]));
        }
View Full Code Here

Examples of prefuse.data.column.Column.canSet()

        for ( int i=0; i < names.length; ++i ) {
            t.addColumn(names[i], types[i]);
            Column col = t.getColumn(names[i]);
            assertTrue(col.getRowCount() >= t.getRowCount());
            assertTrue(col.canSet(types[i]));
            assertFalse(col.canSet(Math.class));
           
            assertEquals(NCOLS+i+1, t.getColumnCount());
            assertEquals(types[i], t.getColumnType(names[i]));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.