public abstract class AbstractSelectionRendererTool extends com.levigo.jadice.swing.internal.tool.AbstractBaseTool implements SelectionProvider
Tool.ActivationRequest
Modifier and Type | Field and Description |
---|---|
static Color |
DEFAULT_ACTIVE_SELECTION_COLOR |
static Color |
DEFAULT_SELECTION_COLOR |
protected static String |
LINE_ENDING |
protected static String |
SEL_BUS_PROPERTY_PREFIX |
activeGesture, currentPage, enableContextToolbar, isActive, lastRenderControls, lastRenderedPageBounds
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
Modifier | Constructor and Description |
---|---|
protected |
AbstractSelectionRendererTool() |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
clearSelection() |
protected List<? extends Selection> |
doGetSelections() |
protected void |
doSetActiveSelection(Selection activeSelection) |
protected void |
doSetSelections(List<? extends Selection> currentSelection) |
Selection |
getActiveSelection() |
protected Color |
getActiveSelectionColor() |
String |
getSelectedText() |
protected Color |
getSelectionColor() |
List<? extends Selection> |
getSelections() |
protected void |
handleEditEvent(boolean isActive,
EditEvent e)
It is not recommended to override this method, but to override ome or more of
AbstractBaseTool.shallHandleEditEvent(boolean, EditEvent) ,
AbstractBaseTool.beforeHandleEditEvent(boolean, EditEvent) and
AbstractBaseTool.afterHandleEditEvent(boolean, EditEvent, Object) . |
protected boolean |
isRemoveOnClick() |
protected void |
render(RenderParameters parameters,
boolean isActive)
Renders the Tool's UI onto the given
Graphics2D context using the given
RenderControls . |
protected void |
renderSelections(RenderParameters parameters,
List<? extends Selection> renderSelections) |
protected void |
setActiveSelectionColor(Color activeSelectionColor) |
protected void |
setManager(ToolManager manager)
Receives the
ToolManager instance, which the Tool implementation has been
registered for. |
protected void |
setRemoveOnClick(boolean removeOnClick)
specifies if the selection should be removed on a single click using the mouse.
|
protected void |
setSelectionColor(Color selectionColor) |
protected boolean |
shallRemoveOnClick(MouseEditEvent e) |
protected void |
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, getRenderPriority, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, propagatePropertyChange, setCursor, setEnabled, setStatusFeedback
protected static final String LINE_ENDING
protected static final String SEL_BUS_PROPERTY_PREFIX
public static final Color DEFAULT_SELECTION_COLOR
public static final Color DEFAULT_ACTIVE_SELECTION_COLOR
protected final void doSetActiveSelection(Selection activeSelection)
public final Selection getActiveSelection()
protected Color getActiveSelectionColor()
public String getSelectedText()
protected Color getSelectionColor()
public List<? extends Selection> getSelections()
getSelections
in interface SelectionProvider
protected void afterHandleEditEvent(boolean isActive, EditEvent e, Object gadget)
afterHandleEditEvent
in class com.levigo.jadice.swing.internal.tool.AbstractBaseTool
isActive
- TODOe
- TODOAbstractBaseTool.afterHandleEditEvent(boolean,
com.levigo.jadice.swing.tool.EditEvent, java.lang.Object)
protected boolean isRemoveOnClick()
true
if the selection is being removed on click or
false
setRemoveOnClick(boolean)
protected void handleEditEvent(boolean isActive, EditEvent e)
com.levigo.jadice.swing.internal.tool.AbstractBaseTool
AbstractBaseTool.shallHandleEditEvent(boolean, EditEvent)
,
AbstractBaseTool.beforeHandleEditEvent(boolean, EditEvent)
and
AbstractBaseTool.afterHandleEditEvent(boolean, EditEvent, Object)
. If you do it anyway, you will
usually want to call this super-implementation early on.handleEditEvent
in class com.levigo.jadice.swing.internal.tool.AbstractBaseTool
isActive
- whether this tool is currently activee
- the eventTool.handleEditEvent(boolean,
com.levigo.jadice.swing.tool.EditEvent)
protected void render(RenderParameters parameters, boolean isActive)
Tool
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.
render
in class com.levigo.jadice.swing.internal.tool.AbstractBaseTool
parameters
- the view component which is currently being renderedisActive
- whether the called tool is currently activeprotected void renderSelections(RenderParameters parameters, List<? extends Selection> renderSelections)
protected void setActiveSelectionColor(Color activeSelectionColor)
protected void setManager(ToolManager manager)
Tool
ToolManager
instance, which the Tool
implementation has been
registered for. If the Tool
is deregistered
this
method will be called with null.setManager
in class Tool
protected void setRemoveOnClick(boolean removeOnClick)
removeOnClick
- true
if the selection should be removed on clickprotected void setSelectionColor(Color selectionColor)
protected boolean shallRemoveOnClick(MouseEditEvent e)
protected void updateTextSelection()
public void clearSelection()
clearSelection
in interface SelectionProvider
Copyright © 2024 levigo holding gmbh. All rights reserved.