Class TLspMultiObjectEditContext

java.lang.Object
com.luciad.view.lightspeed.editor.TLspMultiObjectEditContext

public class TLspMultiObjectEditContext extends Object
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 Details

    • TLspMultiObjectEditContext

      public TLspMultiObjectEditContext()
      Creates a new context. Before using this context, it should still be initialized properly.
    • TLspMultiObjectEditContext

      public TLspMultiObjectEditContext(TLspMultiObjectEditContext aContext)
      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

      public Collection<Object> 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 be null, 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

      public void removeObject(Object aObject)
      Removes the context information for the given object from this multi object edit context.
      Parameters:
      aObject - an object.
    • getGeometry

      public Object getGeometry(Object aObject)
      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 an IllegalArgumentException. 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, use getObjectContext 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

      public TLspPaintRepresentation getObjectPaintRepresentation(Object aObject)
      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

      public TLspContext getObjectContext(Object aObject)
      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

      public TLspPaintRepresentation getHandlePaintRepresentation(Object aObject)
      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

      public TLspContext getHandleContext(Object aObject)
      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 do isTouched 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: