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
ConstructorDescriptionCreates 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 TLcdGXYLayer
Creates a new instance ofTLcdGXYLayer
, which will be used as layer for anILcdModel
containing AIXM objects.createGXYLayer
(ILcdModel aModel) Creates anILcdGXYLayer
for representing anILcdModel
on anILcdGXYView
.Returns theProperties
object used by this layer factory to configure the general properties of AIXM layers.boolean
Returns whether layer nodes are created for model lists.static boolean
Deprecated.This method has been deprecated.void
setCreateLayerTreeNodes
(boolean aCreateLayerTreeNodes) Sets whether to create alayer node
orlayer list
when a model list is passed.void
setLayerConfiguration
(TLcdAIXMLayerConfiguration aLayerConfiguration) Sets the layer configuration to be used by this layer factory to configure AIXM layers and its painters and label painters.void
setProperties
(Properties aProperties) Specifies aProperties
object to be used by this layerFactory to configure the general properties of AIXM layers.static void
setTraceOn
(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:ILcdGXYLayerFactory
Creates anILcdGXYLayer
for representing anILcdModel
on anILcdGXYView
.- Specified by:
createGXYLayer
in interfaceILcdGXYLayerFactory
- Parameters:
aModel
- a model that needs to be visualized in anILcdGXYView
- Returns:
- a layer representing the given model, or
null
if 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.Returnstrue
if 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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then 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 theProperties
object used by this layer factory to configure the general properties of AIXM layers.- Returns:
- the
Properties
object used by this layer factory - See Also:
-
setProperties
Specifies aProperties
object to be used by this layerFactory to configure the general properties of AIXM layers.- Parameters:
aProperties
- aProperties
object. 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 node
orlayer list
when 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. SeeTLcdAIXMLayerConfiguration
for 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 anILcdModel
containing AIXM objects.- Returns:
- a new instance of
TLcdGXYLayer
.
-