public static class TLcdMGRSGridStyle.Builder<B extends TLcdMGRSGridStyle.Builder<B>> extends Object
Modifier and Type | Method and Description |
---|---|
B |
all(TLcdMGRSGridStyle aMGRSStyle)
Sets all parameters on the builder based on the given MGRS style.
|
B |
body()
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid lines. |
B |
body(TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid lines of the
given level. |
B |
body(TLcdMGRSGridStyle.MGRSType aMgrsType)
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid lines of the
given type (UTM or UPS). |
B |
body(TLcdMGRSGridStyle.MGRSType aMgrsType,
TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid lines of the
given type/level combination. |
TLcdMGRSGridStyle |
build()
Creates a new
TLcdMGRSGridStyle from this builder. |
B |
defaultMGRSGridStyle()
Creates a new default style with MGRS labels.
|
B |
defaultUtmUpsGridStyle()
Creates a new default style with UTM/UPS labels.
|
B |
font(Font aFont)
This method specifies the font to use for the current MGRS type/level/interval
combination.
|
B |
format(String aCoordinatePattern)
This method specifies the format pattern to use for the labels of the current MGRS
type/level/interval combination.
|
B |
interval(double aMin,
double aMax)
After calling this method, all subsequent
lineColor() ,
labelColor() , ... calls will only apply to the given scale interval. |
B |
label()
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid labels. |
B |
label(TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid labels of the
given level. |
B |
label(TLcdMGRSGridStyle.MGRSType aMgrsType)
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid labels of the
given type (UTM or UPS). |
B |
label(TLcdMGRSGridStyle.MGRSType aMgrsType,
TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will apply to all grid labels of the
given type/level combination. |
B |
labelAntiAliasing(boolean aAntiAliasing)
This method specifies whether to use anti-aliasing during the painting of grid labels.
|
B |
labelColor(Color aTextColor)
This method specifies the text color to use for the current MGRS type/level/interval
combination.
|
B |
labelHaloColor(Color aLabelHaloColor)
This method specifies the label halo color to use for the current MGRS type/level/interval
combination.
|
B |
labelHaloThickness(int aLabelHaloThickness)
This method specifies the label halo thickness to use for the current MGRS type/level/interval
combination.
|
B |
lineAntiAliasing(boolean aAntiAliasing)
This method specifies whether to use anti-aliasing during the painting of grid lines.
|
B |
lineColor(Color aLineColor)
This method specifies the line color to use for the current MGRS type/level/interval
combination.
|
B |
lineWidth(double aLineWidth)
This method specifies the line width to use for the current MGRS type/level/interval
combination.
|
B |
overlay()
After calling this method, all subsequent
interval() , lineColor() ,
labelColor() , ... calls will only apply to all overlay
labels. |
public B defaultMGRSGridStyle()
public B defaultUtmUpsGridStyle()
public B body()
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid lines.
This includes UTM as well as UPS, and all grid levels.
For an example of how to use this method, see TLcdMGRSGridStyle
.public B body(TLcdMGRSGridStyle.MGRSType aMgrsType)
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid lines of the
given type (UTM or UPS).
For an example of how to use this method, see TLcdMGRSGridStyle
.aMgrsType
- the MGRS type (UPS or UTM)public B body(TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid lines of the
given level. For example, to all UTM 100K lines, and to all UPS 100K lines.
For an example of how to use this method, see TLcdMGRSGridStyle
.aMGRSLevel
- the MGRS levelpublic B body(TLcdMGRSGridStyle.MGRSType aMgrsType, TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid lines of the
given type/level combination. For example, to all UTM 100K lines.
For an example of how to use this method, see TLcdMGRSGridStyle
.aMgrsType
- the MGRS type (UTM or UPS)aMGRSLevel
- the MGRS levelpublic B label()
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid labels.
This includes UTM as well as UPS, and all grid levels.
For an example of how to use this method, see TLcdMGRSGridStyle
.public B label(TLcdMGRSGridStyle.MGRSType aMgrsType)
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid labels of the
given type (UTM or UPS).
For an example of how to use this method, see TLcdMGRSGridStyle
.aMgrsType
- the MGRS type (UPS or UTM)public B label(TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid labels of the
given level. For example, to all UTM 100K labels, and to all UPS 100K labels.
For an example of how to use this method, see TLcdMGRSGridStyle
.aMGRSLevel
- the MGRS levelpublic B label(TLcdMGRSGridStyle.MGRSType aMgrsType, TLcdMGRSGridStyle.MGRSLevel aMGRSLevel)
interval()
, lineColor()
,
labelColor()
, ... calls will apply to all grid labels of the
given type/level combination. For example, to all UTM 100K labels.
For an example of how to use this method, see TLcdMGRSGridStyle
.aMgrsType
- the MGRS type (UTM or UPS)aMGRSLevel
- the MGRS levelpublic B overlay()
interval()
, lineColor()
,
labelColor()
, ... calls will only apply to all overlay
labels. See also TLcdMGRSGridOverlayLabelBuilder
.
For an example of how to use this method, see TLcdMGRSGridStyle
.public B interval(double aMin, double aMax)
lineColor()
,
labelColor()
, ... calls will only apply to the given scale interval. It is possible
to define multiple scale intervals for every line or label type/level. In order to do this,
the interval method (and its subsequent calls) can be called multiple times.
When not calling this method after calling one of the body
or label
methods, an interval from 0
(completely zoomed out) to Double.MAX_VALUE
(completely zoomed in ) is used. So if you
want to use the same styles for every scale, this method should not be called.
When specifying overlapping intervals, it's not specified, which styles will be used. It
is advised to only specify non-overlapping intervals for the same
(mgrs type/level/body or label) combination.
For an example of how to use this method, see TLcdMGRSGridStyle
.aMin
- the minimum scaleaMax
- the maximum scalepublic B lineWidth(double aLineWidth)
TLcdMGRSGridStyle
.
This method should be called at least once after calling one of the body
or
interval
methods. Otherwise, default styling is used.aLineWidth
- the line width to use.public B lineColor(Color aLineColor)
TLcdMGRSGridStyle
.
This method should be called at least once after calling one of the body
or
interval
methods. Otherwise, default styling is used.aLineColor
- the line color to use.public B font(Font aFont)
TLcdMGRSGridStyle
.
This method should be called at least once after calling one of the label
or
interval
methods. Otherwise, a default font is used.aFont
- the font to use.public B labelColor(Color aTextColor)
TLcdMGRSGridStyle
.
This method should be called at least once after calling one of the label
or
interval
methods. Otherwise, a default text color is used.aTextColor
- the text color to use.public B labelHaloColor(Color aLabelHaloColor)
TLcdMGRSGridStyle
.
This method should be called at least once after calling one of the label
or
interval
methods. Otherwise, default styling is used.aLabelHaloColor
- the halo color to use for the label text.labelHaloThickness(int)
public B labelHaloThickness(int aLabelHaloThickness)
TLcdMGRSGridStyle
.
This method should be called at least once after calling one of the label
or
interval
methods. Otherwise, a default label halo thickness is used.aLabelHaloThickness
- the halo thickness to use for the label text.labelHaloColor(java.awt.Color)
public B lineAntiAliasing(boolean aAntiAliasing)
true
.aAntiAliasing
- true
to enable anti-aliasing when painting grid lines.public B labelAntiAliasing(boolean aAntiAliasing)
true
.aAntiAliasing
- true
to enable anti-aliasing when painting grid labels.public B format(String aCoordinatePattern)
[]
brackets are optional,
expressions enclosed in {}
brackets may be omitted or repeated):
<pattern> ::= [<zone>] [<separator> <band>] [<coordinates>] <zone> ::= "Z" <band> ::= "B" <coordinates> ::= <mgrs_coordinates> | <utm_coordinates> <mgrs_coordinates> ::= [<separator> <id100k>] [<separator> <x> <separator> <y>] <utm_coordinates> ::= [<separator> <u> <separator> <v>] <id100k> ::= "S" <x> ::= "X" <mgrs_precision> <y> ::= "Y" <mgrs_precision> <mgrs_precision> ::= "0" | "1" | "2" | "3" | "4" | "5" <u> ::= "U" <utm_precision> <v> ::= "V" <utm_precision> <utm_precision> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" <separator> ::= { ? any character ? }For example:
"12345"
or "1234"
is displayed).aCoordinatePattern
- the pattern used to format the label textpublic B all(TLcdMGRSGridStyle aMGRSStyle)
aMGRSStyle
- the MGRS style to copypublic TLcdMGRSGridStyle build()
TLcdMGRSGridStyle
from this builder.TLcdMGRSGridStyle