Documentation of 'org.jhotdraw.samples.odg.figures.ODGBezierFigure' Java class
ODGBezierFigure
org.jhotdraw.samples.odg.figures

Class ODGBezierFigure

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Figure, DOMStorable


    public class ODGBezierFigure
    extends BezierFigure
    ODGBezierFigure is not an actual ODG element, it is used by ODGPathFigure to represent a single BezierPath segment within an ODG path.
    See Also:
    Serialized Form
    • Constructor Detail

      • ODGBezierFigure

        public ODGBezierFigure()
        Creates a new instance.
      • ODGBezierFigure

        public ODGBezierFigure(boolean isClosed)
    • Method Detail

      • createHandles

        public java.util.Collection<Handle> createHandles(ODGPathFigure pathFigure,
                                                          int detailLevel)
      • handleMouseClick

        public boolean handleMouseClick(java.awt.geom.Point2D.Double p,
                                        java.awt.event.MouseEvent evt,
                                        DrawingView view)
        Description copied from class: BezierFigure
        Handles a mouse click.
        Specified by:
        handleMouseClick in interface Figure
        Overrides:
        handleMouseClick in class BezierFigure
        Parameters:
        p - The location of the mouse event.
        evt - The mouse event.
        view - The drawing view which is the source of the mouse event.
        Returns:
        Returns true, if the event was consumed.
      • transform

        public void transform(java.awt.geom.AffineTransform tx)
        Description copied from interface: Figure
        Transforms the shape of the Figure. Transformations using double precision arithmethics are inherently lossy operations. Therefore it is recommended to use getTransformRestoreData() restoreTransformTo() to provide lossless undo/redo functionality.

        This is a basic operation which does not fire events. Use the following code sequence, if you need event firing:

         figure.willChange();
         figure.transform(...);
         figure.changed();
         
        Specified by:
        transform in interface Figure
        Overrides:
        transform in class BezierFigure
        Parameters:
        tx - The transformation.
        See Also:
        Figure.getTransformRestoreData(), Figure.restoreTransformTo(java.lang.Object)
      • getDrawingArea

        public java.awt.geom.Rectangle2D.Double getDrawingArea()
        Description copied from interface: Figure
        Returns the drawing area of the figure as a Rectangle.

        The drawing area is used to inform DrawingView about the area that is needed to draw this figure.

        The drawing area needs to be large enough, to take line width, line caps and other decorations into account that exceed the bounds of the Figure.

        Specified by:
        getDrawingArea in interface Figure
        Overrides:
        getDrawingArea in class BezierFigure
      • flattenTransform

        public void flattenTransform()
        Transforms all coords of the figure by the current TRANSFORM attribute and then sets the TRANSFORM attribute to null.
      • invalidate

        public void invalidate()
        Description copied from class: AbstractFigure
        Invalidates cached data of the Figure. This method must execute fast, because it can be called very often.
        Overrides:
        invalidate in class BezierFigure

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.