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

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


    @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(ViewConstants.HPADDING, 0);
        super.draw(canvas);
    }
View Full Code Here


    }

    @Override
    public void draw(final Canvas canvas) {
        // blank background
        final Bounds bounds = getBounds();
        final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_WINDOW + "." + getSpecification().getName());
        canvas.drawSolidRectangle(1, 1, bounds.getWidth() - 2, bounds.getHeight() - 2, color);

        final boolean hasFocus = containsFocus();
        final ViewState state = getState();
        borderRender.draw(canvas, getSize(), hasFocus, state, controls, title() + " (" + getSpecification().getName() + ")");
        // canvas.drawRectangle(0, 0, getSize().getWidth(),
View Full Code Here

    }

    @Override
    public boolean overlaps(final Bounds bounds) {
        final Rectangle clip = graphics.getClipBounds();
        final Bounds activeArea = new Bounds(clip.x, clip.y, clip.width, clip.height);
        return bounds.intersects(activeArea);
    }
View Full Code Here

    /**
     * Clears the background of this view to the given color (call from the
     * {@link #draw(Canvas)} method.
     */
    protected void clearBackground(final Canvas canvas, final Color color) {
        final Bounds bounds = getBounds();
        canvas.drawSolidRectangle(0, 0, bounds.getWidth(), bounds.getHeight(), color);
    }
View Full Code Here

    }

    @Override
    public void draw(final Canvas canvas) {
        if (Toolkit.debug) {
            canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
        }
    }
View Full Code Here

        return 0;
    }

    @Override
    public Bounds getBounds() {
        return new Bounds(x, y, width, height);
    }
View Full Code Here

    /**
     * Limits the bounds of the this view (when being moved or dropped) so it
     * never extends outside the specified bounds e.g. outside of a parent view
     */
    public void limitBoundsWithin(final Bounds containerBounds) {
        final Bounds contentBounds = getView().getBounds();
        if (containerBounds.limitBounds(contentBounds)) {
            getView().setBounds(contentBounds);
        }
    }
View Full Code Here

            dumpGraph(collection, debug);
        }

        debug.append("\n\nDRAWING\n");
        debug.append("------\n");
        view.draw(new DebugCanvas(debug, new Bounds(view.getBounds())));
    }
View Full Code Here

    public XViewer() {
        doubleBuffering = IsisContext.getConfiguration().getBoolean(Properties.PROPERTY_BASE + "double-buffer", true);
        showExplorationMenuByDefault = IsisContext.getConfiguration().getBoolean(Properties.PROPERTY_BASE + "exploration.show", true);
        overlayView = CLEAR_OVERLAY;
        redrawArea = new Bounds();
    }
View Full Code Here

    private FocusManager getFocusManager() {
        return overlayView == CLEAR_OVERLAY ? keyboardManager.getFocusManager() : overlayView.getFocusManager();
    }

    public Bounds getOverlayBounds() {
        final Bounds bounds = new Bounds(createSize(renderingArea.getSize()));
        final Insets in = renderingArea.getInsets();
        bounds.contract(in.left + in.right, in.top + in.bottom);
        bounds.contract(0, statusBarHeight);
        return bounds;
    }
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.