Class PolygonAnnotationWrangler


public class PolygonAnnotationWrangler extends DefaultWrangler<PathAnnotation>
  • Constructor Details

    • PolygonAnnotationWrangler

      public PolygonAnnotationWrangler()
  • Method Details

    • getHandles

      public List<Handle> getHandles(PageView pageView, Page page, PathAnnotation annotation)
      Description copied from class: Wrangler
      Creates handles for a specific annotation.
      Overrides:
      getHandles in class DefaultWrangler<PathAnnotation>
      Parameters:
      pageView - PageView the annotation is shown on (for example for repaint calls)
      page - The page that contains the annotation
      annotation - The annotation the wrangler should create handles for
      Returns:
      Handles that can be used to edit the annotation
    • convert

      public static List<Point2D> convert(Path2D path)
    • convert

      public static Path2D convert(List<Point2D> points)
    • setClosed

      public void setClosed(boolean closed)
    • handleCreateEditEvent

      public boolean handleCreateEditEvent(EditEvent e, PathAnnotation annotation)
      Description copied from class: Wrangler
      Invoked during the creation of an annotation.

      Can be invoked multiple times. For example during the creation of a polygon based annotation each mouse down event could indicate a new corner of the polygon at the current mouse position.

      Overrides:
      handleCreateEditEvent in class DefaultWrangler<PathAnnotation>
      Parameters:
      e - An event that controls a part of the creation
      annotation - The annotation that shall be created
      Returns:
      True when creation finished, false else