Class VisibleBoundsTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.VisibleBoundsTool
- All Implemented Interfaces:
MenuContributor
Tool for a
ThumbnailPageView to visualize the visible area of the associated
BasicPageView.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enum of choices for the mouse-sensitivity of the visual bounds visualization.static interfaceNested classes/interfaces inherited from class com.levigo.jadice.web.client.tool.Tool
Tool.ActivationRequest -
Field Summary
Fields inherited from class com.levigo.jadice.web.client.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturn the dispatch priority for this tool.intGet the tolerance in pixels within which the frame will be draggable.Return where the visual bounds visualization is sensitive to mouse input, i.e. where it can be dragged.protected voidhandleMouseDragged(MouseEditEvent e, boolean isActive) Invoked when a mouse button is pressed on a component and then dragged.protected voidhandleMouseMoved(MouseEditEvent e, boolean isActive) Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.protected voidhandleMousePressed(MouseEditEvent e, boolean isActive) Invoked when a mouse button has been pressed on a component.protected voidhandleMouseReleased(MouseEditEvent e, boolean isActive) Invoked when a mouse button has been released on a component.booleanprotected voidpaintVisibleBounds(Rectangle renderedPageBounds, Rectangle visibleBounds, com.levigo.util.gwtawt.client.WebGraphics wg) protected voidrender(RenderParameters parameters, boolean isActive) Renders the Tool's UI onto the givenGraphics2Dcontext using the givenRenderControls.voidsetFrameDragTolerance(int frameDragTolerance) Set the tolerance in pixels within which the frame will be draggable.protected voidsetManager(ToolManager manager) Receives theToolManagerinstance, which theToolimplementation has been registered for.voidsetMouseSensitivity(VisibleBoundsTool.MouseSensitivity mouseSensitivity) Set where the visual bounds visualization is sensitive to mouse input, i.e. where it can be dragged.voidsetUseExclusiveModeWhileDragging(boolean useExclusiveModeWhileDragging) Set whether to use the exclusive tool mode while the visible bounds frame is being dragged.Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getManager, getRenderPriority, handleEditEvent, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseEntered, handleMouseExited, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, handleTouchStart, propagatePropertyChange, setActive, setCursor, setCursor, setEnabled, setStatusFeedback
-
Constructor Details
-
VisibleBoundsTool
public VisibleBoundsTool()
-
-
Method Details
-
getDispatchPriority
protected int getDispatchPriority()Description copied from class:ToolReturn the dispatch priority for this tool. Tools with higher dispatch priorities receive events earlier than tools with lower priorities. The priority should be in the rangeTool.MIN_PRIORITY...Tool.MAX_PRIORITY. The default priority is equal toTool.MAX_PRIORITYminus the render priority.- Overrides:
getDispatchPriorityin classTool- Returns:
- the dispatch priority
-
handleMouseMoved
Description copied from class:ToolInvoked when the mouse cursor has been moved onto a component but no buttons have been pushed.- Overrides:
handleMouseMovedin classTool- Parameters:
e- the eventisActive- whether this tool is currently active
-
handleMousePressed
Description copied from class:ToolInvoked when a mouse button has been pressed on a component.- Overrides:
handleMousePressedin classTool- Parameters:
e- the eventisActive- whether this tool is currently active
-
handleMouseReleased
Description copied from class:ToolInvoked when a mouse button has been released on a component.- Overrides:
handleMouseReleasedin classTool- Parameters:
e- the eventisActive- whether this tool is currently active
-
handleMouseDragged
Description copied from class:ToolInvoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGEDevents 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 DragDrop implementations,
MouseDragEventevents may not be delivered during a native Drag&Drop operation.- Overrides:
handleMouseDraggedin classTool- Parameters:
e- the eventisActive- whether this tool is currently active
-
render
Description copied from class:ToolRenders the Tool's UI onto the givenGraphics2Dcontext using the givenRenderControls.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.
-
paintVisibleBounds
-
setManager
Description copied from class:ToolReceives theToolManagerinstance, which theToolimplementation has been registered for. If theToolisderegisteredthis method will be called with null.- Overrides:
setManagerin classTool- Parameters:
manager- theToolManager
-
getFrameDragTolerance
public int getFrameDragTolerance()Get the tolerance in pixels within which the frame will be draggable.- Returns:
- The frame rrag tolerance.
-
setFrameDragTolerance
public void setFrameDragTolerance(int frameDragTolerance) Set the tolerance in pixels within which the frame will be draggable.- Parameters:
frameDragTolerance- The frame drag tolerance to set.
-
setUseExclusiveModeWhileDragging
public void setUseExclusiveModeWhileDragging(boolean useExclusiveModeWhileDragging) Set whether to use the exclusive tool mode while the visible bounds frame is being dragged. This is not normally necessary and therefore defaults tofalse. Activate this option if some other tool conflicts with the visible bounds tool.- Parameters:
useExclusiveModeWhileDragging- True, if exclusive mode shall be used, false else.
-
isUseExclusiveModeWhileDragging
public boolean isUseExclusiveModeWhileDragging()- Returns:
- True, if exclusive mode is used, false else.
-
getMouseSensitivity
Return where the visual bounds visualization is sensitive to mouse input, i.e. where it can be dragged.- Returns:
- the mouse-sensitivity zones
-
setMouseSensitivity
Set where the visual bounds visualization is sensitive to mouse input, i.e. where it can be dragged. SeeVisibleBoundsTool.MouseSensitivityfor options. Default:VisibleBoundsTool.MouseSensitivity.EDGES- Parameters:
mouseSensitivity- the mouse-sensitivity zones to use
-