Class TLspLabelStyler.Builder
- Enclosing class:
TLspLabelStyler
- Since:
- 2012.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalgorithm
(ILspLabelingAlgorithm aAlgorithm) Specifies the labeling algorithm to be used for the label(s).algorithm
(ILspLabelingAlgorithmProvider aAlgorithmProvider) Specifies the labeling algorithm provider to be used for the label(s).all
(TLspLabelStyler aLabelStyler) Copies all properties from the given styler.build()
Builds the static label styler.customizableStyles
(TLspCustomizableStyle... aStyles) Specifies a list of styles to be applied to all objects.Specifies the declutter group the label(s) should be in.locations
(int aShift, TLspLabelLocationProvider.Location... aLocations) Specifies a set of fixed locations to be used for the label(s).locations
(TLspLabelLocationProvider.Location... aLocations) Specifies a set of fixed locations to be used for the label(s).priority
(int aPriority) Specifies a fixed priority for the label(s).priority
(ILspLabelPriorityProvider aPriorityProvider) Specifies a priority provider for the label(s).styler
(ILspStyler aDelegateStyler) Sets a delegate styler.Specifies a list of styles to be applied to all objects.
-
Constructor Details
-
Builder
public Builder()Default constructor.
-
-
Method Details
-
group
Specifies the declutter group the label(s) should be in.By default,
DEFAULT_DECLUTTER_GROUP
is used.- Parameters:
aGroupID
- The desired declutter group.- Returns:
- this builder.
- See Also:
-
priority
Specifies a fixed priority for the label(s).By default, labels have priority
Integer.MAX_VALUE
, low priority.You can only call this method or
priority(ILspLabelPriorityProvider)
once, not both.- Parameters:
aPriority
- The desired priority, 0 being highest priority.- Returns:
- this builder.
-
priority
Specifies a priority provider for the label(s).By default, labels have priority
Integer.MAX_VALUE
, low priority.You can only use
priority(int)
or this method once, not both.- Parameters:
aPriorityProvider
- The priority provider that can specify priorities.- Returns:
- this builder.
-
locations
public TLspLabelStyler.Builder locations(int aShift, TLspLabelLocationProvider.Location... aLocations) Specifies a set of fixed locations to be used for the label(s).You can only use this method or
algorithm
once, never more.- Parameters:
aShift
- the amount of pixels the labels must be removed from the object anchor point.aLocations
- a list of possible locations to place the labels.- Returns:
- this builder.
-
locations
Specifies a set of fixed locations to be used for the label(s).You can only use one
locations
oralgorithm
call, never more.- Parameters:
aLocations
- a list of possible locations to place the labels.- Returns:
- this builder.
-
algorithm
Specifies the labeling algorithm to be used for the label(s).You can call either
locations
or this method, never more.- Parameters:
aAlgorithm
- The algorithm to be used.- Returns:
- this builder.
-
algorithm
Specifies the labeling algorithm provider to be used for the label(s).You can only use one
locations
oralgorithm
call, never more.- Parameters:
aAlgorithmProvider
- The algorithm provider to be used.- Returns:
- this builder.
-
styler
Sets a delegate styler.This styler will be called for all objects.
You can only call this method or
styles
, never both.- Parameters:
aDelegateStyler
- the delegate styler.- Returns:
- this builder.
-
styles
Specifies a list of styles to be applied to all objects.You can only call
styler
or this method, never both.Note that
getStyles()
returns these styles, wrapped with aTLspCustomizableStyle
.- Parameters:
aStyles
- The styles to apply.- Returns:
- this builder.
-
customizableStyles
Specifies a list of styles to be applied to all objects.- Parameters:
aStyles
- The styles to apply.- Returns:
- this builder.
-
all
Copies all properties from the given styler.- Parameters:
aLabelStyler
- the styler to copy- Returns:
this
-
build
Builds the static label styler.- Returns:
- the static label styler using the set parameters.
-