@LcdService(service=ILcdGXYLayerFactory.class, priority=20000) public class TLcdAIXMDefaultLayerFactory extends Object implements ILcdGXYLayerFactory
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 and Description |
---|
TLcdAIXMDefaultLayerFactory()
Creates a layer factory with default display and styling properties.
|
TLcdAIXMDefaultLayerFactory(Properties aProperties)
Create a layer factory with the supplied configuration
properties.
|
Modifier and Type | Method and Description |
---|---|
protected TLcdGXYLayer |
createGXYLayer()
Creates a new instance of
TLcdGXYLayer , which will be used as layer for an ILcdModel
containing AIXM objects. |
ILcdGXYLayer |
createGXYLayer(ILcdModel aModel)
Creates an
ILcdGXYLayer for representing
an ILcdModel on an ILcdGXYView . |
Properties |
getProperties()
Returns the
Properties object used by this layer factory
to configure the general properties of AIXM layers. |
boolean |
isCreateLayerTreeNodes()
Returns whether layer nodes are created for model lists.
|
static boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setCreateLayerTreeNodes(boolean aCreateLayerTreeNodes)
Sets whether to create a
layer node or layer 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 a
Properties 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. It is recommended to use the
standard Java logging framework directly.
|
public TLcdAIXMDefaultLayerFactory(Properties aProperties)
aProperties
- a properties object that configures a number of display properties of objects in the layer (visible, editable, ...)
and that configures the styling.setProperties(java.util.Properties)
,
setLayerConfiguration(com.luciad.format.aixm.TLcdAIXMLayerConfiguration)
public TLcdAIXMDefaultLayerFactory()
public ILcdGXYLayer createGXYLayer(ILcdModel aModel)
ILcdGXYLayerFactory
ILcdGXYLayer
for representing
an ILcdModel
on an ILcdGXYView
.createGXYLayer
in interface ILcdGXYLayerFactory
aModel
- a model that needs to be visualized in an ILcdGXYView
null
if such a layer cannot be createdTLcdGXYViewJPanel.setGXYLayerFactory(com.luciad.view.gxy.ILcdGXYLayerFactory)
public static boolean isTraceOn()
true
if tracing is enabled for this class.public static void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.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.public Properties getProperties()
Properties
object used by this layer factory
to configure the general properties of AIXM layers.Properties
object used by this layer factorysetProperties(java.util.Properties)
public void setProperties(Properties aProperties)
Properties
object to be used by this
layerFactory to configure the general properties of AIXM layers.aProperties
- a Properties
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.getProperties()
public boolean isCreateLayerTreeNodes()
true
.public void setCreateLayerTreeNodes(boolean aCreateLayerTreeNodes)
layer node
or layer list
when a model list is passed.aCreateLayerTreeNodes
- if true, the factory will produce a layer node for a given model list. If false,
a layer list is created.public void setLayerConfiguration(TLcdAIXMLayerConfiguration aLayerConfiguration)
TLcdAIXMLayerConfiguration
for the available configuration
properties.aLayerConfiguration
- the layer configuration to be used by this layer factory.protected TLcdGXYLayer createGXYLayer()
TLcdGXYLayer
, which will be used as layer for an ILcdModel
containing AIXM objects.TLcdGXYLayer
.