TLspPlotLayerBuilder
instead.public class TLspPlotLayerBuilder extends TLspPlotLayerBuilder
You can configure the following aspects using this builder:
model
: see here
for restrictionsplot styles
label styles
mandatory attributes and orientation
scale range
See newBuilder()
for default values.
Example:
ILspLayer layer = TLspPLotLayerBuilder.newBuilder() .model(myModel) .label("Plots") .bodyStyles(REGULAR, TLspPlotStyle.newBuilder()....build() .build()
TLspPlotStyle
,
TLcdExpressionFactory
Modifier and Type | Method and Description |
---|---|
TLspPlotLayerBuilder |
bodyScaleRange(ILcdInterval aScaleRange)
Deprecated.
Sets a scale range within which the objects are displayed.
|
TLspPlotLayerBuilder |
bodyStyler(TLspPaintState aPaintState,
ILspStyler aStyler)
Deprecated.
Sets the styler used for the points in the
BODY paint representation. |
TLspPlotLayerBuilder |
bodyStyles(TLspPaintState aPaintState,
TLspPlotStyle... aStyles)
Deprecated.
Sets a (fixed) set of styles to use in this layer for the
BODY paint representation. |
TLspPlotLayerBuilder |
icon(ILcdIcon aIcon)
Deprecated.
Sets the icon of the layer.
|
TLspPlotLayerBuilder |
label(java.lang.String aLabel)
Deprecated.
Sets the label of the layer.
|
TLspPlotLayerBuilder |
labelEditable(boolean aEditable)
Deprecated.
Sets whether the labels of the layer should be editable.
|
TLspPlotLayerBuilder |
labelEditor(ILspEditor aEditor)
Deprecated.
Sets a custom label editor for the layer, alternatively you can use
TLspPlotLayerBuilder.labelEditable(boolean) to enable a default label editor. |
TLspPlotLayerBuilder |
labelScaleRange(ILcdInterval aScaleRange)
Deprecated.
Sets a scale range within which the objects' labels are displayed.
|
TLspPlotLayerBuilder |
labelStyler(TLspPaintState aPaintState,
ILspStyler aLabelStyler)
Deprecated.
Sets the given label styler for the given paint state.
|
TLspPlotLayerBuilder |
labelStyles(TLspPaintState aPaintState,
ALspStyle... aLabelStyles)
Deprecated.
Sets the given label styles for the given paint state.
|
TLspPlotLayerBuilder |
layerType(ILspLayer.LayerType aLayerType)
Deprecated.
The layer type of plot layers cannot be set.
Sets the layer type of the layer.
|
TLspPlotLayerBuilder |
mandatoryAttributes(ILcdExpression... aMandatoryAttributes)
Deprecated.
Set a list of attributes that should always be loaded, regardless of what is necessary for
styling and filtering.
|
TLspPlotLayerBuilder |
mandatoryOrientation(boolean aOrientationMandatory)
Deprecated.
Indicates that orientation information should always be loaded, regardless of
styling and filtering.
|
TLspPlotLayerBuilder |
model(ILcdModel aModel)
Deprecated.
Sets the model of the layer.
|
static TLspPlotLayerBuilder |
newBuilder()
Deprecated.
Creates a new builder.
|
TLspPlotLayerBuilder |
paintingHints(TLspPlotPaintingHints aPaintingHints)
Deprecated.
|
TLspPlotLayerBuilder |
selectable(boolean aSelectable)
Deprecated.
Specifies whether layers should be selectable.
|
build, layerStyle, paintingHints
getIcon, getLabel, getLayerStyle, getLayerType, getModel
public TLspPlotLayerBuilder layerType(ILspLayer.LayerType aLayerType)
TLspPlotLayerBuilder
ILspLayer.LayerType.EDITABLE
.layerType
in class TLspPlotLayerBuilder
aLayerType
- the layer typeILspLayer.getLayerType()
public TLspPlotLayerBuilder model(ILcdModel aModel)
TLspPlotLayerBuilder
null
.
ILcd2DBoundsIndexedModel
are dynamically/partially loaded and unloaded depending on cache size and visible area.ILcdBounded
.model
in class TLspPlotLayerBuilder
aModel
- a modelILcdLayer.getModel()
public TLspPlotLayerBuilder label(java.lang.String aLabel)
TLspPlotLayerBuilder
null
.label
in class TLspPlotLayerBuilder
aLabel
- the labelILcdLayer.getLabel()
public TLspPlotLayerBuilder icon(ILcdIcon aIcon)
TLspPlotLayerBuilder
null
.icon
in class TLspPlotLayerBuilder
aIcon
- the iconILcdLayer.getIcon()
public TLspPlotLayerBuilder mandatoryAttributes(ILcdExpression... aMandatoryAttributes)
TLspPlotLayerBuilder
Set a list of attributes that should always be loaded, regardless of what is necessary for styling and filtering.
This call is optional. The layer will automatically determine the necessary attributes
based on the expressions inside TLspPlotStyle
.
However, if at runtime a new style is set with other attributes, the layer will have to process the new attributes. To avoid this processing, you can set the super-set of all attributes you may need up front.
mandatoryAttributes
in class TLspPlotLayerBuilder
aMandatoryAttributes
- The set of mandatory attributesTLspPlotLayerBuilder.mandatoryOrientation(boolean)
public TLspPlotLayerBuilder mandatoryOrientation(boolean aOrientationMandatory)
TLspPlotLayerBuilder
Indicates that orientation information should always be loaded, regardless of styling and filtering.
This call is optional. The layer will automatically determine if orientation is necessary
based on the TLspPlotStyle
.
However, if at runtime a new style is set with different orientation settings, the layer will have to process the data again. To avoid this processing, you can set the super-set of all attributes you may need up front.
mandatoryOrientation
in class TLspPlotLayerBuilder
aOrientationMandatory
- Whether the orientation should always be loaded or notTLspPlotLayerBuilder.mandatoryAttributes(com.luciad.util.expression.ILcdExpression...)
public TLspPlotLayerBuilder bodyStyles(TLspPaintState aPaintState, TLspPlotStyle... aStyles)
TLspPlotLayerBuilder
BODY
paint representation.
This method delegates to TLspPlotLayerBuilder.bodyStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
. Call TLspPlotLayerBuilder.bodyStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
with a custom
styler if you need to change styles at runtime after creation.
If not set, a default TLspPlotStyle
is used.
bodyStyles
in class TLspPlotLayerBuilder
aPaintState
- Paint state for this styleraStyles
- The styles to useTLspPlotStyle
public TLspPlotLayerBuilder bodyStyler(TLspPaintState aPaintState, ILspStyler aStyler)
TLspPlotLayerBuilder
BODY
paint representation.
Special considerations:
TLspPlotStyle
.ALspStyleTargetProvider
to extract the actual point geometry out of the domain object. It must return ILcdPoint
objects (that optionally also implement ILcdOriented
).public void style(Collection> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext) { aStyleCollector.objects(aObjects).geometry(fPointExtractor).style(fStyle).submit(); }
If not set, a default TLspPlotStyle
is used.
bodyStyler
in class TLspPlotLayerBuilder
aPaintState
- Paint state for this styleraStyler
- The styler to useTLspPlotLayerBuilder.bodyStyles(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.TLspPlotStyle...)
public TLspPlotLayerBuilder bodyScaleRange(ILcdInterval aScaleRange)
TLspPlotLayerBuilder
If not set, no scale range is used and the layer will always paint itself.
Note that to improve performance you can additionally use TLspPlotStyle.Builder.automaticScaling(double)
.
bodyScaleRange
in class TLspPlotLayerBuilder
aScaleRange
- The scale rangepublic TLspPlotLayerBuilder labelStyler(TLspPaintState aPaintState, ILspStyler aLabelStyler)
TLspPlotLayerBuilder
If you need control over other labeling aspects such as positioning or priorities, use an ALspLabelStyler
.
toString()
). See also TLspDataObjectLabelTextProviderStyle.Use either TLspPlotLayerBuilder.labelStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
or TLspPlotLayerBuilder.labelStyles(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.ALspStyle...)
, not both.
labelStyler
in class TLspPlotLayerBuilder
aPaintState
- the paint state for which to set the label styleraLabelStyler
- the new label styler for the layerthis
public TLspPlotLayerBuilder labelStyles(TLspPaintState aPaintState, ALspStyle... aLabelStyles)
TLspPlotLayerBuilder
toString()
). See also TLspDataObjectLabelTextProviderStyle.Use either TLspPlotLayerBuilder.labelStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
or TLspPlotLayerBuilder.labelStyles(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.ALspStyle...)
, not both.
labelStyles
in class TLspPlotLayerBuilder
aPaintState
- the paint state for which to set the label stylesaLabelStyles
- the new label styles for the layerthis
public TLspPlotLayerBuilder labelScaleRange(ILcdInterval aScaleRange)
TLspPlotLayerBuilder
If not set, no scale range is used and the layer will always paint labels. This is dangerous.
labelScaleRange
in class TLspPlotLayerBuilder
aScaleRange
- The scale rangepublic TLspPlotLayerBuilder paintingHints(TLspPlotPaintingHints aPaintingHints)
public TLspPlotLayerBuilder selectable(boolean aSelectable)
TLspPlotLayerBuilder
selectable
in class TLspPlotLayerBuilder
aSelectable
- true if layers should be selectablepublic TLspPlotLayerBuilder labelEditable(boolean aEditable)
TLspPlotLayerBuilder
labelEditable
in class TLspPlotLayerBuilder
aEditable
- whether the labels of the layer should be editablethis
TLspPlotLayerBuilder.labelEditor(ILspEditor)
public TLspPlotLayerBuilder labelEditor(ILspEditor aEditor)
TLspPlotLayerBuilder
TLspPlotLayerBuilder.labelEditable(boolean)
to enable a default label editor.labelEditor
in class TLspPlotLayerBuilder
aEditor
- the label editor for the layerthis
TLspLabelEditor
public static TLspPlotLayerBuilder newBuilder()
You must set a model on it using model(com.luciad.model.ILcdModel)
.
Default values:
TLspPlotStyle