public class IlvMapLayer extends Object implements IlvPersistentObject
IlvMapLayer represents a map layer, that is, a cartographic
theme. An IlvMapLayer instance encapsulates an
IlvManagerLayer object. It can be styled with an
IlvMapStyle object.
A tree representation of the layers can be displayed using instances of
IlvMapLayerTreeNode, IlvMapLayerTreeModel and
IlvLayerTree.| Modifier and Type | Class and Description |
|---|---|
static class |
IlvMapLayer.MapLayerStyleListener
MapLayerStyleListener is responsible for updating the
layer-wide parameters when the layer style changes. |
| Modifier and Type | Field and Description |
|---|---|
static String |
managerLayerPropertyName
The name of the manager layer property.
|
static String |
namePropertyName
The name of the layer name property.
|
static String |
stylePropertyName
The name of the style property.
|
| Constructor and Description |
|---|
IlvMapLayer()
Constructs an empty
IlvMapLayer instance. |
IlvMapLayer(IlvInputStream stream)
Reads an
IlvMapLayer object from an
IlvInputStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener.
|
boolean |
contains(IlvManagerLayer layer)
Indicates if this layer contains the specified
IlvManagerLayer
object. |
void |
dispose()
Cleans this
IlvMapLayer instance. |
static IlvMapLayer |
get(IlvGraphic g)
Returns the map layer which contains the specified
IlvGraphic instance. |
static IlvMapLayer |
get(IlvManagerLayer layer)
Returns the
IlvMapLayer object containing the specified
IlvManagerLayer instance or null if the
IlvManagerLayer specified does not belong to this layer. |
IlvMapLayer[] |
getChildren()
Returns the child list for this
IlvMapLayer instance. |
IlvMapDataSource |
getDataSource()
Returns the data source associated with this layer.
|
IlvManagerView[] |
getMainViews()
Returns all the manager views that display the manager of this map layer
and are not overviews.
|
IlvManager |
getManager()
Returns the
IlvManager object associated with this layer. |
IlvManagerLayer |
getManagerLayer()
Returns the
IlvManagerLayer object associated with this
layer. |
IlvManagerLayer |
getManagerLayer(int i)
Returns the ith
IlvManagerLayer object in this layer and
its sublayers. |
IlvManagerLayer[] |
getManagerLayers()
Returns an array containing the
IlvManagerLayer objects
contained in this layer and its sublayers. |
int |
getManagerLayersCount()
Returns the
IlvManagerLayer count. |
String |
getName()
Returns the name of this layer.
|
IlvMapLayerTreeNode |
getNode()
Retrieves the associated
IlvMapLayerTreeNode object. |
IlvMapLayer |
getParent()
Returns the parent of this
IlvMapLayer object. |
String |
getReference()
Returns the reference name, used internally by hierarchical data sources to retrieve the criteria value after reload.
|
IlvMapStyle |
getStyle()
Returns the style associated with this layer.
|
boolean |
hasPropertyListener(PropertyChangeListener listener)
Indicates if this layer has already registered the given listener.
|
void |
insert(IlvManagerLayer layer)
Inserts an
IlvManagerLayer object into this layer. |
boolean |
isAllowingMoveObjects()
Indicates if an interactor can or cannot move the objects in this layer.
|
static void |
processVisibility(IlvMapLayerTreeNode node,
IlvManagerView view)
This method is public but is only for internal use.
|
void |
removeAll()
Removes all
IlvGraphic objects from the layer. |
void |
removeAllLayers()
Removes all manager layers from the map layer and the manager.
|
void |
removeAllObjects()
Remove all objects contained in all the
IlvManagerLayer
instance of this layer. |
void |
removeDataSource(IlvMapDataSource ndataSource)
Removes the data source associated with this layer.
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a property listener.
|
void |
selectAll(boolean select)
Selects or deselects all the
IlvGraphic objects contained
in this layer. |
void |
setAllowingMoveObjects(boolean allow)
Specifies if moving the objects in this layer is allowed or not.
|
void |
setDataSource(IlvMapDataSource source)
Sets the data source for this layer.
|
void |
setManager(IlvManager manager)
Sets the
IlvManager object for this layer. |
void |
setName(String name)
Sets the name for this layer.
|
void |
setNode(IlvMapLayerTreeNode node)
Sets the associated
IlvMapLayerTreeNode instance. |
void |
setReference(String name)
Sets the reference name, used internally by hierarchical data sources to retrieve the criteria value after reload, even if the layer name has changed.
|
void |
setStyle(IlvMapStyle style)
Sets the style of this layer.
|
void |
setStyleControl(IlvMapLayerStyleControl styleControl)
Adds the external object responsible for detecting if the layer content is
not valid after the style changes.
|
void |
setVisibleInView(IlvManagerView view,
boolean b)
Controls the visibility of the layer in the view specified.
|
void |
write(IlvOutputStream stream)
Writes this layer into an
IlvOutputStream. |
public static final String stylePropertyName
public static final String namePropertyName
public static final String managerLayerPropertyName
public IlvMapLayer(IlvInputStream stream) throws IlvReadFileException
IlvMapLayer object from an
IlvInputStream.stream - The stream to read from.IlvReadFileException - if there is a problem reading from
stream.public IlvMapLayer()
IlvMapLayer instance.public void setReference(String name)
name - the reference name.public String getReference()
public void setStyleControl(IlvMapLayerStyleControl styleControl)
styleControl - The external object.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream.write in interface IlvPersistentObjectstream - The stream to write to.IOException - if there is a problem writing to stream.public String getName()
public void setName(String name)
name - The layer name.public void setNode(IlvMapLayerTreeNode node)
IlvMapLayerTreeNode instance.node - The associated IlvMapLayerTreeNode instance.public IlvMapLayerTreeNode getNode()
IlvMapLayerTreeNode object.IlvMapLayerTreeNode object, if
one exists.public void insert(IlvManagerLayer layer)
IlvManagerLayer object into this layer.
If the manager associated with this layer is non-null,
the IlvManagerLayer object is inserted into the manager.layer - The IlvManagerLayer object to insert.public void removeAllLayers()
public void setDataSource(IlvMapDataSource source)
source - The data source to set.public void removeDataSource(IlvMapDataSource ndataSource)
ndataSource - The data source to remove from this layer.public IlvMapDataSource getDataSource()
public void setStyle(IlvMapStyle style)
IlvMapGraphic object if their
is one.style - The style of the layer.public IlvMapStyle getStyle()
public IlvManagerLayer getManagerLayer()
IlvManagerLayer object associated with this
layer.IlvManagerLayer object associated with this
layer.public IlvManagerLayer[] getManagerLayers()
IlvManagerLayer objects
contained in this layer and its sublayers.IlvManagerLayer objects contained in
this layer.public int getManagerLayersCount()
IlvManagerLayer count.
This method traverses the subtree to include the child objects.IlvManagerLayer objects contained in
this layer.public IlvManagerLayer getManagerLayer(int i)
IlvManagerLayer object in this layer and
its sublayers.i - The index of the IlvManagerLayer object to return.IlvManagerLayer object contained in this
layer and its sublayers.public void setVisibleInView(IlvManagerView view, boolean b)
view - The view.b - Set to true if the layer is to be visible in the
view.public boolean contains(IlvManagerLayer layer)
IlvManagerLayer
object.layer - The IlvManagerLayer object to check.IlvManagerLayer
object, true is returned.public void removeAllObjects()
IlvManagerLayer
instance of this layer.
The IlvManagerLayer object is not removed.public static IlvMapLayer get(IlvGraphic g)
IlvGraphic instance.g - The IlvGraphic instance.g.public static IlvMapLayer get(IlvManagerLayer layer)
IlvMapLayer object containing the specified
IlvManagerLayer instance or null if the
IlvManagerLayer specified does not belong to this layer.layer - The IlvManagerLayer object.IlvMapLayer containing layer.public boolean isAllowingMoveObjects()
true to allow object moving.public void setAllowingMoveObjects(boolean allow)
allow - Set to true to allow object moving.public void setManager(IlvManager manager)
IlvManager object for this layer.manager - The IlvManager to set.public IlvManager getManager()
IlvManager object associated with this layer.IlvManager object associated with this layer.public void removeAll()
IlvGraphic objects from the layer.public void selectAll(boolean select)
IlvGraphic objects contained
in this layer.select - Set to true to select all the objects of the
layer, set to false to deselect all the objects of this
layer.public IlvMapLayer getParent()
IlvMapLayer object. To have a
parent, this layer must have been attached to an
IlvMapLayerTreeNode object, and the hierarchy of nodes must
have been set up correctly.null if the layer is not
attached to an IlvMapLayerTreeNode instance or has no parent.public IlvMapLayer[] getChildren()
IlvMapLayer instance. To
have a child list, this layer must have been attached to an
IlvMapLayerTreeNode object and the hierarchy of nodes must
have been set up correctly.null if the
layer is not attached to an IlvMapLayerTreeNode instance or
has no children.public IlvManagerView[] getMainViews()
public static void processVisibility(IlvMapLayerTreeNode node, IlvManagerView view)
node - the layer tree nodeview - the manager view.public void addPropertyChangeListener(PropertyChangeListener l)
l - The property listener to add.public void removePropertyChangeListener(PropertyChangeListener l)
l - The property listener to remove.public boolean hasPropertyListener(PropertyChangeListener listener)
listener - The listener to test.true
is returned.public void dispose()
IlvMapLayer instance. After this call,
this IlvMapLayer should not be used anymore.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.