Class GridTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.GridTool
- All Implemented Interfaces:
MenuContributor
-
Nested Class Summary
Nested classes/interfaces inherited from class com.levigo.jadice.web.client.tool.Tool
Tool.ActivationRequest
-
Field Summary
FieldsFields inherited from class com.levigo.jadice.web.client.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureGraphics
(com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics) Configures the graphics that are used to visualize the grid.Returns the grid color.int
Returns the line width.protected void
render
(RenderParameters parameters, boolean isActive) Renders the Tool's UI onto the givenGraphics2D
context using the givenRenderControls
.protected void
setEnabled
(boolean enabled) Receive notification from the tool manager about the tool's enabled state.void
setGridColor
(Color gridColor) Sets the grid color.void
setLineWidth
(int lineWidth) Sets the line width.protected void
setManager
(ToolManager manager) Receives theToolManager
instance, which theTool
implementation has been registered for.Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getDispatchPriority, getManager, getRenderPriority, handleEditEvent, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, handleTouchStart, propagatePropertyChange, setActive, setCursor, setCursor, setStatusFeedback
-
Field Details
-
gridColor
-
lineWidth
protected int lineWidth
-
-
Constructor Details
-
GridTool
public GridTool()
-
-
Method Details
-
setManager
Description copied from class:Tool
Receives theToolManager
instance, which theTool
implementation has been registered for. If theTool
isderegistered
this method will be called with null.- Overrides:
setManager
in classTool
- Parameters:
manager
- theToolManager
-
render
Description copied from class:Tool
Renders the Tool's UI onto the givenGraphics2D
context 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.
-
setEnabled
protected void setEnabled(boolean enabled) Description copied from class:Tool
Receive notification from the tool manager about the tool's enabled state. In general, tools need not and should not try to implement different behaviour depending on the enabled state, as this is already covered by the ToolManager calling theTool.handleEditEvent(boolean, EditEvent)
andTool.render(RenderParameters, boolean)
in the appropriate state only. However, some tools may need to perform extended actions (for example, for resource management purposes) upon a change of the enabled state.- Overrides:
setEnabled
in classTool
- Parameters:
enabled
- controls whether to enable or disable thisTool
-
configureGraphics
protected void configureGraphics(com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics) Configures the graphics that are used to visualize the grid. May be overwritten in subclasses.- Parameters:
graphics
- theJadiceGraphics
used to render the grid
-
getGridColor
Returns the grid color.- Returns:
- the grid color
-
setGridColor
Sets the grid color.- Parameters:
gridColor
-
-
getLineWidth
public int getLineWidth()Returns the line width.- Returns:
- the line width
-
setLineWidth
public void setLineWidth(int lineWidth) Sets the line width.- Parameters:
lineWidth
- the line width
-