Class TLspMultiObjectEditContext
java.lang.Object
com.luciad.view.lightspeed.editor.TLspMultiObjectEditContext
Provides context information about multiple objects, such as the objects being edited, its
paint representations and its layers. This edit context contains the contexts for the edited
objects, as well as for its handles (which can be painted in a different layer for example).
This context is used for multi object handles, which makes it possible to edit multiple objects at the same time.
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionCreates a new context.Creates a new context from the given context. -
Method Summary
Modifier and TypeMethodDescriptiongetGeometry
(Object aObject) Returns the geometry for the given object.getHandleContext
(Object aObject) Returns the context for the handles.getHandlePaintRepresentation
(Object aObject) Returns the paint representation for the handles.getObjectContext
(Object aObject) Returns the context for the edited object.getObjectPaintRepresentation
(Object aObject) Returns the paint representation for the edited object.Returns the objects for which this edit context contains context information.double
Returns the sensitivity.void
putObject
(Object aObject, Object aGeometry, TLspPaintRepresentation aObjectPaintRepresentation, ILspInteractivePaintableLayer aObjectLayer, TLspPaintRepresentation aHandlePaintRepresentation, ILspInteractivePaintableLayer aHandleLayer, ILspView aView) Adds context for the given object to this multi object edit context.void
removeObject
(Object aObject) Removes the context information for the given object from this multi object edit context.void
setSensitivity
(double aSensitivity) This setting determines for example how close one needs to be to a handle or to a point to be able to move it.
-
Constructor Details
-
TLspMultiObjectEditContext
public TLspMultiObjectEditContext()Creates a new context. Before using this context, it should still be initialized properly. -
TLspMultiObjectEditContext
Creates a new context from the given context.- Parameters:
aContext
- a given context.
-
-
Method Details
-
getSensitivity
public double getSensitivity()Returns the sensitivity.- Returns:
- the sensitivity.
- See Also:
-
setSensitivity
public void setSensitivity(double aSensitivity) This setting determines for example how close one needs to be to a handle or to a point to be able to move it. The sensitivity is expressed in pixels.- Parameters:
aSensitivity
- the sensitivity.
-
getObjects
Returns the objects for which this edit context contains context information. The returned collection is an unmodifiable collection.Note: these objects can be different than the geometry that is being edited, see also
getGeometry
. In most cases the geometry is needed, as this is the object that is actually being edited.- Returns:
- the objects for which this edit context contains context information.
-
putObject
public void putObject(Object aObject, Object aGeometry, TLspPaintRepresentation aObjectPaintRepresentation, ILspInteractivePaintableLayer aObjectLayer, TLspPaintRepresentation aHandlePaintRepresentation, ILspInteractivePaintableLayer aHandleLayer, ILspView aView) Adds context for the given object to this multi object edit context. If this context already contains information for the given object, it is replaced by the new information.- Parameters:
aObject
- the object that is being edited.aGeometry
- the geometry that is being edited. Can benull
, and in that case, the given object is used as geometry.aObjectPaintRepresentation
- the paint representation of the object that is being edited.aObjectLayer
- the layer of the object that is being edited.aHandlePaintRepresentation
- the paint representation of the handles.aHandleLayer
- the handle layer.aView
- the view.
-
removeObject
Removes the context information for the given object from this multi object edit context.- Parameters:
aObject
- an object.
-
getGeometry
Returns the geometry for the given object. Note that this could be equal to the object. If not context information was added for the given object, this method throws anIllegalArgumentException
. If no geometry was set, this method will return the given object. The geometry is defined in the same reference as the domain object. To obtain this reference, usegetObjectContext
and retrieve the model reference of the given object.- Parameters:
aObject
- the object for which to retrieve the geometry.- Returns:
- the geometry being edited.
-
getObjectPaintRepresentation
Returns the paint representation for the edited object.- Parameters:
aObject
- the object for which to retrieve the paint representation.- Returns:
- the paint representation for the edited object.
- See Also:
-
getObjectContext
Returns the context for the edited object.- Parameters:
aObject
- the object for which to retrieve the context.- Returns:
- the context for the edited object.
-
getHandlePaintRepresentation
Returns the paint representation for the handles.- Parameters:
aObject
- the object for which to retrieve the handle paint representation- Returns:
- the paint representation for the handles.
- See Also:
-
getHandleContext
Returns the context for the handles. This context contains the layer in which handles are visualized. Using this context makes it for example possible to doisTouched
queries on the projected base shape of a 3D object.- Parameters:
aObject
- the object for which to retrieve the handle context- Returns:
- the context for the handles.
- See Also:
-