public static class TLspLabelStyler.Builder extends Object
Constructor and Description |
---|
Builder()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
TLspLabelStyler.Builder |
algorithm(ILspLabelingAlgorithm aAlgorithm)
Specifies the labeling algorithm to be used for the label(s).
|
TLspLabelStyler.Builder |
algorithm(ILspLabelingAlgorithmProvider aAlgorithmProvider)
Specifies the labeling algorithm provider to be used for the label(s).
|
TLspLabelStyler.Builder |
all(TLspLabelStyler aLabelStyler)
Copies all properties from the given styler.
|
TLspLabelStyler |
build()
Builds the static label styler.
|
TLspLabelStyler.Builder |
customizableStyles(TLspCustomizableStyle... aStyles)
Specifies a list of styles to be applied to all objects.
|
TLspLabelStyler.Builder |
group(String aGroupID)
Specifies the declutter group the label(s) should be in.
|
TLspLabelStyler.Builder |
locations(int aShift,
TLspLabelLocationProvider.Location... aLocations)
Specifies a set of fixed locations to be used for the label(s).
|
TLspLabelStyler.Builder |
locations(TLspLabelLocationProvider.Location... aLocations)
Specifies a set of fixed locations to be used for the label(s).
|
TLspLabelStyler.Builder |
priority(ILspLabelPriorityProvider aPriorityProvider)
Specifies a priority provider for the label(s).
|
TLspLabelStyler.Builder |
priority(int aPriority)
Specifies a fixed priority for the label(s).
|
TLspLabelStyler.Builder |
styler(ILspStyler aDelegateStyler)
Sets a delegate styler.
|
TLspLabelStyler.Builder |
styles(ALspStyle... aStyles)
Specifies a list of styles to be applied to all objects.
|
public TLspLabelStyler.Builder group(String aGroupID)
By default, DEFAULT_DECLUTTER_GROUP
is used.
aGroupID
- The desired declutter group.TLspLabelPlacer
public TLspLabelStyler.Builder priority(int aPriority)
By default, labels have priority Integer.MAX_VALUE
, low priority.
You can only call this method or priority(ILspLabelPriorityProvider)
once, not both.
aPriority
- The desired priority, 0 being highest priority.public TLspLabelStyler.Builder priority(ILspLabelPriorityProvider aPriorityProvider)
By default, labels have priority Integer.MAX_VALUE
, low priority.
You can only use priority(int)
or this method once, not both.
aPriorityProvider
- The priority provider that can specify priorities.public TLspLabelStyler.Builder locations(int aShift, TLspLabelLocationProvider.Location... aLocations)
You can only use this method or algorithm
once, never more.
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.public TLspLabelStyler.Builder locations(TLspLabelLocationProvider.Location... aLocations)
You can only use one
locations
or algorithm
call, never more.
aLocations
- a list of possible locations to place the labels.public TLspLabelStyler.Builder algorithm(ILspLabelingAlgorithm aAlgorithm)
You can call either locations
or this method, never more.
aAlgorithm
- The algorithm to be used.public TLspLabelStyler.Builder algorithm(ILspLabelingAlgorithmProvider aAlgorithmProvider)
You can only use
one locations
or algorithm
call, never more.
aAlgorithmProvider
- The algorithm provider to be used.public TLspLabelStyler.Builder styler(ILspStyler aDelegateStyler)
This styler will be called for all objects.
You can only
call this method or styles
, never both.
aDelegateStyler
- the delegate styler.public TLspLabelStyler.Builder styles(ALspStyle... aStyles)
You can only call styler
or this method, never both.
Note that getStyles()
returns
these styles, wrapped with a TLspCustomizableStyle
.
aStyles
- The styles to apply.public TLspLabelStyler.Builder customizableStyles(TLspCustomizableStyle... aStyles)
aStyles
- The styles to apply.public TLspLabelStyler.Builder all(TLspLabelStyler aLabelStyler)
aLabelStyler
- the styler to copythis
public TLspLabelStyler build()