Package com.luciad.format.aixm
Class TLcdAIXMDefaultLayerFactory
java.lang.Object
com.luciad.format.aixm.TLcdAIXMDefaultLayerFactory
- All Implemented Interfaces:
ILcdGXYLayerFactory
@LcdService(service=ILcdGXYLayerFactory.class,
priority=20000)
public class TLcdAIXMDefaultLayerFactory
extends Object
implements ILcdGXYLayerFactory
The default layer factory for AIXM models. All models created
by the AIXM decoder are supported.
If a model list is supplied, a
TLcdGXYLayerList or ILcdLayerTreeNode is created depending on the
flag isCreateLayerTreeNodes(),
otherwise a normal GXY layer is created.
For each supplied model (list), a primary check
is done on the model descriptor's type name: this should be "AIXM".
A second check is done on the type of model descriptor (except for the model descriptor of a model list):
this should be one of the AIS defined model descriptors in com.luciad.ais.model.*.
This layer factory has support for setting colors and other
display properties, through the use of a TLcdAIXMLayerConfiguration object
which can be set on the factory
(see setLayerConfiguration).
The general layer properties can be set through the use of a Properties object
(see setProperties).
Note that the constants named CFG_* are also available in the class TLcdAIXMLayerConfiguration
and are documented in that class.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a layer factory with default display and styling properties.TLcdAIXMDefaultLayerFactory(Properties aProperties) Create a layer factory with the supplied configuration properties. -
Method Summary
Modifier and TypeMethodDescriptionprotected TLcdGXYLayerCreates a new instance ofTLcdGXYLayer, which will be used as layer for anILcdModelcontaining AIXM objects.createGXYLayer(ILcdModel aModel) Creates anILcdGXYLayerfor representing anILcdModelon anILcdGXYView.Returns thePropertiesobject used by this layer factory to configure the general properties of AIXM layers.booleanReturns whether layer nodes are created for model lists.static booleanDeprecated.This method has been deprecated.voidsetCreateLayerTreeNodes(boolean aCreateLayerTreeNodes) Sets whether to create alayer nodeorlayer listwhen a model list is passed.voidsetLayerConfiguration(TLcdAIXMLayerConfiguration aLayerConfiguration) Sets the layer configuration to be used by this layer factory to configure AIXM layers and its painters and label painters.voidsetProperties(Properties aProperties) Specifies aPropertiesobject to be used by this layerFactory to configure the general properties of AIXM layers.static voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdAIXMDefaultLayerFactory
Create a layer factory with the supplied configuration properties.- Parameters:
aProperties- a properties object that configures a number of display properties of objects in the layer (visible, editable, ...) and that configures the styling.- See Also:
-
TLcdAIXMDefaultLayerFactory
public TLcdAIXMDefaultLayerFactory()Creates a layer factory with default display and styling properties.- See Also:
-
-
Method Details
-
createGXYLayer
Description copied from interface:ILcdGXYLayerFactoryCreates anILcdGXYLayerfor representing anILcdModelon anILcdGXYView.- Specified by:
createGXYLayerin interfaceILcdGXYLayerFactory- Parameters:
aModel- a model that needs to be visualized in anILcdGXYView- Returns:
- a layer representing the given model, or
nullif such a layer cannot be created - See Also:
-
isTraceOn
public static boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setTraceOn
public static void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
getProperties
Returns thePropertiesobject used by this layer factory to configure the general properties of AIXM layers.- Returns:
- the
Propertiesobject used by this layer factory - See Also:
-
setProperties
Specifies aPropertiesobject to be used by this layerFactory to configure the general properties of AIXM layers.- Parameters:
aProperties- aPropertiesobject. Keys must be taken from the String fields named LAYER_DEFAULT_* in this class . The String values depend on the type of property, for instance for LAYER_DEFAULT_EDITABLE: a boolean value indicating if a layer is editable.- See Also:
-
isCreateLayerTreeNodes
public boolean isCreateLayerTreeNodes()Returns whether layer nodes are created for model lists. If false, the decoder creates layer lists instead. This property is by defaulttrue.- Returns:
- true if layer nodes are created for model lists, false if instead layer lists are used.
-
setCreateLayerTreeNodes
public void setCreateLayerTreeNodes(boolean aCreateLayerTreeNodes) Sets whether to create alayer nodeorlayer listwhen a model list is passed.- Parameters:
aCreateLayerTreeNodes- if true, the factory will produce a layer node for a given model list. If false, a layer list is created.
-
setLayerConfiguration
Sets the layer configuration to be used by this layer factory to configure AIXM layers and its painters and label painters. SeeTLcdAIXMLayerConfigurationfor the available configuration properties.- Parameters:
aLayerConfiguration- the layer configuration to be used by this layer factory.
-
createGXYLayer
Creates a new instance ofTLcdGXYLayer, which will be used as layer for anILcdModelcontaining AIXM objects.- Returns:
- a new instance of
TLcdGXYLayer.
-