class ScaleBarItem extends Item
Adds scale bar to a cartographic document.
Modifiers | Name | Description |
---|---|---|
static class |
ScaleBarItem.ScaleBarInfo |
|
static enum |
ScaleBarItem.Units |
Type | Name and description |
---|---|
java.awt.Color |
barStrokeColor |
float |
barStrokeWidth |
int |
border |
java.awt.Color |
fillColor |
java.awt.Font |
font |
Map |
map |
java.awt.Color |
strokeColor |
float |
strokeWidth |
java.awt.Color |
textColor |
ScaleBarItem.Units |
units |
Constructor and description |
---|
ScaleBarItem(int x, int y, int width, int height) Create a scale bar from the top left with the given width and height. |
Type Params | Return Type | Name and description |
---|---|---|
|
ScaleBarItem |
barStrokeColor(java.awt.Color strokeColor) Set the bar stroke Color |
|
ScaleBarItem |
barStrokeWidth(float strokeWidth) Set the bar stroke width |
|
ScaleBarItem |
border(int border) Set the border padding |
|
ScaleBarItem.ScaleBarInfo |
calculateScaleBarInfo() Calculate the scale bar information |
|
ScaleBarItem |
fillColor(java.awt.Color fillColor) Set the fill Color |
|
ScaleBarItem |
font(java.awt.Font font) Set the Font |
|
ScaleBarItem |
map(Map map) Set the Map to use when calculating the map scale |
|
ScaleBarItem |
strokeColor(java.awt.Color strokeColor) Set stroke Color |
|
ScaleBarItem |
strokeWidth(float strokeWidth) Set the stroke width |
|
ScaleBarItem |
textColor(java.awt.Color color) Set the text Color |
|
ScaleBarItem |
units(ScaleBarItem.Units units) Set the Units (US or METRIC) to use |
Methods inherited from class | Name |
---|---|
class Item |
getRectangle |
Create a scale bar from the top left with the given width and height.
x
- The number of pixels from the lefty
- The number of pixels from the topwidth
- The width in pixelsheight
- The height in pixelsSet the bar stroke Color
strokeColor
- The bar stroke ColorSet the bar stroke width
strokeWidth
- The bar stroke widthSet the border padding
border
- The border paddingCalculate the scale bar information
Set the fill Color
fillColor
- The fill ColorSet the Font
font
- The FontSet the Map to use when calculating the map scale
map
- The MapSet stroke Color
strokeColor
- The stroke ColorSet the stroke width
strokeWidth
- The stroke widthSet the text Color
color
- The text ColorSet the Units (US or METRIC) to use
units
- Units (US or METRIC)Groovy Documentation