gistoolkit.display
Class Style

java.lang.Object
  extended bygistoolkit.display.Style

public class Style
extends java.lang.Object

Class to represent the style of a layer. This style contains the information about how an object should draw itself.


Constructor Summary
Style()
          Constructs a new style with a single Feature Renderer, and a MonoShader with the default color scheme for Shaders.
Style(Renderer inRenderer)
          Constructs a new style with the given Renderer (if null is specified, then no renderer is used), and a MonoShader with the default color scheme for Shaders.
Style(Renderer inRenderer, Shader inShader)
          Constructs a new style with the given Renderer (if null is specified, then no renderer is used), and the given shader (if null is specified then a mono shader is used with the default color scheme for mono shaders).
 
Method Summary
 void add(Labeler inLabeler)
          Add a labeler to this layer.
 void add(Renderer inRenderer)
          Add a renderer to this shape.
 void beginDraw()
          Calls the beginDraw() method on the renderers.
 void beginLabel()
          Calls the beginLabel() method on the labelers.
 void drawHighlight(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter)
          Function called when a shape is to be drawn.
 void drawLabel(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter)
          Function called when a shape is to be drawn.
 void drawShape(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter)
          Function called when a shape is to be drawn.
 void drawShape(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter, boolean inTop)
          Function called when a shape is to be drawn, boolean if the top shader should be used.
 void endDraw()
          Calls the endDraw() method on the renderers.
 void endLabel()
          Calls the endLabel() method on the labelers.
 Labeler getLabeler(int inIndex)
          Retrieve the labeler at the given index
 Node getNode()
          Retrieve the configuration information for this style
 int getNumLabelers()
          Return the number of labelers
 int getNumRenderers()
          Return the number of renderers
 Renderer getRenderer(int inIndex)
          Retrieve the renderer at the given index
 Shader getShader()
          Get the shader to use with this style.
 java.lang.String getStyleName()
          Get the name of this style.
 java.lang.String getStyleTitle()
          Get the title of this style.
 Shader getTopShader()
          Get the shader to use with this style.
 void remove(Labeler inLabeler)
          Remove a labeler from this shape
 void remove(Renderer inRenderer)
          Remove a renderer from this shape
 void removeAllLabelers()
          Remove all the labelers from this Style.
 void removeAllRenderers()
          Remove all the renderers from this Style.
 void setLabeler(int inIndex, Labeler inLabeler)
          Set the labeler
 void setNode(Node inNode)
          Set the configuration information for this style
 void setRenderer(int inIndex, Renderer inRenderer)
          Set the Renderer
 void setShader(Shader newShader)
          Set the shader to use with this style.
 void setStyleName(java.lang.String inStyleName)
          Set the name of this style.
 void setStyleTitle(java.lang.String inStyleTitle)
          Set the title of this style.
 void setTopShader(Shader newTopShader)
          Set the shader to use with this style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Style

public Style()
Constructs a new style with a single Feature Renderer, and a MonoShader with the default color scheme for Shaders.


Style

public Style(Renderer inRenderer)
Constructs a new style with the given Renderer (if null is specified, then no renderer is used), and a MonoShader with the default color scheme for Shaders.


Style

public Style(Renderer inRenderer,
             Shader inShader)
Constructs a new style with the given Renderer (if null is specified, then no renderer is used), and the given shader (if null is specified then a mono shader is used with the default color scheme for mono shaders).

Method Detail

setStyleName

public void setStyleName(java.lang.String inStyleName)
Set the name of this style.


getStyleName

public java.lang.String getStyleName()
Get the name of this style.


setStyleTitle

public void setStyleTitle(java.lang.String inStyleTitle)
Set the title of this style.


getStyleTitle

public java.lang.String getStyleTitle()
Get the title of this style.


add

public void add(Renderer inRenderer)
Add a renderer to this shape.


remove

public void remove(Renderer inRenderer)
Remove a renderer from this shape


getNumRenderers

public int getNumRenderers()
Return the number of renderers


setRenderer

public void setRenderer(int inIndex,
                        Renderer inRenderer)
Set the Renderer


getRenderer

public Renderer getRenderer(int inIndex)
Retrieve the renderer at the given index


removeAllRenderers

public void removeAllRenderers()
Remove all the renderers from this Style.


add

public void add(Labeler inLabeler)
Add a labeler to this layer.


remove

public void remove(Labeler inLabeler)
Remove a labeler from this shape


getNumLabelers

public int getNumLabelers()
Return the number of labelers


setLabeler

public void setLabeler(int inIndex,
                       Labeler inLabeler)
Set the labeler


getLabeler

public Labeler getLabeler(int inIndex)
Retrieve the labeler at the given index


removeAllLabelers

public void removeAllLabelers()
Remove all the labelers from this Style.


getShader

public Shader getShader()
Get the shader to use with this style. The shader will determine the colors to use, and the pen to use.


setShader

public void setShader(Shader newShader)
Set the shader to use with this style. The shader will determine the colors to use, and the pen to use.


getTopShader

public Shader getTopShader()
Get the shader to use with this style. The shader will determine the colors to use, and the pen to use, draws over the regular shader.


setTopShader

public void setTopShader(Shader newTopShader)
Set the shader to use with this style. The shader will determine the colors to use, and the pen to use, draws over the regular shader.


drawHighlight

public void drawHighlight(Record inRecord,
                          java.awt.Graphics inGraphics,
                          Converter inConverter)
Function called when a shape is to be drawn.


drawLabel

public void drawLabel(Record inRecord,
                      java.awt.Graphics inGraphics,
                      Converter inConverter)
Function called when a shape is to be drawn.


drawShape

public void drawShape(Record inRecord,
                      java.awt.Graphics inGraphics,
                      Converter inConverter)
Function called when a shape is to be drawn.


drawShape

public void drawShape(Record inRecord,
                      java.awt.Graphics inGraphics,
                      Converter inConverter,
                      boolean inTop)
Function called when a shape is to be drawn, boolean if the top shader should be used.


getNode

public Node getNode()
Retrieve the configuration information for this style


setNode

public void setNode(Node inNode)
             throws java.lang.Exception
Set the configuration information for this style

Throws:
java.lang.Exception

beginDraw

public void beginDraw()
Calls the beginDraw() method on the renderers.


endDraw

public void endDraw()
Calls the endDraw() method on the renderers.


beginLabel

public void beginLabel()
Calls the beginLabel() method on the labelers.


endLabel

public void endLabel()
Calls the endLabel() method on the labelers.