Package org.apache.isis.viewer.dnd.drawing

Examples of org.apache.isis.viewer.dnd.drawing.Image


        final ObjectAdapter adapter = getObject();
        if (adapter == null) {
            return ImageFactory.getInstance().loadIcon("empty-field", iconHeight, null);
        }
        final ObjectSpecification specification = adapter.getSpecification();
        final Image icon = ImageFactory.getInstance().loadIcon(specification, iconHeight, null);
        return icon;
    }
View Full Code Here


        if (getState().isOutOfSynch()) {
            clearBackground(canvas, Toolkit.getColor(ColorsAndFonts.COLOR_OUT_OF_SYNC));
        }

        if (getState().isInvalid()) {
            final Image image = ImageFactory.getInstance().loadIcon("invalid-entry", 12, null);
            if (image != null) {
                canvas.drawImage(image, getSize().getWidth() - 16, 2);
            }

            // canvas.clearBackground(this, Toolkit.getColor(ColorsAndFonts.COLOR_INVALID));
View Full Code Here

        final int y = baseline - this.baseline + 1;
        if (Toolkit.debug) {
            canvas.drawDebugOutline(new Bounds(new Location(x, y), getSize()), getBaseline(),
                Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
        }
        final Image icon = icon();
        if (icon == null) {
            canvas.drawSolidOval(x + 1, y, iconHeight, iconHeight, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3));
        } else {
            canvas.drawImage(icon, x + 1, y);
        }
View Full Code Here

    public int getBaseline() {
        return baseline;
    }

    public Size getSize() {
        final Image icon = icon();
        final int iconWidth = icon == null ? iconHeight : icon.getWidth();
        return new Size(iconWidth + 2, iconHeight + 2);
    }
View Full Code Here

    }

    @Override
    public Image getIconPicture(final int iconHeight) {
        final ObjectSpecification specification = getOneToManyAssociation().getSpecification();
        Image icon = ImageFactory.getInstance().loadIcon(specification, iconHeight, null);
        if (icon == null) {
            icon = ImageFactory.getInstance().loadDefaultIcon(iconHeight, null);
        }
        return icon;
    }
View Full Code Here

        final ObjectAdapter adapter = getCollection();
        if (adapter == null) {
            return ImageFactory.getInstance().loadIcon("emptyField", iconHeight, null);
        }
        final ObjectSpecification specification = adapter.getSpecification();
        Image icon = ImageFactory.getInstance().loadIcon(specification, iconHeight, null);
        if (icon == null) {
            icon = ImageFactory.getInstance().loadDefaultIcon(iconHeight, null);
        }
        return icon;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.drawing.Image

Copyright © 2018 www.massapicom. 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.