public final class SelectionHighlighterTool extends AbstractSelectionRendererTool
Tool.ActivationRequest
DEFAULT_ACTIVE_SELECTION_COLOR, DEFAULT_SELECTION_COLOR, LINE_ENDING, SEL_BUS_PROPERTY_PREFIX
activeGesture, currentPage, enableContextToolbar, isActive, lastRenderControls, lastRenderedPageBounds
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
SelectionHighlighterTool() |
Modifier and Type | Method and Description |
---|---|
void |
clearSelections() |
static SelectionHighlighterTool |
get(ToolManager toolManager) |
static SelectionHighlighterTool |
get(ToolManager toolManager,
boolean create) |
protected int |
getRenderPriority()
Return the render priority for this tool.
|
String |
getSelectedText() |
Color |
getSelectionColor() |
boolean |
hasSelections()
checks if there are selected text fragments on the the page
|
boolean |
isRemoveOnClick() |
void |
setActiveSelection(Selection activeSelection) |
void |
setRemoveOnClick(boolean removeOnClick)
specifies if the selection should be removed on a single click using the mouse.
|
void |
setSelectionColor(Color selectionColor)
specifies the highlighting color.
|
void |
setSelections(List<? extends Selection> selections)
set a list of
Selection elements which should be used to highlight regions on the
screen using the color specified by setSelectionColor(Color) . |
afterHandleEditEvent, clearSelection, doGetSelections, doSetActiveSelection, doSetSelections, getActiveSelection, getActiveSelectionColor, getSelections, handleEditEvent, render, renderSelections, setActiveSelectionColor, setManager, shallRemoveOnClick, updateTextSelection
activateToolbar, autoscroll, beforeHandleEditEvent, checkForRenderGeometryChange, deactivateToolbar, endGesture, getActiveGesture, getContextToolbar, getCurrentPage, getPreferredToolbarLocation, getUndoManager, handleEditEventPreDispatch, isEnableContextToolbar, serviceGesture, setActive, setEnableContextToolbar, shallHandleEditEvent, startGesture, switchFocus, toolbarShallBeActive, updateToolbarLocation, updateToolbarVisibility
contribute, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getDispatchPriority, getManager, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, propagatePropertyChange, setCursor, setEnabled, setStatusFeedback
public static SelectionHighlighterTool get(ToolManager toolManager)
public static SelectionHighlighterTool get(ToolManager toolManager, boolean create)
public void clearSelections()
protected int getRenderPriority()
Tool
Tool.MIN_PRIORITY
...Tool.MAX_PRIORITY
.
The default priority is equal to Tool.DEFAULT_PRIORITY
.getRenderPriority
in class Tool
public String getSelectedText()
getSelectedText
in class AbstractSelectionRendererTool
public Color getSelectionColor()
getSelectionColor
in class AbstractSelectionRendererTool
public boolean hasSelections()
true
if there are selected text fragments on the current page.public boolean isRemoveOnClick()
isRemoveOnClick
in class AbstractSelectionRendererTool
true
if the selection is beeing removed on click or
false
setRemoveOnClick(boolean)
public void setActiveSelection(Selection activeSelection)
public void setRemoveOnClick(boolean removeOnClick)
setRemoveOnClick
in class AbstractSelectionRendererTool
removeOnClick
- true
if the selection should be removed on clickpublic void setSelectionColor(Color selectionColor)
Color
specified should have a alpha-value of less
than 200 set, as if not, the the highlighting marker will be rendererd as a solid box (opaque
not transparent).setSelectionColor
in class AbstractSelectionRendererTool
selectionColor
- the color of the selectionIllegalArgumentException
- if selectionColor is nullpublic void setSelections(List<? extends Selection> selections)
Selection
elements which should be used to highlight regions on the
screen using the color specified by setSelectionColor(Color)
.selections
- the Selection
s to be used for highlightingCopyright © 2024 levigo holding gmbh. All rights reserved.