- java.lang.Object
-
- org.icepdf.ri.common.tools.CommonToolHandler
-
- org.icepdf.ri.common.tools.AnnotationSelectionHandler
-
- All Implemented Interfaces:
ActionListener,MouseListener,MouseMotionListener,EventListener,MouseInputListener,ToolHandler
public class AnnotationSelectionHandler extends CommonToolHandler implements ToolHandler, ActionListener
The AnnotationSelectionHandler is responsible for deselecting all annotations when a mouse click event has been fired.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentViewControllerdocumentViewControllerprotected AbstractPageViewComponentpageViewComponent-
Fields inherited from class org.icepdf.ri.common.tools.CommonToolHandler
preferences
-
-
Constructor Summary
Constructors Constructor Description AnnotationSelectionHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)protected voidcheckAndApplyPreferences()voidinstallTool()Callback code that allows post construct task to take place when the tool is selected via theAbstractDocumentView.setToolMode(int)call.voidmouseClicked(MouseEvent e)voidmouseDragged(MouseEvent e)voidmouseEntered(MouseEvent e)voidmouseExited(MouseEvent e)voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)voidmouseReleased(MouseEvent e)voidpaintTool(Graphics g)Paints the tools pre-annotation creation state.voiduninstallTool()Callback code that allows pre destroy task to take place when the tool is unselected via theAbstractDocumentView.setToolMode(int)call.-
Methods inherited from class org.icepdf.ri.common.tools.CommonToolHandler
convertToPageSpace, convertToPageSpace, convertToPageSpace, convertToPageSpace, getPageTransform, getPageTransform, getToPageSpaceTransform, getToPageSpaceTransform
-
-
-
-
Field Detail
-
documentViewController
protected final DocumentViewController documentViewController
-
pageViewComponent
protected final AbstractPageViewComponent pageViewComponent
-
-
Constructor Detail
-
AnnotationSelectionHandler
public AnnotationSelectionHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent)
-
-
Method Detail
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClickedin interfaceMouseListener
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformedin interfaceActionListener
-
paintTool
public void paintTool(Graphics g)
Description copied from interface:ToolHandlerPaints the tools pre-annotation creation state.- Specified by:
paintToolin interfaceToolHandler- Parameters:
g- graphics context
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExitedin interfaceMouseListener
-
checkAndApplyPreferences
protected void checkAndApplyPreferences()
- Specified by:
checkAndApplyPreferencesin classCommonToolHandler
-
installTool
public void installTool()
Description copied from interface:ToolHandlerCallback code that allows post construct task to take place when the tool is selected via theAbstractDocumentView.setToolMode(int)call.- Specified by:
installToolin interfaceToolHandler
-
uninstallTool
public void uninstallTool()
Description copied from interface:ToolHandlerCallback code that allows pre destroy task to take place when the tool is unselected via theAbstractDocumentView.setToolMode(int)call.- Specified by:
uninstallToolin interfaceToolHandler
-
-