Interface ILspLabelPlacementEvaluator
public interface ILspLabelPlacementEvaluator
Interface that allows to evaluate a placement for a label.
- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Placement result for a label. -
Method Summary
Modifier and TypeMethodDescriptionevaluatePlacement
(TLspLabelPlacement aPlacement, ILspLabelConflictChecker.Conflict aConflict, List<TLspLabelPlacement> aPlacements, ALspLabelLocations aCurrentLabelLocations) This method evaluates the given label placement and returns aPlacementResult
to determine if the placement can be used for its label or not.void
noPlacementApplied
(TLspLabelID aLabel, List<TLspLabelPlacement> aPlacements, ALspLabelLocations aCurrentLabelLocations) This method can be called to notify that noTLspLabelPlacement
is chosen as placement for the given label.void
placementApplied
(TLspLabelPlacement aPlacement, List<TLspLabelPlacement> aPlacements, ALspLabelLocations aCurrentLabelLocations) This method can be called to notify that a givenTLspLabelPlacement
is chosen as the placement for a label.
-
Method Details
-
evaluatePlacement
ILspLabelPlacementEvaluator.PlacementResult evaluatePlacement(TLspLabelPlacement aPlacement, ILspLabelConflictChecker.Conflict aConflict, List<TLspLabelPlacement> aPlacements, ALspLabelLocations aCurrentLabelLocations) This method evaluates the given label placement and returns aPlacementResult
to determine if the placement can be used for its label or not. It can make this decision based on aConflict
returned by anILspLabelConflictChecker
and a list of already placed labels.- Parameters:
aPlacement
- the placement to evaluate.aConflict
- aConflict
returned by anILspLabelConflictChecker
, can benull
.aPlacements
- a list of already placed labels.aCurrentLabelLocations
- an ALspLabelLocations object containing locations for the currently placed labels.- Returns:
- a
PlacementResult
.
-
placementApplied
void placementApplied(TLspLabelPlacement aPlacement, List<TLspLabelPlacement> aPlacements, ALspLabelLocations aCurrentLabelLocations) This method can be called to notify that a givenTLspLabelPlacement
is chosen as the placement for a label.- Parameters:
aPlacement
- the applied placement.aPlacements
- the list of currently placed labels.aCurrentLabelLocations
- an ALspLabelLocations object containing locations for the currently placed labels.
-
noPlacementApplied
void noPlacementApplied(TLspLabelID aLabel, List<TLspLabelPlacement> aPlacements, ALspLabelLocations aCurrentLabelLocations) This method can be called to notify that noTLspLabelPlacement
is chosen as placement for the given label.- Parameters:
aLabel
- the label for which no valid placement was found.aPlacements
- the list of currently placed labels.aCurrentLabelLocations
- an ALspLabelLocations object containing locations for the currently placed labels.
-