public abstract class ALspLayerBuilder extends Object
ILspLayer
implementations.Modifier | Constructor and Description |
---|---|
protected |
ALspLayerBuilder()
Creates a layer builder, with the layer type set to
ILspLayer.LayerType.EDITABLE . |
Modifier and Type | Method and Description |
---|---|
abstract ILspLayer |
build()
Creates a new layer instance.
|
protected ILcdIcon |
getIcon()
Returns the icon that is currently set.
|
protected String |
getLabel()
Returns the label that is currently set.
|
protected TLspLayerStyle |
getLayerStyle()
Returns the layer style that is currently set.
|
protected ILspLayer.LayerType |
getLayerType()
Returns the layer type that is currently set.
|
protected ILcdModel |
getModel()
Returns the model that is currently set.
|
ALspLayerBuilder |
icon(ILcdIcon aIcon)
Sets the icon of the layer.
|
ALspLayerBuilder |
label(String aLabel)
Sets the label of the layer.
|
ALspLayerBuilder |
layerStyle(TLspLayerStyle aLayerStyle)
Set a layer style to be used during the rendering of the layer.
|
ALspLayerBuilder |
layerType(ILspLayer.LayerType aLayerType)
Sets the layer type of the layer.
|
ALspLayerBuilder |
model(ILcdModel aModel)
Sets the model of the layer.
|
protected ALspLayerBuilder()
ILspLayer.LayerType.EDITABLE
.public abstract ILspLayer build()
Creates a new layer instance.
public ALspLayerBuilder model(ILcdModel aModel)
null
.aModel
- a modelILcdLayer.getModel()
public ALspLayerBuilder label(String aLabel)
null
.aLabel
- the labelILcdLayer.getLabel()
public ALspLayerBuilder icon(ILcdIcon aIcon)
null
.aIcon
- the iconILcdLayer.getIcon()
public ALspLayerBuilder layerType(ILspLayer.LayerType aLayerType)
ILspLayer.LayerType.EDITABLE
.aLayerType
- the layer typeILspLayer.getLayerType()
public ALspLayerBuilder layerStyle(TLspLayerStyle aLayerStyle)
TLspLayerStyle
is used to style the layer as a whole. Layer style can for example modify the
transparency of a layer. Also, layer style can be modified after building the layer by calling
ILspLayer.setLayerStyle(TLspLayerStyle)
.aLayerStyle
- the layer style. Must not be null
. If you want to set the default layer style, set TLspLayerStyle.newBuilder().build()
ILspLayer.getLayerStyle()
,
ILspLayer.setLayerStyle(TLspLayerStyle)
protected final ILcdModel getModel()
protected final String getLabel()
protected final ILcdIcon getIcon()
protected final ILspLayer.LayerType getLayerType()
protected final TLspLayerStyle getLayerStyle()
null
if there is no layer style set.