Class Curve

    • Constructor Detail

      • Curve

        public Curve()
    • Method Detail

      • getThumbnailIcon

        public javax.swing.ImageIcon getThumbnailIcon()
        Description copied from interface: PageItem
        Returns a small representative icon for this item. The icon should be ICON_SIZE pixels wide and high.
        Specified by:
        getThumbnailIcon in interface PageItem
        Overrides:
        getThumbnailIcon in class Line
      • getControlPoint

        public java.awt.geom.Point2D.Double getControlPoint()
      • setControlPoint

        public void setControlPoint​(java.awt.geom.Point2D cp)
      • getCX

        public double getCX()
      • getCY

        public double getCY()
      • paint

        public void paint​(java.awt.Graphics2D g,
                          RenderTarget target,
                          double renderResolutionHint)
        Description copied from interface: PageItem
        Paint this item at its current location. The graphics context will be scaled so that 1 unit represents 1 point. The resolution hint is a suggestion as to the resolution the item should be rendered at if it must be converted to a bitmap before being drawn. It may or may not represent the actual resolution of the output target.
        Specified by:
        paint in interface PageItem
        Overrides:
        paint in class Line
        Parameters:
        g - the graphics context to paint to
        target - the type of destination being drawn to
        renderResolutionHint - a source resolution hint
      • getOutline

        public java.awt.Shape getOutline()
        Description copied from interface: PageItem
        Return a Shape that corresponds to the outline of this item. In the simplest case, this can return the same result as PageItem.getRectangle(). If precise geometry is available for the item, then this should return a more accurate bounding shape.
        Specified by:
        getOutline in interface PageItem
        Overrides:
        getOutline in class Line
        Returns:
        the outline of this object
      • getDragHandles

        public DragHandle[] getDragHandles()
        Description copied from class: AbstractItem
        Returns an array of the custom DragHandles for this item. If the item has no handles, returns null.

        Concrete subclasses should create an array of handles on demand and cache them in the dragHandles field in order to ensure that handles are not shared between copies of the item. Example:

         public DragHandle[] getDragHandles() {
             if( dragHandles == null ) {
                 dragHandles = new DragHandle[] { ... };
             }
             return dragHandles;
         }
         
        Specified by:
        getDragHandles in interface PageItem
        Overrides:
        getDragHandles in class Line
        Returns:
        an array of drag handles that can be used to manipulate the item, or null
      • hasExteriorHandles

        public boolean hasExteriorHandles()
        Description copied from interface: PageItem
        Returns true if this item has one or more drag handles that may lie outside of the item's bounding box. The editor normally only tests handles that lie within the bounding box to see if the user has pointed at them; if this method returns true then the item's handles are always tested.
        Specified by:
        hasExteriorHandles in interface PageItem
        Overrides:
        hasExteriorHandles in class Line
        Returns:
        true if some handles may be outside the bounding box
      • writeImpl

        protected void writeImpl​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Overrides:
        writeImpl in class Line
        Throws:
        java.io.IOException
      • readImpl

        protected void readImpl​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Overrides:
        readImpl in class Line
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException