org.icepdf.ri.common.tools
Class TextSelectionViewHandler
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.TextSelectionViewHandler
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, javax.swing.event.MouseInputListener, ToolHandler
public class TextSelectionViewHandler
- extends TextSelection
- implements ToolHandler, java.awt.event.MouseWheelListener
TextSelectionViewHandler propagates text selection events into the the
views child page components. This handle is required for multi-page text
selection. On mouse click all text selection states are removed.
- Since:
- 5.0
| 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 |
logger
protected static final java.util.logging.Logger logger
parentComponent
protected javax.swing.JComponent parentComponent
isDragging
protected boolean isDragging
TextSelectionViewHandler
public TextSelectionViewHandler(DocumentViewController documentViewController,
DocumentViewModel documentViewModel,
javax.swing.JComponent parentComponent)
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked in interface java.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased in interface java.awt.event.MouseListener
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
- Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
paintTool
public void paintTool(java.awt.Graphics g)
- Description copied from interface:
ToolHandler
- Paints the tools pre-annotation creation state.
- Specified by:
paintTool in interface ToolHandler
- Parameters:
g - graphics context
setSelectionRectangle
public void setSelectionRectangle(java.awt.Point cursorLocation,
java.awt.Rectangle selection)
- Overrides:
setSelectionRectangle in class TextSelection
installTool
public void installTool()
- Description copied from interface:
ToolHandler
- Callback code that allows post construct task to take place when the
tool is selected via the
AbstractDocumentView.setToolMode(int)
call.
- Specified by:
installTool in interface ToolHandler
uninstallTool
public void uninstallTool()
- Description copied from interface:
ToolHandler
- Callback code that allows pre destroy task to take place when the
tool is unselected via the
AbstractDocumentView.setToolMode(int)
call.
- Specified by:
uninstallTool in interface ToolHandler
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited in interface java.awt.event.MouseListener