|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.swing.tool.Tool com.levigo.jadice.swing.internal.tool.AbstractBaseTool com.levigo.jadice.swing.search.tool.AbstractSelectionRendererTool com.levigo.jadice.swing.search.tool.SelectionHighlighterTool
public final class SelectionHighlighterTool
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool |
---|
Tool.ActivationRequest |
Field Summary |
---|
Fields inherited from class com.levigo.jadice.swing.search.tool.AbstractSelectionRendererTool |
---|
DEFAULT_ACTIVE_SELECTION_COLOR, DEFAULT_SELECTION_COLOR, LINE_ENDING, SEL_BUS_PROPERTY_PREFIX |
Fields inherited from class com.levigo.jadice.swing.internal.tool.AbstractBaseTool |
---|
activeGesture, currentPage, enableContextToolbar, isActive, lastRenderControls, lastRenderedPageBounds |
Fields inherited from class com.levigo.jadice.swing.tool.Tool |
---|
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY |
Constructor Summary | |
---|---|
SelectionHighlighterTool()
|
Method Summary | |
---|---|
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) . |
Methods inherited from class com.levigo.jadice.swing.search.tool.AbstractSelectionRendererTool |
---|
afterHandleEditEvent, clearSelection, doGetSelections, doSetActiveSelection, doSetSelections, getActiveSelection, getActiveSelectionColor, getSelections, handleEditEvent, render, renderSelections, setActiveSelectionColor, setManager, shallRemoveOnClick, updateTextSelection |
Methods inherited from class com.levigo.jadice.swing.internal.tool.AbstractBaseTool |
---|
activateToolbar, autoscroll, beforeHandleEditEvent, checkForRenderGeometryChange, deactivateToolbar, endGesture, getActiveGesture, getContextToolbar, getCurrentPage, getPreferredToolbarLocation, getUndoManager, handleEditEventPreDispatch, isEnableContextToolbar, serviceGesture, setActive, setEnableContextToolbar, shallHandleEditEvent, startGesture, switchFocus, toolbarShallBeActive, updateToolbarLocation, updateToolbarVisibility |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectionHighlighterTool()
Method Detail |
---|
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 selection
IllegalArgumentException
- 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 highlighting
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |