public class TLspAIXMStyler extends ALspLabelStyler
This styler visualizes the elements returned by
TLcdAIXM51AbstractAIXMMessage#elements
The following AIXM 5.1 types are currently supported:
For each supported feature type, default settings and styles are returned.
The following default settings are used for each feature type:
timeSlice/AirportHeliportTimeSlice/designator
TLspTextStyle
timeSlice/DesignatedPointTimeSlice/name
TLspTextStyle
TLcdAIXM51NavaidLabelPainter
TLcdSymbol.FILLED_RECT
timeSlice/UnitTimeSlice/nametimeSlice/UnitTimeSlice/designator
TLspTextStyle
TLspFillStyle
valueOf(timeSlice/RunwayBlastPadTimeSlice/usedRunwayDirection,timeSlice/RunwayDirectionTimeSlice/designator)
TLspTextStyle
TLcdSymbol.FILLED_RECT
timeSlice/RunwayCentrelinePointTimeSlice/role
TLspTextStyle
TLspFillStyle
valueOf(timeSlice/RunwayElementTimeSlice/associatedRunway,timeSlice/RunwayTimeSlice/designator)
TLspTextStyle
TLspFillStyle
TLspLineStyle
timeSlice/PassengerServiceTimeSlice/type
TLspTextStyle
timeSlice/AirportSuppliesServiceTimeSlice/fuelSupply/Fuel/category
timeSlice/AirportSuppliesServiceTimeSlice/oilSupply/Oil/category
timeSlice/AirportSuppliesServiceTimeSlice/nitrogenSupply/Nitrogen/type
timeSlice/AirportSuppliesServiceTimeSlice/oxygenSupply/Oxygen/type
TLspTextStyle
TLspFillStyle
timeSlice/TaxiwayTimeSlice/contaminant/TaxiwayContamination/frictionEstimation
TLspTextStyle
TLspFillStyle
valueOf(timeSlice/TaxiwayElementTimeSlice/associatedTaxiway,timeSlice/TaxiwayTimeSlice/designator)
TLspTextStyle
TLspFillStyle
timeSlice/ApronTimeSlice/contaminant/ApronContamination/frictionEstimation
TLspTextStyle
TLspFillStyle
timeSlice/ApronElementTimeSlice/name
TLspTextStyle
TLspLineStyle
TLcdExtrudedShape
and ILcdGeoBuffer
timeSlice/RouteSegmentTimeSlice/widthLeft
+ timeSlice/RouteSegmentTimeSlice/widthRight
timeSlice/RouteSegmentTimeSlice/lowerLimit
timeSlice/RouteSegmentTimeSlice/upperLimit
valueOf(timeSlice/RouteSegmentTimeSlice/routeFormed,timeSlice/RouteTimeSlice/name)
valueOf(timeSlice/RouteSegmentTimeSlice/routeFormed,timeSlice/RouteTimeSlice/designatorPrefix)valueOf(timeSlice/RouteSegmentTimeSlice/routeFormed,timeSlice/RouteTimeSlice/designatorSecondLetter)valueOf(timeSlice/RouteSegmentTimeSlice/routeFormed,timeSlice/RouteTimeSlice/designatorNumber)
TLspTextStyle
TLspLineStyle
timeSlice/GeoBorderTimeSlice/name
TLspTextStyle
TLspLineStyle
timeSlice/GuidanceLineTimeSlice/designator
TLspTextStyle
TLspLineStyle
timeSlice/InstrumentApproachProcedureTimeSlice/name
timeSlice/StandardInstrumentArrivalTimeSlice/name
timeSlice/StandardInstrumentDepartureTimeSlice/name
TLspTextStyle
TLspFillStyle
timeSlice/TouchDownLiftOffTimeSlice/designator
timeSlice/TouchDownLiftOffTimeSlice/surfaceProperties/SurfaceCharacteristics/composition
TLspTextStyle
TLspFillStyle
valueOf(timeSlice/TouchDownLiftOffSafeAreaTimeSlice/protectedTouchDownLiftOff,timeSlice/TouchDownLiftOffTimeSlice/designator)
timeSlice/TouchDownLiftOffTimeSlice/surfaceProperties/SurfaceCharacteristics/composition
TLspTextStyle
TLspFillStyle
TLspLineStyle
TLcdExtrudedShape
, fill color (88, 115, 165)
timeSlice/VerticalStructureTimeSlice/radius
max(timeSlice/VerticalStructureTimeSlice/width, timeSlice/VerticalStructureTimeSlice/length) if both properties
are present. If only one is present we will take that one.
Default value based on timeSlice/VerticalStructureTimeSlice/type property
verticalStructurePart/verticalExtent property
timeSlice/VerticalStructureTimeSlice/name
TLspTextStyle
TLspFillStyle
Constructor and Description |
---|
TLspAIXMStyler()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
TLcdSLDFeatureTypeStyle |
getSLDFeatureTypeStyle(TLcdDataType aFeatureType)
Returns an SLD feature type style that can be used to configure styling for
the given feature type.
|
void |
setSLDFeatureTypeStyle(TLcdDataType aFeatureType,
TLcdSLDFeatureTypeStyle aFeatureStyle)
Sets the SLD feature type style that defines the visualization for the
given feature type.
|
void |
style(Collection<?> aObjects,
ALspLabelStyleCollector aStyleCollector,
TLspContext aContext)
Convenience method that takes an
ALspLabelStyleCollector as argument instead of
an ALspStyleCollector . |
void |
style(Collection<?> aObjects,
ALspStyleCollector aStyleCollector,
TLspContext aContext)
Implementation of
ILspStyler.style that either casts the ALspStyleCollector
to ALspLabelStyleCollector if possible, or adapts it otherwise. |
addStyleChangeListener, fireStyleChangeEvent, fireStyleChangeEvent, removeStyleChangeListener
public TLspAIXMStyler()
public TLcdSLDFeatureTypeStyle getSLDFeatureTypeStyle(TLcdDataType aFeatureType)
setSLDFeatureTypeStyle(TLcdDataType, TLcdSLDFeatureTypeStyle)
method, it will be returned. Otherwise a style will be returned that
resembles the style that is internally used by the painter, as far as that
style can be represented using SLD. This means that if you set a style on
this styler that was retrieved using this method, the styling may change!
Thus, styles retrieved with this method can only be considered as an
example.
The style supports styling of AIXM 5.1 features, and is primarily meant for
use with this styler. It is not guaranteed that it can be used with a
generic SLD painter without modification. It can be read and written with
the LuciadLightspeed SLD decoder/encoder.
To customize the styles, it is not sufficient to modify the instance
returned by this method. You need to set the style again as illustrated
below.
// retrieve the style
TLspAIXMStyler styler = ...;
TLcdDataType dataType = ...;
TLcdSLDFeatureTypeStyle style = styler.getSLDFeatureTypeStyle( dataType );
// modify the style
style = modifyStyle( style );
// set the style on the styler to apply the style changes
styler.setSLDFeatureTypeStyle( dataType, style );
Do note that styles returned by this method are not guaranteed to remain
the same across different versions of LuciadLightspeed. It is very likely
that the default styles will be improved over time, or updated if new
features are added to the SLD specifications.
The TLcdDataType
that defines the feature type can be
retrieved generically using the
ILcdDataModelDescriptor.getModelElementTypes()
method,
or the ILcdDataObject.getDataType()
method. It is also
possible to use one of the constants that are available in
TLcdAIXM51DataTypes
.
aFeatureType
- The feature type for which a style is to be retrieved. This type
has to be an extension of an AIXM 5.1 abstract feature.IllegalArgumentException
- In case aFeatureType is not an extension of an AIXM 5.1 abstract
feature.setSLDFeatureTypeStyle(TLcdDataType, TLcdSLDFeatureTypeStyle)
public void setSLDFeatureTypeStyle(TLcdDataType aFeatureType, TLcdSLDFeatureTypeStyle aFeatureStyle)
aFeatureType
- The feature type for which the style needs to be set.
This type has to be an extension of an AIXM 5.1 abstract feature.aFeatureStyle
- A valid SLD feature type style, or null to reset the
painter to the default style.IllegalArgumentException
- In case aFeatureType is not an extension
of an AIXM 5.1 abstract feature.getSLDFeatureTypeStyle(TLcdDataType)
public void style(Collection<?> aObjects, ALspLabelStyleCollector aStyleCollector, TLspContext aContext)
ALspLabelStyler
Convenience method that takes an ALspLabelStyleCollector
as argument instead of
an ALspStyleCollector
. This method is called from
ALspLabelStyler.style(Collection, ALspStyleCollector, TLspContext)
.
style
in class ALspLabelStyler
aObjects
- The set of domain objects to provide information foraStyleCollector
- The label style collector to submit the information to.aContext
- The contextALspLabelStyleCollector
,
ILspStyler
public void style(Collection<?> aObjects, ALspStyleCollector aStyleCollector, TLspContext aContext)
ALspLabelStyler
Implementation of ILspStyler.style
that either casts the ALspStyleCollector
to ALspLabelStyleCollector
if possible, or adapts it otherwise. In the latter case, the labeling-specific
calls (label
, anchorLabel
,
algorithm
, ...) are ignored. The ALspLabelStyleCollector
is then
passed to the style(Collection,ALspLabelStyleCollector,TLspContext)
method.
style
in interface ILspStyler
style
in class ALspLabelStyler
aObjects
- The objects to be styled.aStyleCollector
- A style collector to which all styling information
should be passed, this collector is only valid within this method
call, and can no longer be used afterwards.aContext
- Provides context information that may affect styling, such as view specific properties.