Package diva.canvas.toolbox

Examples of diva.canvas.toolbox.LabelFigure.translateTo()


                    result.add(lineFigure);

                    LabelFigure label = new LabelFigure(""
                            + ((IORelation) relation).getWidth(),
                            _relationLabelFont, 0, SwingConstants.SOUTH_WEST);
                    label.translateTo((width / 2) + 1.0, (-height / 2) - 1.0);
                    result.add(label);
                }
            }

            return result;
View Full Code Here


        // a reference to this figure.  By doing so, it precludes the
        // possibility of having multiple views on this model.
        LabelFigure label = new LabelFigure(truncated, _labelFont, 1.0,
                SwingConstants.CENTER);
        Rectangle2D backBounds = result.getBackgroundFigure().getBounds();
        label.translateTo(backBounds.getCenterX(), backBounds.getCenterY());
        result.add(label);

        _addLiveFigure(label);
        return result;
    }
View Full Code Here

            labelFigure.setAnchor(anchors[i]);

            // Move the anchor to the right location
            Point2D pt = CanvasUtilities.getLocation(square.getBounds(),
                    CanvasUtilities.reverseDirection(anchors[i]));
            labelFigure.translateTo(pt);

            // Add to the layer
            layer.add(labelFigure);
            labelFigure.setInteractor(defaultInteractor);
View Full Code Here

    public void repositionLabel() {
        LabelFigure label = getLabelFigure();

        if (label != null) {
            Point2D pt = getArcMidpoint();
            label.translateTo(pt);

            // FIXME: Need a way to override the positioning.
            label.autoAnchor(_arc);
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.