Class GridTool

java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.GridTool
All Implemented Interfaces:
MenuContributor

public class GridTool extends Tool
A tool visualizing a Grid that was previously added to a Document.
  • Field Details

    • gridColor

      protected Color gridColor
    • lineWidth

      protected int lineWidth
  • Constructor Details

    • GridTool

      public GridTool()
  • Method Details

    • setManager

      protected void setManager(ToolManager manager)
      Description copied from class: Tool
      Receives the ToolManager instance, which the Tool implementation has been registered for. If the Tool is deregistered this method will be called with null.
      Overrides:
      setManager in class Tool
      Parameters:
      manager - the ToolManager
    • render

      protected void render(RenderParameters parameters, boolean isActive)
      Description copied from class: Tool
      Renders the Tool's UI onto the given 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.

      Overrides:
      render in class Tool
      Parameters:
      parameters - the view component which is currently being rendered
      isActive - whether the called tool is currently active
    • 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 the Tool.handleEditEvent(boolean, EditEvent) and Tool.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 class Tool
      Parameters:
      enabled - controls whether to enable or disable this Tool
    • 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 - the JadiceGraphics used to render the grid
    • getGridColor

      public Color getGridColor()
      Returns the grid color.
      Returns:
      the grid color
    • setGridColor

      public void setGridColor(Color gridColor)
      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