Class TLcdCollectedLabeledObjectInfo

java.lang.Object
com.luciad.view.labeling.algorithm.TLcdCollectedLabeledObjectInfo

public class TLcdCollectedLabeledObjectInfo extends Object
This class contains all information about a labeled object for which labels can be placed. A labeled object can be identified by an ILcdLayer and an Object. It also contains properties that can be used to store custom information.
Since:
10.1
  • Field Details

    • OBJECT_SELECTED_KEY

      public static final String OBJECT_SELECTED_KEY
      This key is used to store if an object is selected. The returned Object is a Boolean.
      See Also:
    • OBJECT_ANCHOR_POINT_KEY

      public static final String OBJECT_ANCHOR_POINT_KEY
      This key is used to store the anchor point of an object. The returned Object is a Point.
      See Also:
    • LAYER_INDEX_KEY

      public static final String LAYER_INDEX_KEY
      This key is used to store a layer index. This index can for example be used to give priorities to layer, or to sort labels. The returned Object is an Integer.
      See Also:
  • Constructor Details

    • TLcdCollectedLabeledObjectInfo

      public TLcdCollectedLabeledObjectInfo(Object aDomainObject, ILcdLayer aLayer)
      Creates a new TLcdCollectedLabeledObjectInfo for the given object and layer.
      Parameters:
      aDomainObject - the object to be labeled.
      aLayer - the layer which contains the labeled object.
  • Method Details

    • getProperties

      public Map<String,Object> getProperties()
      Returns a map that can be used to store and retrieve info properties using a String key.
      Returns:
      a map that can be used to store and retrieve info properties using a String key.
    • getDomainObject

      public Object getDomainObject()
      Returns the labeled object.
      Returns:
      the labeled object.
    • getLayer

      public ILcdLayer getLayer()
      Returns the layer which contains the labeled object.
      Returns:
      the layer which contains the labeled object.
    • setLayer

      public void setLayer(ILcdLayer aLayer)
      Sets the layer to the given layer.
      Parameters:
      aLayer - a layer.
    • isObjectSelected

      public Boolean isObjectSelected()
      Returns if this labeled object is selected.

      This method is a convenience method. It uses getProperties() internally with OBJECT_SELECTED_KEY as key.

      Returns:
      the selected status of the object set in this labeled info object.
    • setObjectSelected

      public void setObjectSelected(Boolean aSelected)
      Sets if this labeled object is selected or not.

      This method is a convenience method. It uses getProperties() internally with OBJECT_SELECTED_KEY as key.

      Parameters:
      aSelected - the selected status of the object set in this labeled object.
    • getObjectAnchorPoint

      public Point getObjectAnchorPoint()
      Returns the anchor point of this labeled object.

      This method is a convenience method. It uses getProperties() internally with OBJECT_ANCHOR_POINT_KEY as key.

      Returns:
      the anchor point of the object set in this labeled info object, or null if it does not exist.
    • setObjectAnchorPoint

      public void setObjectAnchorPoint(Point aAnchorPoint)
      Sets the anchor point of this labeled object.

      This method is a convenience method. It uses getProperties() internally with OBJECT_ANCHOR_POINT_KEY as key.

      Parameters:
      aAnchorPoint - the anchor point of this labeled object.
    • getLayerIndex

      public Integer getLayerIndex()
      Returns the layer index set in this labeled object.

      This method is a convenience method. It uses getProperties() internally with LAYER_INDEX_KEY as key.

      Returns:
      the layer index set in this labeled info object, or null if it does not exist.
    • setLayerIndex

      public void setLayerIndex(Integer aLayerIndex)
      Sets a layer index in this labeled object.

      This method is a convenience method. It uses getProperties() internally with LAYER_INDEX_KEY as key.

      Parameters:
      aLayerIndex - a layer index.