Package com.luciad.view.gxy
Interface ILcdGXYLayerSubsetList
- All Known Implementing Classes:
TLcdGXYLayerSubsetList
public interface ILcdGXYLayerSubsetList
A layer subset list defines a set of domain objects that are present in one or more layers.
It is structured as a list of layer subsets.
Individual domain objects can be
added or removed.
The set of domain objects can be retrieved for a given layer or for all layers.
You can iterate over this list by enumerating over the layers first, and then enumerating over the subset:
Enumeration layers = list.layers();
while (layers.hasMoreElements() ) {
ILcdGXYLayer layer = (ILcdGXYLayer) layers.nextElement();
Enumeration objects = list.layerSubset( layer );
while (objects.hasMoreElements()) {
Object object = objects.nextElement();
}
}
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(Object aObject, ILcdGXYLayer aGXYLayer) Adds a domain object that is part of the given layer.asAssocs()Retrieves all the subsets as an array ofILcdAssoc.booleanReturns whether the given object is contained in this subset list.elements()Returns anEnumerationof all the Objects in all theILcdGXYLayersubsets.layers()Returns an Enumeration of all layers for which objects are present.layerSubset(ILcdGXYLayer aGXYLayer) Returns an Enumeration of all objects that are part of the given layer.voidRemoves all the subsets.voidremoveElement(Object aObject, ILcdGXYLayer aGXYLayer) Removes the domain object part of the given layer.retrieveGXYLayer(Object aObject) Returns theILcdGXYLayerfor which the givenObjectwas added.intsize()Returns the number of all the Objects in all theILcdGXYLayersubsets.
-
Method Details
-
addElement
Adds a domain object that is part of the given layer.- Parameters:
aObject- theObjectto add.aGXYLayer- theILcdGXYLayertheObjectbelongs to.
-
removeElement
Removes the domain object part of the given layer.- Parameters:
aObject- theObjectto remove.aGXYLayer- theILcdGXYLayertheObjectbelongs to.
-
layerSubset
Returns an Enumeration of all objects that are part of the given layer.- Parameters:
aGXYLayer- the layer whose objects to return- Returns:
- an Enumeration of all objects that are part of the given layer.
-
layers
Enumeration layers()Returns an Enumeration of all layers for which objects are present.- Returns:
- an Enumeration of all objects that are part of the given layer.
-
retrieveGXYLayer
Returns theILcdGXYLayerfor which the givenObjectwas added.- Returns:
- the
ILcdGXYLayerif aObject has been added, ornullif aObject does not belong to thisILcdGXYLayerSubsetList - See Also:
-
asAssocs
ILcdAssoc[] asAssocs()Retrieves all the subsets as an array ofILcdAssoc. Each association in this array maps an ILcdGXYLayer to a Vector of domain objects.- Returns:
- an array of ILcdAssoc objects, with the key being an ILcdGXYLayer, and the value a Vector.
-
removeAllElements
void removeAllElements()Removes all the subsets. -
elements
Enumeration elements()Returns anEnumerationof all the Objects in all theILcdGXYLayersubsets.- Returns:
- an
Enumerationof all the Objects in all theILcdGXYLayersubsets
-
size
int size()Returns the number of all the Objects in all theILcdGXYLayersubsets.- Returns:
- the number of all the Objects in all the
ILcdGXYLayersubsets
-
contains
Returns whether the given object is contained in this subset list.- Returns:
trueif the givenObjectbelongs to one of theILcdGXYLayersubsets. Tests shall be done by comparing Object reference (not using Object.equals)
-