com.levigo.jadice.swing.search.tool
Class AbstractSelectionRendererTool
java.lang.Object
com.levigo.jadice.swing.tool.Tool
com.levigo.jadice.swing.internal.tool.AbstractBaseTool
com.levigo.jadice.swing.search.tool.AbstractSelectionRendererTool
- All Implemented Interfaces:
- SelectionProvider, MenuContributor
- Direct Known Subclasses:
- SelectionHighlighterTool, TextSelectionTool
public abstract class AbstractSelectionRendererTool
- extends com.levigo.jadice.swing.internal.tool.AbstractBaseTool
- implements SelectionProvider
Fields inherited from class com.levigo.jadice.swing.internal.tool.AbstractBaseTool |
activeGesture, currentPage, enableContextToolbar, isActive, lastRenderControls, lastRenderedPageBounds |
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 com.levigo.jadice.swing.tool.Tool |
contribute, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getDispatchPriority, getManager, getRenderPriority, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, propagatePropertyChange, setCursor, setEnabled, setStatusFeedback |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LINE_ENDING
protected static final String LINE_ENDING
SEL_BUS_PROPERTY_PREFIX
protected static final String SEL_BUS_PROPERTY_PREFIX
- See Also:
- Constant Field Values
DEFAULT_SELECTION_COLOR
public static final Color DEFAULT_SELECTION_COLOR
DEFAULT_ACTIVE_SELECTION_COLOR
public static final Color DEFAULT_ACTIVE_SELECTION_COLOR
AbstractSelectionRendererTool
protected AbstractSelectionRendererTool()
doGetSelections
protected final List<? extends Selection> doGetSelections()
doSetActiveSelection
protected final void doSetActiveSelection(Selection activeSelection)
doSetSelections
protected final void doSetSelections(List<? extends Selection> currentSelection)
getActiveSelection
public final Selection getActiveSelection()
getActiveSelectionColor
protected Color getActiveSelectionColor()
getSelectedText
public String getSelectedText()
getSelectionColor
protected Color getSelectionColor()
getSelections
public List<? extends Selection> getSelections()
- Specified by:
getSelections
in interface SelectionProvider
afterHandleEditEvent
protected void afterHandleEditEvent(boolean isActive,
EditEvent e,
Object gadget)
- If you override this method, you must call this super-implementation late in your overridden
implementation.
- Overrides:
afterHandleEditEvent
in class com.levigo.jadice.swing.internal.tool.AbstractBaseTool
- See Also:
AbstractBaseTool.afterHandleEditEvent(boolean,
com.levigo.jadice.swing.tool.EditEvent, java.lang.Object)
isRemoveOnClick
protected boolean isRemoveOnClick()
- Returns:
- either
true
if the selection is being removed on click or
false
- See Also:
setRemoveOnClick(boolean)
handleEditEvent
protected void handleEditEvent(boolean isActive,
EditEvent e)
- Description copied from class:
Tool
- Handle the given
EditEvent
. This method dispatches the edit event to the individual
handleXYZ()
-Methods. However, implementors may want and are allowed to override
this method in order to perform standard handling tasks common to all types of events.
- Overrides:
handleEditEvent
in class com.levigo.jadice.swing.internal.tool.AbstractBaseTool
- Parameters:
isActive
- whether this tool is currently activee
- the event
render
protected void render(RenderParameters parameters,
boolean isActive)
- Description copied from class:
Tool
- Renders the Tool's UI onto the given
Graphics2D
context using the given
RenderControls
.
This render method is called within the context and during the rendering of a single page. The
page being rendered is passed to implementors of this method in order to be able to control and
influence the page rendering.
- Overrides:
render
in class com.levigo.jadice.swing.internal.tool.AbstractBaseTool
- Parameters:
parameters
- the view component which is currently being renderedisActive
- whether the called tool is currently active
renderSelections
protected void renderSelections(RenderParameters parameters,
List<? extends Selection> renderSelections)
setActiveSelectionColor
protected void setActiveSelectionColor(Color activeSelectionColor)
setManager
protected void setManager(ToolManager manager)
- Description copied from class:
Tool
- Receives the
ToolManager
instance, which the Tool
implementation has been
registered for. If the Tool
is deregistered
this
method will be called with null.
- Overrides:
setManager
in class Tool
setRemoveOnClick
protected void setRemoveOnClick(boolean removeOnClick)
- specifies if the selection should be removed on a single click using the mouse.
- Parameters:
removeOnClick
- true
if the selection should be removed on click
setSelectionColor
protected void setSelectionColor(Color selectionColor)
shallRemoveOnClick
protected boolean shallRemoveOnClick(MouseEditEvent e)
updateTextSelection
protected void updateTextSelection()
clearSelection
public void clearSelection()
- Specified by:
clearSelection
in interface SelectionProvider
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.