org.icepdf.ri.common.tools
Class HighLightAnnotationHandler
java.lang.Object
org.icepdf.ri.common.tools.CommonToolHandler
org.icepdf.ri.common.tools.SelectionBoxHandler
org.icepdf.ri.common.tools.TextSelection
org.icepdf.ri.common.tools.TextSelectionPageHandler
org.icepdf.ri.common.tools.HighLightAnnotationHandler
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener, ToolHandler
- Direct Known Subclasses:
- StrikeOutAnnotationHandler, UnderLineAnnotationHandler
public class HighLightAnnotationHandler
- extends TextSelectionPageHandler
HighLightAnnotationHandler tool extends TextSelectionPageHandler which
takes care visually selected text as the mouse is dragged across text on the
current page.
Once the mouseReleased event is fired this handler will create new
HighLightAnnotation and respective AnnotationComponent. The addition of the
Annotation object to the page is handled by the annotation callback. Once
create the handler will deselect the text and the newly created annotation
will be displayed.
- Since:
- 5.0
|
Field Summary |
protected org.icepdf.core.pobjects.Name |
highLightType
|
| Fields inherited from class org.icepdf.ri.common.tools.TextSelection |
bottomMargin, bottomMarginExclusion, enableMarginExclusion, enableMarginExclusionBorder, lastMouseLocation, lastMousePressedLocation, logger, pageLock, selectedCount, topMargin, topMarginExclusion |
|
Method Summary |
void |
createTextMarkupAnnotation(java.util.ArrayList<java.awt.Shape> highlightBounds)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Override the base functionality as we don't want to support double and
triple click work selection for highlights. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
| Methods inherited from class org.icepdf.ri.common.tools.TextSelectionPageHandler |
convertToPageSpace, installTool, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, paintTool, setDocumentViewController, setSelectionRectangle, uninstallTool |
| Methods inherited from class org.icepdf.ri.common.tools.TextSelection |
calculateTextSelectionExclusion, clearSelection, clearSelectionState, lineSelectHandler, multiLineSelectHandler, paintSelectedText, paintTextBounds, selection, selectionEnd, selectionIcon, selectionStart, setBottomMargin, setTopMargin, wordLineSelection, wordSelectHandler |
| Methods inherited from class org.icepdf.ri.common.tools.SelectionBoxHandler |
clearRectangle, getCurrentRect, getRectToDraw, isOverPageComponent, paintSelectionBox, resetRectangle, setCurrentRect, setRectToDraw, setSelectionSize, updateDrawableRect, updateSelectionSize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
highLightType
protected org.icepdf.core.pobjects.Name highLightType
HighLightAnnotationHandler
public HighLightAnnotationHandler(DocumentViewController documentViewController,
AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel)
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Override the base functionality as we don't want to support double and
triple click work selection for highlights.
- Specified by:
mouseClicked in interface java.awt.event.MouseListener- Overrides:
mouseClicked in class TextSelectionPageHandler
- Parameters:
e - mouse event
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Invoked when a mouse button has been released on a component.
- Specified by:
mouseReleased in interface java.awt.event.MouseListener- Overrides:
mouseReleased in class TextSelectionPageHandler
createTextMarkupAnnotation
public void createTextMarkupAnnotation(java.util.ArrayList<java.awt.Shape> highlightBounds)