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 voidconfigureGraphics(com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics) Configures the graphics that are used to visualize the grid.Returns the grid color.intReturns the line width.protected voidrender(RenderParameters parameters, boolean isActive) Renders the Tool's UI onto the givenGraphics2Dcontext using the givenRenderControls.protected voidsetEnabled(boolean enabled) Receive notification from the tool manager about the tool's enabled state.voidsetGridColor(Color gridColor) Sets the grid color.voidsetLineWidth(int lineWidth) Sets the line width.protected voidsetManager(ToolManager manager) Receives theToolManagerinstance, which theToolimplementation 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:ToolReceives theToolManagerinstance, which theToolimplementation has been registered for. If theToolisderegisteredthis method will be called with null.- Overrides:
setManagerin classTool- Parameters:
manager- theToolManager
-
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.
-
setEnabled
protected void setEnabled(boolean enabled) Description copied from class:ToolReceive 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:
setEnabledin 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- theJadiceGraphicsused 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
-