gistoolkit.display.shader
Class RandomShader

java.lang.Object
  extended bygistoolkit.display.shader.SimpleShader
      extended bygistoolkit.display.shader.RandomShader
All Implemented Interfaces:
EditableShader, Shader

public class RandomShader
extends SimpleShader
implements EditableShader

A shader that will always return the same color regardless of what values are sent in.


Constructor Summary
RandomShader()
          Creates a new Random Shader with a Red Highlight Color, and a black label and line color.
RandomShader(java.awt.Color inColor)
          Creates a new Random Shader with this default line color.
RandomShader(java.awt.Color inLineColor, java.awt.Color inHighlightColor)
          Creates a new Random Shader with this default line color, and highlight color.
 
Method Summary
 java.awt.Color[] getColors()
           
 java.lang.String getColumnName()
          Get the name of the column to shade by
 ShaderPanel getEditPanel()
          return the panel needed to edit this shader
 java.awt.Graphics getFillGraphics(java.awt.Graphics inGraphics, java.lang.Object[] inAttributes, java.lang.String[] inNames)
          Set up the graphics context for the drawing of lines.
 java.awt.image.BufferedImage getLegend()
          Generate a legend from this shader.
 Node getNode()
          Get the configuration information for this shader
 java.lang.String[] getValues()
           
 void load(java.util.Properties inProperties)
          Read the properties for the initialization of the rendere from the properties sent in.
 void setAuxilliaryColors(java.lang.String[] inValues, java.awt.Color[] inColors)
          Set the values and the associated colors, null colors will be assigned a random color.
 void setColors(java.lang.String[] inValues, java.awt.Color[] inColors)
          Set the values and the associated colors, null colors will be assigned a random color.
 void setColumnName(java.lang.String inColumnName)
          Set the name of the column to shade by
 void setNode(Node inNode)
          Set the configuration information into this shader.
 
Methods inherited from class gistoolkit.display.shader.SimpleShader
getAlpha, getDashArrayFromString, getDefaultAlphaComposite, getDefaultFillColor, getDefaultFont, getDefaultHighlightColor, getDefaultLabelColor, getDefaultLineColor, getDescription, getEditDialog, getFillHighlightGraphics, getLabelGraphics, getLabelHighlightGraphics, getLineGraphics, getLineHighlightGraphics, getName, getNodeFromStroke, getStringFromDashArray, getStroke, getStrokeFromNode, setAlpha, setDefaultFillColor, setDefaultFont, setDefaultHighlightColor, setDefaultLabelColor, setDefaultLineColor, setName, setStroke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomShader

public RandomShader()
Creates a new Random Shader with a Red Highlight Color, and a black label and line color.


RandomShader

public RandomShader(java.awt.Color inColor)
Creates a new Random Shader with this default line color.


RandomShader

public RandomShader(java.awt.Color inLineColor,
                    java.awt.Color inHighlightColor)
Creates a new Random Shader with this default line color, and highlight color.

Method Detail

getColumnName

public java.lang.String getColumnName()
Get the name of the column to shade by

Overrides:
getColumnName in class SimpleShader

setColumnName

public void setColumnName(java.lang.String inColumnName)
Set the name of the column to shade by

Overrides:
setColumnName in class SimpleShader

setColors

public void setColors(java.lang.String[] inValues,
                      java.awt.Color[] inColors)
Set the values and the associated colors, null colors will be assigned a random color.


setAuxilliaryColors

public void setAuxilliaryColors(java.lang.String[] inValues,
                                java.awt.Color[] inColors)
Set the values and the associated colors, null colors will be assigned a random color.


getValues

public java.lang.String[] getValues()

getColors

public java.awt.Color[] getColors()

getNode

public Node getNode()
Description copied from class: SimpleShader
Get the configuration information for this shader

Specified by:
getNode in interface Shader
Overrides:
getNode in class SimpleShader

setNode

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

Specified by:
setNode in interface Shader
Overrides:
setNode in class SimpleShader
Throws:
java.lang.Exception

load

public void load(java.util.Properties inProperties)
          throws java.lang.Exception
Read the properties for the initialization of the rendere from the properties sent in.

Specified by:
load in interface Shader
Overrides:
load in class SimpleShader
Throws:
java.lang.Exception

getLegend

public java.awt.image.BufferedImage getLegend()
Generate a legend from this shader. Currently just returns null.

Specified by:
getLegend in interface Shader
Overrides:
getLegend in class SimpleShader

getFillGraphics

public java.awt.Graphics getFillGraphics(java.awt.Graphics inGraphics,
                                         java.lang.Object[] inAttributes,
                                         java.lang.String[] inNames)
Set up the graphics context for the drawing of lines. Always return the graphics context sent in after modifying it for filling of polygons.

Specified by:
getFillGraphics in interface Shader
Overrides:
getFillGraphics in class SimpleShader

getEditPanel

public ShaderPanel getEditPanel()
return the panel needed to edit this shader

Specified by:
getEditPanel in interface EditableShader