| java.lang.Object org.deegree.graphics.DefaultScaleBar
DefaultScaleBar | public class DefaultScaleBar implements ScaleBar(Code) | | author: Andreas Poth author: last edited by: $Author: apoth $ version: $Revision: 9340 $, $Date: 2007-12-27 04:32:12 -0800 (Thu, 27 Dec 2007) $ |
Constructor Summary | |
public | DefaultScaleBar(int topLabel, int bottomLabel, double scale, double scaleDenominator, String units, Color labelColor, Color barColor, Color allgColor, String barStyle, Font barFont, NumberFormat numberFormat) Constructor with all Parameters
Parameters: topLabel - type of the label on top of the scale bar. | public | DefaultScaleBar() |
DefaultScaleBar | public DefaultScaleBar(int topLabel, int bottomLabel, double scale, double scaleDenominator, String units, Color labelColor, Color barColor, Color allgColor, String barStyle, Font barFont, NumberFormat numberFormat)(Code) | | Constructor with all Parameters
Parameters: topLabel - type of the label on top of the scale bar. Chose L_NONE or no label, L_SCALE forscale on top and L_SCALEDENOMIATOR for scaledenominator on top. Parameters: bottomLabel - the same as above but below the scalebar. Parameters: scale - the scale to be displayed. For a value of e.g. 1000 there will be 1:1000 displayed Parameters: scaleDenominator - the scaledenominator to be displayed Parameters: units - the units the scaledenominator is in. Possible values are inch, Meter, Mile,Kilometer... Parameters: labelColor - the Color the label has to be in (and of course the text below and above) Parameters: barColor - Parameters: allgColor - not used so far Parameters: barStyle - the style the bar appears in. Currently just "default" is supported. Parameters: barFont - the font the text above and below the scale bar appears in. Parameters: numberFormat - |
DefaultScaleBar | public DefaultScaleBar()(Code) | | Constructor just using defaults
|
paint | public void paint(Graphics g)(Code) | | will paint the scale bar to the passed graphic context
Parameters: g - graphic context |
setBackgroundColor | public void setBackgroundColor(Color color)(Code) | | |
setBarColor | public void setBarColor(Color color)(Code) | | sets the bar color of the scale bar
Parameters: color - |
setBottomLabel | public void setBottomLabel(int labelType)(Code) | | sets the type of the label below the scale bar
Parameters: labelType - lable type |
setColor | public void setColor(Color color)(Code) | | sets the front color of the scale bar
Parameters: color - |
setFont | public void setFont(Font font)(Code) | | sets the font for label rendering
Parameters: font - awt font object |
setLabelColor | public void setLabelColor(Color color)(Code) | | sets the label color of the scale bar
Parameters: color - |
setNumberFormat | public void setNumberFormat(NumberFormat numberFormat)(Code) | | sets the number format for a scale bar
Parameters: numberFormat - |
setScale | public void setScale(double scale)(Code) | | 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 | public void setScaleDenominator(double scaleDen)(Code) | | 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 |
setStyle | public void setStyle(String style)(Code) | | sets the style of the scale bar. default style is |--------| the list of known styles depends
on the implementation
Parameters: style - style name |
setTopLabel | public void setTopLabel(int labelType)(Code) | | sets the type of the label above the scale bar
Parameters: labelType - lable type |
setUnits | public void setUnits(String units)(Code) | | 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.) |
|
|