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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLabel
(TLcdCollectedLabelInfo aLabel) Adds the given label to this label infos object.boolean
containsLabel
(ILcdLayer aLayer, Object aObject, int aLabelIndex, int aSubLabelIndex) Checks if thisTLcdCollectedLabelInfoList
object contains the label identified by the given ILcdLayer, Object, label index and sublabel index.boolean
containsLabeledObject
(ILcdLayer aLayer, Object aObject) Checks if thisTLcdCollectedLabelInfoList
object contains theTLcdCollectedLabeledObjectInfo
identified by the given ILcdLayer and Object.Returns theTLcdCollectedLabelInfo
object that corresponds with the given ILcdLayer, Object, label index and sublabel index, ornull
if no such label info object could be found.getLabeledObject
(ILcdLayer aLayer, Object aObject) Returns aTLcdCollectedLabeledObjectInfo
for the given (ILcdLayer, Object) pair, ornull
if noTLcdCollectedLabeledObjectInfo
could be found.Returns a list ofTLcdCollectedLabeledObjectInfo
objects.Returns the list ofTLcdCollectedLabelInfo
objects.getLabelsForLabeledObject
(ILcdLayer aLayer, Object aObject) This method returns allTLcdCollectedLabelInfo
objects for the given labeled object identified by the givenILcdLayer
andObject
.void
mergeLabelInfoList
(TLcdCollectedLabelInfoList aLabelInfoListSFCT) This method merges the givenTLcdCollectedLabelInfoList
into this object.void
sortLabels
(Comparator<TLcdCollectedLabelInfo> aComparator) This method sorts the labels in thisTLcdCollectedLabelInfoList
object 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 thisTLcdCollectedLabelInfoList
object using the given comparator.- Parameters:
aComparator
- a given comparator.
-
mergeLabelInfoList
This method merges the givenTLcdCollectedLabelInfoList
into this object. It also makes sure that duplicateTLcdCollectedLabeledObjectInfo
objects are merged. Because of this, it is possible that the givenTLcdCollectedLabelInfoList
object is adjusted. It will still contains the sameTLcdCollectedLabelInfo
objects, but someTLcdCollectedLabeledObjectInfo
objects may have changed.- Parameters:
aLabelInfoListSFCT
- aTLcdCollectedLabelInfoList
.
-
getLabels
Returns the list ofTLcdCollectedLabelInfo
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 theTLcdCollectedLabelInfo
object that corresponds with the given ILcdLayer, Object, label index and sublabel index, ornull
if no such label info object could be found. A label can only be returned if it was added to thisTLcdCollectedLabelInfoList
object, otherwisenull
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, ornull
if no such label could be found, or if a found label was not added to thisTLcdCollectedLabelInfoList
.
-
containsLabel
Checks if thisTLcdCollectedLabelInfoList
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 thisTLcdCollectedLabelInfoList
object contains the label, andfalse
otherwise.
-
getLabeledObjects
Returns a list ofTLcdCollectedLabeledObjectInfo
objects. These labels are retrieved using all addedTLcdCollectedLabelInfo
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
Returns aTLcdCollectedLabeledObjectInfo
for the given (ILcdLayer, Object) pair, ornull
if noTLcdCollectedLabeledObjectInfo
could be found.- Parameters:
aLayer
- a layer.aObject
- an object to be labeled.- Returns:
- a
TLcdCollectedLabeledObjectInfo
for the given Object, ornull
if noTLcdCollectedLabeledObjectInfo
could be found.
-
containsLabeledObject
Checks if thisTLcdCollectedLabelInfoList
object contains theTLcdCollectedLabeledObjectInfo
identified by the given ILcdLayer and Object.- Parameters:
aLayer
- a layer.aObject
- an object.- Returns:
true
if thisTLcdCollectedLabelInfoList
object contains theTLcdCollectedLabeledObjectInfo
, andfalse
otherwise.
-
getLabelsForLabeledObject
This method returns allTLcdCollectedLabelInfo
objects for the given labeled object identified by the givenILcdLayer
andObject
.- Parameters:
aLayer
- a layer.aObject
- a labeled object.- Returns:
- a list of
TLcdCollectedLabelInfo
object for the given labeled object. If noTLcdCollectedLabelInfo
can be found, an empty list is returned. Modifying the returnedList
has no influence on the inner working of this class.
-