Class TLcdCollectedLabelInfoList

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

public class TLcdCollectedLabelInfoList extends Object
This class contains all labels to be placed. It also provides methods to query labels or labeled objects.
Since:
10.1
  • Constructor Details

    • TLcdCollectedLabelInfoList

      public TLcdCollectedLabelInfoList()
  • Method Details

    • addLabel

      public void addLabel(TLcdCollectedLabelInfo aLabel)
      Adds the given label to this label infos object.
      Parameters:
      aLabel - a label.
    • sortLabels

      public void sortLabels(Comparator<TLcdCollectedLabelInfo> aComparator)
      This method sorts the labels in this TLcdCollectedLabelInfoList object using the given comparator.
      Parameters:
      aComparator - a given comparator.
    • mergeLabelInfoList

      public void mergeLabelInfoList(TLcdCollectedLabelInfoList aLabelInfoListSFCT)
      This method merges the given TLcdCollectedLabelInfoList into this object. It also makes sure that duplicate TLcdCollectedLabeledObjectInfo objects are merged. Because of this, it is possible that the given TLcdCollectedLabelInfoList object is adjusted. It will still contains the same TLcdCollectedLabelInfo objects, but some TLcdCollectedLabeledObjectInfo objects may have changed.
      Parameters:
      aLabelInfoListSFCT - a TLcdCollectedLabelInfoList.
    • getLabels

      public List<TLcdCollectedLabelInfo> getLabels()
      Returns the list of TLcdCollectedLabelInfo objects. The labels are returned in an unspecified order. Modifying the returned list will not have an influence on the internal state of this class.
      Returns:
      the list of TLcdCollectedLabelInfo objects.
    • getLabel

      public TLcdCollectedLabelInfo getLabel(ILcdLayer aLayer, Object aObject, int aLabelIndex, int aSubLabelIndex)
      Returns the TLcdCollectedLabelInfo object that corresponds with the given ILcdLayer, Object, label index and sublabel index, or null if no such label info object could be found. A label can only be returned if it was added to this TLcdCollectedLabelInfoList object, otherwise null is returned.
      Parameters:
      aLayer - a layer.
      aObject - an object.
      aLabelIndex - a label index.
      aSubLabelIndex - a sublabel index.
      Returns:
      the TLcdCollectedLabelInfo object that corresponds with the given Object, label index and sublabel index, or null if no such label could be found, or if a found label was not added to this TLcdCollectedLabelInfoList.
    • containsLabel

      public boolean containsLabel(ILcdLayer aLayer, Object aObject, int aLabelIndex, int aSubLabelIndex)
      Checks if this TLcdCollectedLabelInfoList object contains the label identified by the given ILcdLayer, Object, label index and sublabel index.
      Parameters:
      aLayer - a layer.
      aObject - an object.
      aLabelIndex - a label index.
      aSubLabelIndex - a sublabel index.
      Returns:
      true if this TLcdCollectedLabelInfoList object contains the label, and false otherwise.
    • getLabeledObjects

      public List<TLcdCollectedLabeledObjectInfo> getLabeledObjects()
      Returns a list of TLcdCollectedLabeledObjectInfo objects. These labels are retrieved using all added TLcdCollectedLabelInfo objects added to this object. The labeled objects are returned in an unspecified order. Modifying the returned list will not have an influence on the internal state of this class.
      Returns:
      a list of TLcdCollectedLabeledObjectInfo objects.
    • getLabeledObject

      public TLcdCollectedLabeledObjectInfo getLabeledObject(ILcdLayer aLayer, Object aObject)
      Returns a TLcdCollectedLabeledObjectInfo for the given (ILcdLayer, Object) pair, or null if no TLcdCollectedLabeledObjectInfo could be found.
      Parameters:
      aLayer - a layer.
      aObject - an object to be labeled.
      Returns:
      a TLcdCollectedLabeledObjectInfo for the given Object, or null if no TLcdCollectedLabeledObjectInfo could be found.
    • containsLabeledObject

      public boolean containsLabeledObject(ILcdLayer aLayer, Object aObject)
      Checks if this TLcdCollectedLabelInfoList object contains the TLcdCollectedLabeledObjectInfo identified by the given ILcdLayer and Object.
      Parameters:
      aLayer - a layer.
      aObject - an object.
      Returns:
      true if this TLcdCollectedLabelInfoList object contains the TLcdCollectedLabeledObjectInfo, and false otherwise.
    • getLabelsForLabeledObject

      public List<TLcdCollectedLabelInfo> getLabelsForLabeledObject(ILcdLayer aLayer, Object aObject)
      This method returns all TLcdCollectedLabelInfo objects for the given labeled object identified by the given ILcdLayer and Object.
      Parameters:
      aLayer - a layer.
      aObject - a labeled object.
      Returns:
      a list of TLcdCollectedLabelInfo object for the given labeled object. If no TLcdCollectedLabelInfo can be found, an empty list is returned. Modifying the returned List has no influence on the inner working of this class.