gistoolkit.display.shader.stroke
Class RailRoadStroke

java.lang.Object
  extended bygistoolkit.display.shader.stroke.RailRoadStroke
All Implemented Interfaces:
java.awt.Stroke

public class RailRoadStroke
extends java.lang.Object
implements java.awt.Stroke

A class to implement the railroad stroking of lines that is often desired in maps. This class draws a line as a single line, with cross bars to represent the railroad ties.


Field Summary
(package private)  float myLineWidth
          The width of the "line" that is to be used as the single rail of the rail road.
(package private)  float myTieWidth
          The width of the railroad ties.
 
Constructor Summary
RailRoadStroke(float inLineWidth, float inTieWidth)
          Creates a new instance of RailRoadStroke, the inLineWidth is the thickness of the line, the inTieWidth is the Length of the ties of the rail road.
RailRoadStroke(float inLineWidth, float inTieWidth, boolean inTwoLine)
          Creates a new instance of RailRoadStroke, the inLineWidth is the thickness of the line, the inTieWidth is the Length of the ties of the rail road.
RailRoadStroke(float inLineWidth, float inTieWidth, float[] inTieDashArray, boolean inTwoLine)
          Creates a new instance of RailRoadStroke, the inLineWidth is the thickness of the line, the inTieWidth is the Length of the ties of the rail road.
 
Method Summary
 java.awt.Shape createStrokedShape(java.awt.Shape shape)
           
 float[] getDashArray()
           
 float getLineWidth()
          Return the width of the "Line" that is to be used as the single rail of the rail road.
 float getTieWidth()
          The width of the railroad ties.
 boolean getTwoLine()
          Use two lines the same distance apart as the continuious lines of the rail road.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myTieWidth

float myTieWidth
The width of the railroad ties. These are the lines that stick out beyond the ends of the actual rails.


myLineWidth

float myLineWidth
The width of the "line" that is to be used as the single rail of the rail road.

Constructor Detail

RailRoadStroke

public RailRoadStroke(float inLineWidth,
                      float inTieWidth)
Creates a new instance of RailRoadStroke, the inLineWidth is the thickness of the line, the inTieWidth is the Length of the ties of the rail road.


RailRoadStroke

public RailRoadStroke(float inLineWidth,
                      float inTieWidth,
                      boolean inTwoLine)
Creates a new instance of RailRoadStroke, the inLineWidth is the thickness of the line, the inTieWidth is the Length of the ties of the rail road.


RailRoadStroke

public RailRoadStroke(float inLineWidth,
                      float inTieWidth,
                      float[] inTieDashArray,
                      boolean inTwoLine)
Creates a new instance of RailRoadStroke, the inLineWidth is the thickness of the line, the inTieWidth is the Length of the ties of the rail road. The Dash array describes the pattern of "ties" in the railroad.

Method Detail

getTwoLine

public boolean getTwoLine()
Use two lines the same distance apart as the continuious lines of the rail road.


getTieWidth

public float getTieWidth()
The width of the railroad ties. These are the lines that stick out beyond the ends of the actual rails.


getLineWidth

public float getLineWidth()
Return the width of the "Line" that is to be used as the single rail of the rail road.


getDashArray

public float[] getDashArray()

createStrokedShape

public java.awt.Shape createStrokedShape(java.awt.Shape shape)
Specified by:
createStrokedShape in interface java.awt.Stroke