Class TLspEditContext
java.lang.Object
com.luciad.view.lightspeed.editor.TLspEditContext
Provides context information to editors, such as the object being edited, its paint
representation or its layer. This edit context contains the context for the edited objects,
as well as for its handles (which can be painted in a different layer for example).
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionCreates a new context.TLspEditContext
(TLspEditContext aEditContext) Creates a new context from the given context.TLspEditContext
(ILspView aView, Object aObject, TLspPaintRepresentation aObjectPaintRepresentation, ILspInteractivePaintableLayer aObjectLayer, TLspPaintRepresentation aHandlePaintRepresentation, ILspInteractivePaintableLayer aHandleLayer, double aSensitivity, Object aGeometry) Creates a new edit context with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the geometry.Returns the context for the handles.returns the paint representation for the handles.Returns the object that is being edited.Returns the context for the edited object.Returns the paint representation for the edited object.double
Returns the sensitivity.void
setGeometry
(Object aGeometry) Sets the geometry that is being edited.void
setHandlePaintRepresentation
(TLspPaintRepresentation aHandlePaintRepresentation) Sets the paint representation for the handles.void
Sets the object that is being edited.void
setObjectPaintRepresentation
(TLspPaintRepresentation aObjectPaintRepresentation) Sets the paint representation for the edited object.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
-
TLspEditContext
public TLspEditContext()Creates a new context. Before using this context, it should still be initialized properly. -
TLspEditContext
Creates a new context from the given context.- Parameters:
aEditContext
- an edit context.
-
TLspEditContext
public TLspEditContext(ILspView aView, Object aObject, TLspPaintRepresentation aObjectPaintRepresentation, ILspInteractivePaintableLayer aObjectLayer, TLspPaintRepresentation aHandlePaintRepresentation, ILspInteractivePaintableLayer aHandleLayer, double aSensitivity, Object aGeometry) Creates a new edit context with the given parameters.- Parameters:
aView
- the view.aObject
- the object that is being edited.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.aSensitivity
- the sensitivity.aGeometry
- the geometry that is being edited. Can benull
, in that case,aObject
is returned as geometry.
-
-
Method Details
-
getObjectContext
Returns the context for the edited object.- Returns:
- the context for the edited object.
-
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.- Returns:
- the context for the handles.
- See Also:
-
getObject
Returns the object that is being edited. Note: this object can be different than the geometry that is being edited, see alsogetGeometry
. In most cases the geometry is needed, as this is the object that is actually being edited. The object returned by this method is mostly provided as context information.- Returns:
- the object that is being edited.
-
setObject
Sets the object that is being edited.- Parameters:
aObject
- the object being edited.- See Also:
-
getGeometry
Returns the geometry. Note that this could be equal to the object. If no geometry was set, this method will return the edited 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 domain object.- Returns:
- the geometry being edited.
-
setGeometry
Sets the geometry that is being edited.- Parameters:
aGeometry
- the geometry being edited.- See Also:
-
getObjectPaintRepresentation
Returns the paint representation for the edited object.- Returns:
- the paint representation for the edited object.
- See Also:
-
setObjectPaintRepresentation
Sets the paint representation for the edited object.- Parameters:
aObjectPaintRepresentation
- the paint representation for the edited object.- See Also:
-
getHandlePaintRepresentation
returns the paint representation for the handles. This is the paint representation used in the handle layer, in which the handles are visualized.- Returns:
- the paint representation for the handles.
- See Also:
-
setHandlePaintRepresentation
Sets the paint representation for the handles.- Parameters:
aHandlePaintRepresentation
- the paint representation for the handles.- See Also:
-
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.
-