Package com.luciad.util
Interface ILcdSelection<T>
- Type Parameters:
T- the type of the objects that will be selected
- All Known Subinterfaces:
ILcdGXYAsynchronousLayerWrapper,ILcdGXYEditableLabelsLayer,ILcdGXYLayer,ILcdGXYLayerList,ILcdLayer,ILcdLayerTreeNode,ILspEditableStyledLayer,ILspImageProjectionLayer,ILspInteractivePaintableLayer,ILspLayer,ILspPaintableLayer,ILspStyledLayer
- All Known Implementing Classes:
ALspLayer,TLcdGXYAsynchronousEditableLabelsLayerTreeNodeWrapper,TLcdGXYAsynchronousEditableLabelsLayerWrapper,TLcdGXYAsynchronousLayerTreeNodeWrapper,TLcdGXYAsynchronousLayerWrapper,TLcdGXYDensityLayer,TLcdGXYLayer,TLcdGXYLayerList,TLcdGXYLayerTreeNode,TLcdGXYLspAsynchronousLayerTreeNodeWrapper,TLcdGXYLspAsynchronousLayerWrapper,TLcdKML22GXYLayer,TLcdLayer,TLcdMapGeorefGridLayer,TLcdMapLonLatGridLayer,TLcdMGRSGridLayer,TLcdMultilevelGridLayer,TLcdPOLLayer,TLcdS52GXYCatalogueLayer,TLcdS52GXYCatalogueLayerList,TLcdS52GXYLayer,TLcdS52GXYLevelLayerList,TLcdSelectionSupport,TLcdUPSGridLayer,TLcdUTMGridLayer,TLcdVPFLayer,TLcdWMSProxyGXYLayer,TLcdXYGridLayer,TLcyAreaOfInterestLayer,TLcyDynamicLonLatGridLayer,TLcyPIMGXYLayer,TLcySnappableGXYLayer,com.luciad.internal.lucy.map.TLcyStyledSnappableGXYLayer,TLfnGXYVectorLayer,TLspGXYLayerAdapter,TLspGXYLayerTreeNodeAdapter,TLspLayer,TLspLayerTreeNode,TLspRasterLayer
public interface ILcdSelection<T>
Supports the selection of objects.
It allows
iterating over the selected objects,
testing if an object is selected,
and subscribing to be notified of any
changes in the selection.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSelectionListener(ILcdSelectionListener<T> aSelectionListener) Adds a listener to this selection.Returns aListof the selected objects.intReturns the number of objects in this selection.booleanisSelected(Object aObject) Checks whether the givenObjectis currently in the set of selected objects.voidremoveSelectionListener(ILcdSelectionListener<T> aSelectionListener) Removes anILcdSelectionListenerfrom thisILcdSelection.Returns the objects in this selection.
-
Method Details
-
getSelectionCount
int getSelectionCount()Returns the number of objects in this selection.- Returns:
- the number of objects in this
ILcdSelection.
-
selectedObjects
Enumeration<T> selectedObjects()Returns the objects in this selection.- Returns:
- the objects currently in this
ILcdSelection.
-
isSelected
Checks whether the givenObjectis currently in the set of selected objects.- Parameters:
aObject- theObjectto be checked.- Returns:
trueif theObjectis in thisILcdSelection, false otherwise.
-
getSelectedObjects
Returns aListof the selected objects.- Returns:
- an unmodifiable
Listof the objects in thisILcdSelection - Since:
- 2018.0
-
addSelectionListener
Adds a listener to this selection. In case you need to register a listener which keeps a reference to an object with a shorter life-time than thisILcdSelection, you can use aALcdWeakSelectionListenerinstance as selection listener.- Parameters:
aSelectionListener- theILcdSelectionListenerto be added.
-
removeSelectionListener
Removes anILcdSelectionListenerfrom thisILcdSelection.- Parameters:
aSelectionListener- theILcdSelectionListenerto be removed.
-