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

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


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


        }
        final java.awt.Image iconImage = template.getIcon(height);
        if (tint != null) {
            Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(iconImage.getSource(), new Filter()));
        }
        final Image icon = new AwtImage(iconImage);
        return icon;
    }
View Full Code Here

        }

        color = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
        canvas.drawRectangle(left, top, size, size, color);
        if (isSet()) {
            final Image image = ImageFactory.getInstance().loadImage("check-mark");
            canvas.drawImage(image, 3, 3, size, size);
        }
    }
View Full Code Here

            final ObjectAdapter adapter = this.adapter;
            if (adapter == null) {
                return ImageFactory.getInstance().loadIcon("empty-field", 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;
        } else {
View Full Code Here

    public void draw(final Canvas canvas, final int x, final int baseline) {
        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

        }
        final int maxWidth = getSize().getWidth() - x;
        title.draw(canvas, x, y, maxWidth);

        if (getState().isActive()) {
            final Image busyImage = ImageFactory.getInstance().loadIcon("busy", 16, null);
            canvas.drawImage(busyImage, icon.getSize().getWidth() - 16 - 4, 4);
        }

    }
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

    @Override
    public void drawTransientMarker(final Canvas canvas, final Size size) {
        final int height = top - LINE_THICKNESS - 2;
        final int x = size.getWidth() - 50;
        final Image icon = ImageFactory.getInstance().loadIcon("transient", height, null);
        if (icon == null) {
            canvas.drawText("*", x, baseline, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK), Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
        } else {
            canvas.drawImage(icon, x, LINE_THICKNESS + 1, height, height);
            // canvas.drawRectangle(x, LINE_THICKNESS + 1, height, height,
View Full Code Here

        if (state.isActive()) {
            // final int i = left;
            // canvas.drawRectangle(i, top, width - 2 * i, height - 2 * i - top,
            // Toolkit.getColor(ColorsAndFonts.COLOR_ACTIVE));

            final Image busyImage = ImageFactory.getInstance().loadIcon("busy", 16, null);
            canvas.drawImage(busyImage, width - right - 16 - 4, top + 4);
        }

        // vertical lines within border
        canvas.drawLine(2, 15, 2, height - 15, insetColorDark);
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.