Package diva.canvas

Examples of diva.canvas.Figure


    public Figure createFigure() {
        CompositeFigure figure = (CompositeFigure) super.createFigure();
        Iterator<?> subfigures = figure.figures();
        while (subfigures.hasNext()) {
            Figure subfigure = (Figure) subfigures.next();
            if (subfigure instanceof LabelFigure) {
                ((LabelFigure) subfigure).setFillPaint(Color.RED);
            }
        }
        return figure;
View Full Code Here


    public Icon createIcon() {
        if (_iconCache != null) {
            return _iconCache;
        }

        Figure figure = new RoundedRectangle(0, 0, 20, 10, Color.LIGHT_GRAY,
                2.0f, 5.0, 5.0);
        _iconCache = new FigureIcon(figure, 20, 15);
        return _iconCache;
    }
View Full Code Here

        return _iconCache;
    }

    public Figure createBackgroundFigure() {
        _spacingValue = 0.0;
        Figure figure = super.createBackgroundFigure();
        if (figure instanceof RoundedRectangle) {
            ((RoundedRectangle) figure).setFillPaint(Color.LIGHT_GRAY);
        } else if (figure instanceof BasicRectangle) {
            ((BasicRectangle) figure).setFillPaint(Color.LIGHT_GRAY);
        }
View Full Code Here

                    // only the shape of the composite, which results in the
                    // wrong selection region being highlighted.
                    figure = new CompositeFigure();
                }

                Figure subFigure = subIcon.createBackgroundFigure();

                // Translate the figure to the location of the subfigure,
                // if there is a location. Also, center it if necessary.
                try {
                    // NOTE: This is inelegant, but only the subclasses
View Full Code Here

     *  not been properly initialized.
     *  @return A new CompositeFigure consisting of the background figure
     *   and a label.
     */
    public Figure createFigure() {
        Figure background = createBackgroundFigure();
        Rectangle2D backBounds = background.getBounds();
        CompositeFigure figure = new CompositeFigure(background);

        NamedObj container = (NamedObj) getContainerOrContainerToBe();

        // Create the label, unless this is a visible attribute,
View Full Code Here

        if (_iconCache != null) {
            return _iconCache;
        }

        // No cached object, so rerender the icon.
        Figure figure = createBackgroundFigure();
        _iconCache = new FigureIcon(figure, 20, 15);
        return _iconCache;
    }
View Full Code Here

            } catch (IOException ex) {
                // Ignore, we can't find the icon.
            }
        }

        Figure newFigure = new ImageFigure(_scaledImage);
        _addLiveFigure(newFigure);

        return newFigure;
    }
View Full Code Here

    protected class MatchResultActorController extends ActorController {

        protected Figure _renderNode(Object node) {
            if ((node != null) && !_hide(node)) {
                Figure nf = super._renderNode(node);
                GraphModel model = getController().getGraphModel();
                Object object = model.getSemanticObject(node);
                CompositeFigure cf = _getCompositeFigure(nf);

                if (object instanceof NamedObj && cf != null && !_transformed
View Full Code Here

         @param point The point in the graph pane.
         *  @return The object under the specified point, or null if there
         *   is none or it is not a NamedObj.
         */
        private NamedObj _getObjectUnder(Point2D point) {
            Figure figureUnderMouse = _getFigureUnder(point);

            if (figureUnderMouse == null) {
                return null;
            }

View Full Code Here

    }

    protected class MatchResultFSMGraphController extends FSMGraphController {

        public Figure drawNode(Object node) {
            Figure figure = super.drawNode(node);
            ((MatchResultStateController) _stateController)._highlightNode(node,
                    figure);
            return figure;
        }
View Full Code Here

TOP

Related Classes of diva.canvas.Figure

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.