deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics
Interface ScaleBar

All Known Implementing Classes:
DefaultScaleBar

public interface ScaleBar

Version:
$Revision: 18195 $, $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Field Summary
static int L_NONE
          A constant signaling no scale
static int L_SCALE
          the scale
static int L_SCALEDENOMINATOR
          the default scale denominator
 
Method Summary
 void paint(java.awt.Graphics g)
          will paint the scale bar to the passed graphic context
 void setBackgroundColor(java.awt.Color color)
          sets the background color of the scale bar
 void setBarColor(java.awt.Color color)
          sets the front color of the scale bar
 void setBottomLabel(int labelType)
          sets the type of the label below the scale bar
 void setFont(java.awt.Font font)
          sets the font for label rendering
 void setLabelColor(java.awt.Color color)
          sets the label color of the scale bar
 void setNumberFormat(java.text.NumberFormat numberFormat)
          sets the format for scale/scaleDen
 void setScale(double scale)
          sets the scale as defined in the OGC WMS 1.1.1 specification.
 void setScaleDenominator(double scaleDen)
          sets the scale denominator for the scale bar.
 void setStyle(java.lang.String style)
          sets the style of the scale bar. default style is |--------| the list of known styles depends on the implementation
 void setTopLabel(int labelType)
          sets the type of the label above the scale bar
 void setUnits(java.lang.String units)
          sets the units the scale and the scale denominater will be expressed at.
 

Field Detail

L_NONE

static final int L_NONE
A constant signaling no scale

See Also:
Constant Field Values

L_SCALE

static final int L_SCALE
the scale

See Also:
Constant Field Values

L_SCALEDENOMINATOR

static final int L_SCALEDENOMINATOR
the default scale denominator

See Also:
Constant Field Values
Method Detail

paint

void paint(java.awt.Graphics g)
will paint the scale bar to the passed graphic context

Parameters:
g - graphic context

setTopLabel

void setTopLabel(int labelType)
sets the type of the label above the scale bar

Parameters:
labelType - lable type

setBottomLabel

void setBottomLabel(int labelType)
sets the type of the label below the scale bar

Parameters:
labelType - lable type

setScale

void setScale(double scale)
sets the scale as defined in the OGC WMS 1.1.1 specification. Scale is defined as the diagonal size of a pixel in the center of a map measured in meter. The setting of the scale will affect the value of the scale denominator

Parameters:
scale - map scale

setScaleDenominator

void setScaleDenominator(double scaleDen)
sets the scale denominator for the scale bar. The scale denominator is the scale expression as we know it for printed maps (e.g. 1:10000 1:5000). The passed value is expressed in meters. The setting of the scale denominator will affect the value of the scale

Parameters:
scaleDen - scale denominator value

setUnits

void setUnits(java.lang.String units)
sets the units the scale and the scale denominater will be expressed at. Settings other than meter will cause that the passed values for scale and scale denominater will be recalculated for painting. it depends on the implementation what units are supported.

Parameters:
units - name units (meter, miles, feet etc.)

setBarColor

void setBarColor(java.awt.Color color)
sets the front color of the scale bar

Parameters:
color -

setLabelColor

void setLabelColor(java.awt.Color color)
sets the label color of the scale bar

Parameters:
color -

setBackgroundColor

void setBackgroundColor(java.awt.Color color)
sets the background color of the scale bar

Parameters:
color -

setStyle

void setStyle(java.lang.String style)
sets the style of the scale bar. default style is |--------| the list of known styles depends on the implementation

Parameters:
style - style name

setFont

void setFont(java.awt.Font font)
sets the font for label rendering

Parameters:
font - awt font object

setNumberFormat

void setNumberFormat(java.text.NumberFormat numberFormat)
sets the format for scale/scaleDen

Parameters:
numberFormat - a NumberFormat object

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org