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

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


            debug.append("\n----------------\n");
        }
    }

    public void draw(final Canvas canvas) {
        Bounds bounds = getBounds();
        canvas.drawRectangle(0, 0, bounds.getWidth(), bounds.getHeight(), Toolkit.getColor(0x0000ff));
        canvas.drawText("Test Workspace", 10, 20, Toolkit.getColor(0x0000ff), Toolkit.getText(ColorsAndFonts.TEXT_TITLE));

        for (int i = 0; i < views.size(); i++) {
            View view = (View) views.elementAt(i);
View Full Code Here


        defaultWindowSize.limitWidth(800);
        defaultWindowSize.limitHeight(600);

        final Size size = Properties.getSize(Properties.PROPERTY_BASE + "initial.size", defaultWindowSize);
        final Location location = Properties.getLocation(Properties.PROPERTY_BASE + "initial.location", new Location(x, y));
        return new Bounds(location, size);
    }
View Full Code Here

    @Override
    public DragEvent dragStart(final DragStart drag) {
        if (isOverColumnBorder(drag.getLocation())) {
            resizeColumn = axis.getColumnBorderAt(drag.getLocation().getX());
            final Bounds resizeArea = new Bounds(getView().getAbsoluteLocation(), getSize());
            resizeArea.translate(getView().getPadding().getLeft(), getView().getPadding().getTop());
            if (resizeColumn == 0) {
                resizeArea.setWidth(axis.getHeaderOffset());
            } else {
                resizeArea.translate(axis.getLeftEdge(resizeColumn - 1), 0);
                resizeArea.setWidth(axis.getColumnWidth(resizeColumn - 1));
            }

            final Size minimumSize = new Size(70, 0);
            return new ResizeDrag(this, resizeArea, ResizeDrag.RIGHT, minimumSize, null);
        } else if (drag.getLocation().getY() <= height) {
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

        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

        LOG.debug("doLayout() " + maximumSize + "  " + getSize());
        final View toolbar = getSubviews()[0];
        maximumSize.contract(getPadding());
        final Size toolbarSize = toolbar.getRequiredSize(maximumSize);
        LOG.debug("   toolbar " + toolbarSize);
        Bounds bounds = new Bounds(toolbarSize);
        toolbar.setBounds(bounds);

        final View grid = getSubviews()[1];
        final Size gridSize = getRequiredSize(Size.createMax());
        gridSize.contract(getPadding());
        gridSize.contractHeight(toolbarSize.getHeight());
        bounds = new Bounds(new Location(0, toolbarSize.getHeight()), gridSize);
        grid.setBounds(bounds);
        LOG.debug("   grid " + toolbarSize);

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