Documentation of 'org.jhotdraw.samples.svg.figures.SVGGroupFigure' Java class
SVGGroupFigure
org.jhotdraw.samples.svg.figures

Class SVGGroupFigure

    • Constructor Detail

      • SVGGroupFigure

        public SVGGroupFigure()
        Creates a new instance.
    • Method Detail

      • set

        public <T> void set(AttributeKey<T> key,
                            T value)
        Description copied from interface: Figure
        Sets an attribute on the figure and calls attributeChanged on all registered FigureListeners if the attribute value has changed.

        For efficiency reasons, the drawing is not automatically repainted. If you want the drawing to be repainted when the attribute is changed, you can either use key.set(figure, value); or

         figure.willChange();
         figure.set(...);
         figure.changed();
         
        Specified by:
        set in interface Figure
        Overrides:
        set in class AbstractCompositeFigure
        See Also:
        AttributeKey.set(org.jhotdraw.draw.Figure, T)
      • setAttributes

        public void setAttributes(java.util.Map<AttributeKey,java.lang.Object> map)
      • draw

        public void draw(java.awt.Graphics2D g)
        Description copied from interface: Figure
        Draws the figure.
        Specified by:
        draw in interface Figure
        Overrides:
        draw in class AbstractCompositeFigure
        Parameters:
        g - The Graphics2D to draw to.
      • getBounds

        public java.awt.geom.Rectangle2D.Double getBounds()
        Description copied from interface: Figure
        Returns the untransformed logical bounds of the figure as a Rectangle.

        The bounds are used by Handle objects for adjusting the figure and for aligning the figure on a grid.

        Specified by:
        getBounds in interface Figure
        Overrides:
        getBounds in class AbstractCompositeFigure
      • createHandles

        public java.util.LinkedList<Handle> createHandles(int detailLevel)
        Description copied from interface: Figure
        Creates handles used to manipulate the figure.
        Specified by:
        createHandles in interface Figure
        Overrides:
        createHandles in class AbstractCompositeFigure
        Parameters:
        detailLevel - The detail level of the handles. Usually this is 0 for bounding box handles and 1 for point handles. The value -1 is used by the SelectAreaTracker and the HandleTracker to highlight figures, over which the mouse pointer is hovering.
        Returns:
        a Collection of handles
        See Also:
        Handle
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: SVGFigure
        Returns true, if this figure is empty for one of the following reasons:
        • A group has no children
        • A path has less than two points
        • An ellipse or a rectangle has a width or a height of 0
        • A text has no characters
        Specified by:
        isEmpty in interface SVGFigure
      • clone

        public SVGGroupFigure clone()
        Description copied from interface: Figure
        Returns a clone of the figure, with clones of all aggregated figures, such as children and decorators. The cloned figure does not clone the list of FigureListeners from its original.
        Specified by:
        clone in interface Figure
        Overrides:
        clone in class AbstractCompositeFigure

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.