|
|||||||||
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.thumbnailview.VisibleBoundsTool
public class VisibleBoundsTool
A tool used to visualize the area of the current page that is currently visible within an
associated page view. The visible area, i.e. the bounds of the view port, are visualized as a
rectangle floating above the thumb-nail representation of the current page.
In addition to the visualization this tool also supports navigation by dragging the visible area
within the current page or onto other pages in the same ThumbnailView
.
Property | Type | Description | Default value | ||||||
---|---|---|---|---|---|---|---|---|---|
ThumbnailView.visibleBoundsBorder | Border |
The border used to visualize the visible bounds | A 1-pixel red line or a fancier variant configured via GlobalJadiceComponentAddon
|
Nested Class Summary | |
---|---|
static class |
VisibleBoundsTool.MouseSensitivity
An enum of choices for the mouse-sensitivity of the visual bounds visualization. |
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool |
---|
Tool.ActivationRequest |
Field Summary |
---|
Fields inherited from class com.levigo.jadice.swing.tool.Tool |
---|
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY |
Constructor Summary | |
---|---|
VisibleBoundsTool()
|
Method Summary | |
---|---|
int |
getFrameDragTolerance()
Get the tolerance in pixels within which the frame will be draggable. |
VisibleBoundsTool.MouseSensitivity |
getMouseSensitivity()
Return where the visual bounds visualization is sensitive to mouse input, i.e. |
Border |
getVisualizationBorder()
Return the Border used to paint the visible bounds visualization. |
protected void |
handleMouseDragged(MouseEditEvent e,
boolean isActive)
Invoked when a mouse button is pressed on a component and then dragged. |
protected void |
handleMouseMoved(MouseEditEvent e,
boolean isActive)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed. |
protected void |
handleMousePressed(MouseEditEvent e,
boolean isActive)
Invoked when a mouse button has been pressed on a component. |
protected void |
handleMouseReleased(MouseEditEvent e,
boolean isActive)
Invoked when a mouse button has been released on a component. |
boolean |
isUseExclusiveModeWhileDragging()
|
protected void |
render(RenderParameters parameters,
boolean isActive)
Renders the Tool's UI onto the given Graphics2D context using the given
RenderControls . |
void |
setFrameDragTolerance(int frameDragTolerance)
Set the tolerance in pixels within which the frame will be draggable. |
protected void |
setManager(ToolManager manager)
Receives the ToolManager instance, which the Tool implementation has been
registered for. |
void |
setMouseSensitivity(VisibleBoundsTool.MouseSensitivity mouseSensitivity)
Set where the visual bounds visualization is sensitive to mouse input, i.e. |
void |
setUseExclusiveModeWhileDragging(boolean useExclusiveModeWhileDragging)
Set whether to use the exclusive tool mode while the visible bounds frame is being dragged. |
void |
setVisualizationBorder(Border visualizationBorder)
Set the Border used to paint the visible bounds visualization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VisibleBoundsTool()
Method Detail |
---|
protected void handleMouseMoved(MouseEditEvent e, boolean isActive)
Tool
handleMouseMoved
in class Tool
isActive
- whether this tool is currently activeprotected void handleMousePressed(MouseEditEvent e, boolean isActive)
Tool
handleMousePressed
in class Tool
isActive
- whether this tool is currently activeprotected void handleMouseReleased(MouseEditEvent e, boolean isActive)
Tool
handleMouseReleased
in class Tool
isActive
- whether this tool is currently activeprotected void handleMouseDragged(MouseEditEvent e, boolean isActive)
Tool
MOUSE_DRAGGED
events will continue to be delivered to the component where the drag
originated until the mouse button is released (regardless of whether the mouse position is
within the bounds of the component).
Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED
events may
not be delivered during a native Drag&Drop operation.
handleMouseDragged
in class Tool
isActive
- whether this tool is currently activeprotected 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.
parameters
- the view component which is currently being renderedisActive
- whether the called tool is currently activeprotected 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
public int getFrameDragTolerance()
public void setFrameDragTolerance(int frameDragTolerance)
frameDragTolerance
- the frameDragTolerance to setpublic void setUseExclusiveModeWhileDragging(boolean useExclusiveModeWhileDragging)
false
. Activate this
option if some other tool conflicts with the visible bounds tool.
useExclusiveModeWhileDragging
- public boolean isUseExclusiveModeWhileDragging()
public VisibleBoundsTool.MouseSensitivity getMouseSensitivity()
public void setMouseSensitivity(VisibleBoundsTool.MouseSensitivity mouseSensitivity)
VisibleBoundsTool.MouseSensitivity
for options.
Default: VisibleBoundsTool.MouseSensitivity.EDGES
mouseSensitivity
- the mouse-sensitivity zones to usepublic Border getVisualizationBorder()
Border
used to paint the visible bounds visualization.
public void setVisualizationBorder(Border visualizationBorder)
Border
used to paint the visible bounds visualization. The default value is
taken from the UI property ThumbnailView.visibleBoundsBorder
.
visualizationBorder
- the Border
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |