Package com.luciad.view.lightspeed.layer
Interface ILspInteractivePaintableLayer
- All Superinterfaces:
ILcdLayer
,ILcdPropertyChangeSource
,ILcdSelection<Object>
,ILspLayer
,ILspPaintableLayer
,ILspStyledLayer
,Serializable
- All Known Implementing Classes:
TLspGXYLayerAdapter
,TLspGXYLayerTreeNodeAdapter
,TLspLayer
,TLspLayerTreeNode
Extension of
ILspPaintableLayer
that paints the contents of its model using an
ILspPainter
. This interface also defines the ability to graphically select and edit
domain objects using an ILspEditor
.- Since:
- 2012.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
ILspLayer.LayerType
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEditingStateListener
(ILspEditingStateListener aListener) /** Adds anILspEditingStateListener
to thisILspInteractivePaintableLayer
.void
editedObjectChanged
(Object aObject) This method should be called when an object that is being edited has changed significantly.default void
editedObjectsChanged
(Collection<Object> aObjectList) This method should be called when a group of objects that is being edited has changed significantly.getEditor
(TLspPaintRepresentation aPaintRepresentation) Returns the editor currently associated with the given paint representation, ornull
if no editor is associated.Returns the objects in the specified paint state.getPainter
(TLspPaintRepresentation aPaintRepresentation) Returns the painter currently associated with the specified paint representation, ornull
if no painter is associated.<T> T
query
(ALspPaintQuery<T> aQuery, TLspContext aContext) Retrieves a set of domain objects and data based on the parameters given by the query.void
Removes anILspEditingStateListener
from thisILspInteractivePaintableLayer
.Methods inherited from interface com.luciad.view.ILcdLayer
clearSelection, fireCollectedSelectionChanges, getIcon, getLabel, getModel, isEditable, isEditableSupported, isSelectable, isSelectableSupported, isVisible, selectObject, setIcon, setLabel, setSelectable
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.luciad.util.ILcdSelection
addSelectionListener, getSelectedObjects, getSelectionCount, isSelected, removeSelectionListener, selectedObjects
Methods inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
addLayerStateListener, addStatusListener, getBounds, getCurrentViews, getLayerStyle, getLayerType, getMapScaleProvider, getModelXYZWorldTransformation, getPaintRepresentations, invalidate, isEditable, isVisible, isVisible, registerView, removeLayerStateListener, removeStatusListener, setEditable, setEditable, setLayerStyle, setVisible, setVisible, setVisible, unregisterView
Methods inherited from interface com.luciad.view.lightspeed.layer.ILspPaintableLayer
getRequiredOpenGLProfile, paint
Methods inherited from interface com.luciad.view.lightspeed.layer.ILspStyledLayer
getStyler
-
Method Details
-
getPainter
Returns the painter currently associated with the specified paint representation, ornull
if no painter is associated.- Parameters:
aPaintRepresentation
- the paint representation for which to obtain a painter- Returns:
- the associated painter if it exists, or
null
otherwise - Throws:
IllegalArgumentException
- ifaPaintRepresentation
is not supported
-
getEditor
Returns the editor currently associated with the given paint representation, ornull
if no editor is associated.- Parameters:
aPaintRepresentation
- the paint representation for which to retrieve an editor- Returns:
- the associated editor if it exists, or
null
otherwise - Throws:
IllegalArgumentException
- ifaPaintRepresentation
is not supported
-
getObjectsWithPaintState
Returns the objects in the specified paint state. The paint state must not beTLspPaintState.REGULAR
, you can usequery(com.luciad.view.lightspeed.query.ALspPaintQuery<T>, com.luciad.view.lightspeed.TLspContext)
instead to get the current regular objects in the view. The state of objects can be modified by adding/removing them from the returned collection. You can be informed when the objects in a certain state change by adding a listener to the returned collection. To avoid threading issues when multiple threads read or write to these collections, it is required to take a read or write lock on this collection when you access it, using theTLcdLockUtil
. For example:ILcdCollection<Object> editedObjects = layer.getObjectsWithPaintState(TLspPaintState.EDITED); try (TLcdLockUtil.Lock lock = TLcdLockUtil.writeLock(editedObjects)) { editedObjects.add(newlySelectedObject, ILcdFireEventMode.FIRE_LATER); } finally { editedObjects.fireCollectedChanges(); }
- Parameters:
aState
- a paint state- Returns:
- the objects
-
editedObjectChanged
This method should be called when an object that is being edited has changed significantly. As a result all editing listeners will be informed of this.- Parameters:
aObject
- the object- See Also:
-
editedObjectsChanged
This method should be called when a group of objects that is being edited has changed significantly. As a result, all editing listeners will be informed of this change.- Parameters:
aObjectList
- A list of domain objects (in this layer) that have changed significantly. Never null.- See Also:
-
addEditingStateListener
/** Adds anILspEditingStateListener
to thisILspInteractivePaintableLayer
.- Parameters:
aListener
- theILspEditingStateListener
to be added.
-
removeEditingStateListener
Removes anILspEditingStateListener
from thisILspInteractivePaintableLayer
.- Parameters:
aListener
- theILspEditingStateListener
to be removed.
-
query
Retrieves a set of domain objects and data based on the parameters given by the query.- Type Parameters:
T
- the type of the return value ofALspPaintQuery.getResult()
- Parameters:
aQuery
- the queryaContext
- the context- Returns:
- the value returned by
ALspPaintQuery.getResult()
after processing is finished - Throws:
UnsupportedOperationException
- if an aspect of the query is not supported by this layer
-