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

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


    @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);
        }
View Full Code Here


        cal.add(Calendar.DATE, -cal.get(Calendar.DAY_OF_WEEK) + 1);
        for (int week = 0; week < COLUMNS; week++) {
            y = week * 21 + 60;
            for (int d = 0; d < ROWS; d++) {
                x = new Float(d * 22.5).intValue() + 40;
                Image img = day_img;
                if (cal.get(Calendar.MONTH) == today.get(Calendar.MONTH)) {
                    if (mouseOver(x, y)) {
                        img = highlight;
                    }
                    canvas.drawImage(img, x, y);
View Full Code Here

        final Size s = getSize();

        if (getContent().isPersistable() && getContent().isTransient()) {
            final int x = s.getWidth() - 13;
            final int y = 0;
            final Image icon = ImageFactory.getInstance().loadIcon("transient", 8, null);
            if (icon == null) {
                canvas.drawText("*", x, y + Toolkit.getText(ColorsAndFonts.TEXT_NORMAL).getAscent(), Toolkit.getColor(ColorsAndFonts.COLOR_BLACK), Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
            } else {
                canvas.drawImage(icon, x, y, 12, 12);
            }
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,
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

        for (int i = 2; i < left; i++) {
            canvas.drawRectangle(i, i, width - 2 * i, height - 2 * i, borderColor);
        }

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

        // title bar
        canvas.drawSolidRectangle(left, LINE_THICKNESS, width - left - right, titlebarHeight, titleBarBackgroundColor);
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);
        }
View Full Code Here

        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,
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.