|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.display.scalebar.SimpleScaleBar
Class to display a scale bar on the map.
Field Summary | |
static int |
LOWER_LEFT
The lower left quadrant of the screen. |
static int |
LOWER_RIGHT
the lower right quadrant of the screen. |
static int |
UPPER_LEFT
The upper left quadrant of the screen. |
static int |
UPPER_RIGHT
The upper right quadrant of the screen. |
Constructor Summary | |
SimpleScaleBar()
Creates a new instance of ScaleBar |
Method Summary | |
abstract void |
drawScale(java.awt.Graphics inGraphics,
Converter inConverter,
int inWidth,
int inHeight)
Method to draw a scale bar on the graphics context. |
float |
getAlpha()
Retrieve the alpha of the shape 0 is clear, 1 is opaque. |
java.awt.Rectangle |
getAvailableSize(int inScreenWidth,
int inScreenHeight)
Get the available width of the Scale bar |
protected java.awt.AlphaComposite |
getDefaultAlphaComposite()
Return the default alpha composite |
java.awt.Font |
getDefaultFont()
Get the font to be used when writing labels |
java.awt.Color |
getDefaultLabelColor()
Retrieve the default fill color |
java.awt.Color |
getDefaultLineColor()
Retrieve the default fill color |
java.lang.String |
getDescription()
A description to be displayed to the user that indicates what this scale bar does. |
int |
getHorizontalOffset()
Set the offset from the uleft or rightr edge of the screen in pixels. |
java.awt.Graphics |
getLabelGraphics(java.awt.Graphics inGraphics)
Set up the graphics context for the drawing of lines. |
java.awt.Graphics |
getLineGraphics(java.awt.Graphics inGraphics)
Set up the graphics context for the drawing of lines. |
Node |
getNode()
Get the configuration information for this ScaleBar |
int |
getQuadrant()
gets the quadrent UPPER_LEFT, UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT of the screen where the scale bar should be placed. |
float |
getScreenPercent()
get what percent of the screen width this bar should use. |
java.awt.Point |
getStart(int inImageWidth,
int inImageHeight,
int inWidth,
int inHeight)
Return the start point given the width and height. |
java.awt.Stroke |
getStroke()
Return the stroke for this shader. |
int |
getVerticalOffset()
Set the offset from the upper or lower edge of the screen in pixels. |
void |
setAlpha(float inAlpha)
Set the alpha of the shape 0 means clear, 1 means opaque. |
void |
setDefaultFont(java.awt.Font inFont)
Set the font to be used when writing labels |
void |
setDefaultLabelColor(java.awt.Color inColor)
Set the default fill color |
void |
setDefaultLineColor(java.awt.Color inColor)
Set the default fill color |
void |
setHorizontalOffset(int inOffset)
Set the offset from the left or right edge of the screen in pixels. |
void |
setNode(Node inNode)
Set the configuration information for this ScaleBar |
void |
setQuadrant(int inQuadrant)
Sets the quadrent UPPER_LEFT, UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT of the screen where the scale bar should be placed. |
void |
setScreenPercent(float inPercent)
set what percent of the screen width this bar should use. |
void |
setStroke(java.awt.Stroke inStroke)
Sets the stroke for this shader, will not allow null. |
void |
setVerticalOffset(int inOffset)
Set the offset from the upper or lower edge of the screen in pixels. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UPPER_LEFT
public static final int UPPER_RIGHT
public static final int LOWER_LEFT
public static final int LOWER_RIGHT
Constructor Detail |
public SimpleScaleBar()
Method Detail |
public java.lang.String getDescription()
This one returns kilometers, meters, centimters, milimeters, and micrometers
getDescription
in interface ScaleBar
public java.awt.Color getDefaultLineColor()
public void setDefaultLineColor(java.awt.Color inColor)
public java.awt.Color getDefaultLabelColor()
public void setDefaultLabelColor(java.awt.Color inColor)
public java.awt.Font getDefaultFont()
public void setDefaultFont(java.awt.Font inFont)
protected java.awt.AlphaComposite getDefaultAlphaComposite()
public float getAlpha()
public void setAlpha(float inAlpha)
public java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke inStroke)
public void setScreenPercent(float inPercent)
public float getScreenPercent()
public void setHorizontalOffset(int inOffset)
public int getHorizontalOffset()
public void setVerticalOffset(int inOffset)
public int getVerticalOffset()
public void setQuadrant(int inQuadrant)
public int getQuadrant()
public java.awt.Rectangle getAvailableSize(int inScreenWidth, int inScreenHeight)
public java.awt.Point getStart(int inImageWidth, int inImageHeight, int inWidth, int inHeight)
public java.awt.Graphics getLineGraphics(java.awt.Graphics inGraphics)
public java.awt.Graphics getLabelGraphics(java.awt.Graphics inGraphics)
public abstract void drawScale(java.awt.Graphics inGraphics, Converter inConverter, int inWidth, int inHeight)
drawScale
in interface ScaleBar
public Node getNode()
getNode
in interface ScaleBar
public void setNode(Node inNode) throws java.lang.Exception
setNode
in interface ScaleBar
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |