Class TLcdCollectedLabelInfoList
java.lang.Object
com.luciad.view.labeling.algorithm.TLcdCollectedLabelInfoList
This class contains all labels to be placed. It also provides methods to query labels or
labeled objects.
- Since:
- 10.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLabel(TLcdCollectedLabelInfo aLabel) Adds the given label to this label infos object.booleancontainsLabel(ILcdLayer aLayer, Object aObject, int aLabelIndex, int aSubLabelIndex) Checks if thisTLcdCollectedLabelInfoListobject contains the label identified by the given ILcdLayer, Object, label index and sublabel index.booleancontainsLabeledObject(ILcdLayer aLayer, Object aObject) Checks if thisTLcdCollectedLabelInfoListobject contains theTLcdCollectedLabeledObjectInfoidentified by the given ILcdLayer and Object.Returns theTLcdCollectedLabelInfoobject that corresponds with the given ILcdLayer, Object, label index and sublabel index, ornullif no such label info object could be found.getLabeledObject(ILcdLayer aLayer, Object aObject) Returns aTLcdCollectedLabeledObjectInfofor the given (ILcdLayer, Object) pair, ornullif noTLcdCollectedLabeledObjectInfocould be found.Returns a list ofTLcdCollectedLabeledObjectInfoobjects.Returns the list ofTLcdCollectedLabelInfoobjects.getLabelsForLabeledObject(ILcdLayer aLayer, Object aObject) This method returns allTLcdCollectedLabelInfoobjects for the given labeled object identified by the givenILcdLayerandObject.voidmergeLabelInfoList(TLcdCollectedLabelInfoList aLabelInfoListSFCT) This method merges the givenTLcdCollectedLabelInfoListinto this object.voidsortLabels(Comparator<TLcdCollectedLabelInfo> aComparator) This method sorts the labels in thisTLcdCollectedLabelInfoListobject using the given comparator.
-
Constructor Details
-
TLcdCollectedLabelInfoList
public TLcdCollectedLabelInfoList()
-
-
Method Details
-
addLabel
Adds the given label to this label infos object.- Parameters:
aLabel- a label.
-
sortLabels
This method sorts the labels in thisTLcdCollectedLabelInfoListobject using the given comparator.- Parameters:
aComparator- a given comparator.
-
mergeLabelInfoList
This method merges the givenTLcdCollectedLabelInfoListinto this object. It also makes sure that duplicateTLcdCollectedLabeledObjectInfoobjects are merged. Because of this, it is possible that the givenTLcdCollectedLabelInfoListobject is adjusted. It will still contains the sameTLcdCollectedLabelInfoobjects, but someTLcdCollectedLabeledObjectInfoobjects may have changed.- Parameters:
aLabelInfoListSFCT- aTLcdCollectedLabelInfoList.
-
getLabels
Returns the list ofTLcdCollectedLabelInfoobjects. 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
TLcdCollectedLabelInfoobjects.
-
getLabel
public TLcdCollectedLabelInfo getLabel(ILcdLayer aLayer, Object aObject, int aLabelIndex, int aSubLabelIndex) Returns theTLcdCollectedLabelInfoobject that corresponds with the given ILcdLayer, Object, label index and sublabel index, ornullif no such label info object could be found. A label can only be returned if it was added to thisTLcdCollectedLabelInfoListobject, otherwisenullis returned.- Parameters:
aLayer- a layer.aObject- an object.aLabelIndex- a label index.aSubLabelIndex- a sublabel index.- Returns:
- the
TLcdCollectedLabelInfoobject that corresponds with the given Object, label index and sublabel index, ornullif no such label could be found, or if a found label was not added to thisTLcdCollectedLabelInfoList.
-
containsLabel
Checks if thisTLcdCollectedLabelInfoListobject 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:
trueif thisTLcdCollectedLabelInfoListobject contains the label, andfalseotherwise.
-
getLabeledObjects
Returns a list ofTLcdCollectedLabeledObjectInfoobjects. These labels are retrieved using all addedTLcdCollectedLabelInfoobjects 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
TLcdCollectedLabeledObjectInfoobjects.
-
getLabeledObject
Returns aTLcdCollectedLabeledObjectInfofor the given (ILcdLayer, Object) pair, ornullif noTLcdCollectedLabeledObjectInfocould be found.- Parameters:
aLayer- a layer.aObject- an object to be labeled.- Returns:
- a
TLcdCollectedLabeledObjectInfofor the given Object, ornullif noTLcdCollectedLabeledObjectInfocould be found.
-
containsLabeledObject
Checks if thisTLcdCollectedLabelInfoListobject contains theTLcdCollectedLabeledObjectInfoidentified by the given ILcdLayer and Object.- Parameters:
aLayer- a layer.aObject- an object.- Returns:
trueif thisTLcdCollectedLabelInfoListobject contains theTLcdCollectedLabeledObjectInfo, andfalseotherwise.
-
getLabelsForLabeledObject
This method returns allTLcdCollectedLabelInfoobjects for the given labeled object identified by the givenILcdLayerandObject.- Parameters:
aLayer- a layer.aObject- a labeled object.- Returns:
- a list of
TLcdCollectedLabelInfoobject for the given labeled object. If noTLcdCollectedLabelInfocan be found, an empty list is returned. Modifying the returnedListhas no influence on the inner working of this class.
-