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

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


        if (rootView != null) {
            rootView.draw(c.createSubcanvas());
        }
        // paint overlay

        final Bounds bounds = overlayView.getBounds();
        if (paintArea.intersects(new Rectangle(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()))) {
            overlayView.draw(c.createSubcanvas(bounds));
        }

        /*
         * for (int i = 0; i < panes.length; i++) {
View Full Code Here


    public void scheduleRepaint() {
        updateNotifier.invalidateViewsForChangedObjects();
        synchronized (redrawArea) {
            if (!redrawArea.equals(NO_REDRAW) || refreshStatus) {
                UI_LOG.debug("repaint viewer " + redrawArea);
                final Bounds area = new Bounds(redrawArea);
                area.translate(insets.left, insets.top);
                renderingArea.repaint(area.getX(), area.getY(), area.getWidth(), area.getHeight());
                redrawArea.setBounds(NO_REDRAW);
            }
        }
    }
View Full Code Here

        final View subviews[] = rootView.getSubviews();
        for (final View subview : subviews) {
            subview.invalidateLayout();
        }

        final Bounds bounds = new Bounds(internalDisplaySize);
        markDamaged(bounds);
        scheduleRepaint();

        Properties.saveSizeOption(Properties.PROPERTY_BASE + "initial.size", bounds.getSize());
    }
View Full Code Here

        final Size rootViewSize = new Size(internalDisplaySize);
        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_STATUS);
        statusBarHeight = text.getLineHeight() + text.getDescent();
        rootViewSize.contractHeight(statusBarHeight);
        statusBarArea = new Bounds(insets.left, insets.top + rootViewSize.getHeight(), rootViewSize.getWidth(), statusBarHeight);
        rootView.setSize(rootViewSize);
    }
View Full Code Here

    @Override
    public void draw(final Canvas canvas) {
        if (getState().isViewIdentified()) {
            final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3);
            final Bounds bounds = getBounds();
            canvas.drawSolidRectangle(0, 0, bounds.getWidth(), bounds.getHeight(), color);
        }
        canvas.offset(HPADDING, 0);
        super.draw(canvas);
    }
View Full Code Here

        final int height = overlay.getSize().getHeight();
        final int width = anchor.getX() - location.getX();
        overlay.setSize(new Size(width, height));
        final int x = anchor.getX() - width;
        final int y = anchor.getY();
        overlay.setBounds(new Bounds(x, y, width, height));
        overlay.markDamaged();
    }
View Full Code Here

        final int height = anchor.getY() - location.getY();
        final int width = overlay.getSize().getWidth();
        overlay.setSize(new Size(width, height));
        final int x = anchor.getX();
        final int y = anchor.getY() - height;
        overlay.setBounds(new Bounds(x, y, width, height));
        overlay.markDamaged();
    }
View Full Code Here

        final int xt = x;
        final int yt = baseline;

        if (Toolkit.debug) {
            final int x2 = style.stringWidth(text);
            canvas.drawDebugOutline(new Bounds(xt, yt - style.getAscent(), x2, style.getTextHeight()), baseline, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
        }
        canvas.drawText(text, xt, yt, color, style);
    }
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 {
View Full Code Here

    public DragEvent dragStart(final DragStart drag) {
        final Location location = drag.getLocation();
        if (overBorder(location)) {
            requiredDirection = onBorder(location);
            if (requiredDirection > 0) {
                return new ResizeDrag(this, new Bounds(getAbsoluteLocation(), getView().getSize()), requiredDirection);
            }
            return null;
        } else {
            return super.dragStart(drag);
        }
View Full Code Here

TOP

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

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.