- java.lang.Object
-
- org.icepdf.ri.common.tools.CommonToolHandler
-
- org.icepdf.ri.common.tools.SelectionBoxHandler
-
- org.icepdf.ri.common.tools.SquareAnnotationHandler
-
- org.icepdf.ri.common.tools.CircleAnnotationHandler
-
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener,MouseInputListener,ToolHandler
public class CircleAnnotationHandler extends SquareAnnotationHandler
CircleAnnotationHandler tool is responsible for painting representation of a circle on the screen during a click and drag mouse event. The box created by this mouse event will be used to draw circle within its bounds.
Once the mouseReleased event is fired this handler will create new CircleAnnotation and respective AnnotationComponent. The addition of the Annotation object to the page is handled by the annotation callback.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static floatDEFAULT_STROKE_WIDTH-
Fields inherited from class org.icepdf.ri.common.tools.SquareAnnotationHandler
borderStyle, rectangle
-
Fields inherited from class org.icepdf.ri.common.tools.SelectionBoxHandler
currentRect, dash1, previousRectDrawn, rectToDraw, selectionBoxColour
-
Fields inherited from class org.icepdf.ri.common.tools.CommonToolHandler
documentViewController, pageViewComponent, preferences
-
-
Constructor Summary
Constructors Constructor Description CircleAnnotationHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckAndApplyPreferences()voidmouseReleased(MouseEvent e)Create the annotation objects need to draw and manipulated the annotation using the GUI properties panels.voidpaintTool(Graphics g)Paint a rough circle representing what the annotation will look like when created.-
Methods inherited from class org.icepdf.ri.common.tools.SquareAnnotationHandler
installTool, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, setSelectionRectangle, uninstallTool
-
Methods inherited from class org.icepdf.ri.common.tools.SelectionBoxHandler
clearRectangle, getCurrentRect, getRectToDraw, isOverPageComponent, paintRectangle, paintSelectionBox, resetRectangle, setCurrentRect, setRectToDraw, setSelectionSize, updateDrawableRect, updateSelectionSize
-
Methods inherited from class org.icepdf.ri.common.tools.CommonToolHandler
convertToPageSpace, convertToPageSpace, convertToPageSpace, convertToPageSpace, getPageTransform, getPageTransform, getToPageSpaceTransform, getToPageSpaceTransform
-
-
-
-
Field Detail
-
DEFAULT_STROKE_WIDTH
protected static final float DEFAULT_STROKE_WIDTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CircleAnnotationHandler
public CircleAnnotationHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent)
-
-
Method Detail
-
paintTool
public void paintTool(Graphics g)
Paint a rough circle representing what the annotation will look like when created.- Specified by:
paintToolin interfaceToolHandler- Overrides:
paintToolin classSquareAnnotationHandler- Parameters:
g- graphics context
-
mouseReleased
public void mouseReleased(MouseEvent e)
Create the annotation objects need to draw and manipulated the annotation using the GUI properties panels.- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classSquareAnnotationHandler- Parameters:
e- mouse event.
-
checkAndApplyPreferences
protected void checkAndApplyPreferences()
- Overrides:
checkAndApplyPreferencesin classSquareAnnotationHandler
-
-