Class TLcyGXYLabelPlacementHint
ILcyGXYLabelPlacementHintProvider
.
A label placement group represents a group of layers. All layers of the same label placement group are labeled together. Also label placement groups place their labels completely independent from other label placement groups. Because of this, it is possible that labels from different groups overlap. The advantage of label placement groups is that slow layers can be labeled separately, and without blocking the labeling process of the other layers.
Note : The returned obstacle provider only returns obstacles for labels of the returned label placement group. It will not provide obstacles for labels of layers from an other label placement group.
- Since:
- 10.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This is the default labeling group used when the labeling group of a label placement hint isnull
. -
Constructor Summary
ConstructorDescriptionTLcyGXYLabelPlacementHint
(ILcdGXYLabelObstacleProvider aLabelObstacleProvider, String aLabelPlacementGroup) Creates a new label placement hint with the given parameters.TLcyGXYLabelPlacementHint
(ILcdGXYLabelLabelingAlgorithmProvider<ILcdGXYLabelingAlgorithm> aLabelingAlgorithmProvider, ILcdGXYLabelObstacleProvider aLabelObstacleProvider, String aLabelPlacementGroup) Deprecated.use the constructor without the label algorithm provider -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.label algorithms should be retrieved from the layerReturns the label obstacle provider.Returns the label placement group.
-
Field Details
-
DEFAULT_LABEL_PLACEMENT_GROUP
This is the default labeling group used when the labeling group of a label placement hint isnull
.- See Also:
-
-
Constructor Details
-
TLcyGXYLabelPlacementHint
public TLcyGXYLabelPlacementHint(ILcdGXYLabelObstacleProvider aLabelObstacleProvider, String aLabelPlacementGroup) Creates a new label placement hint with the given parameters.- Parameters:
aLabelObstacleProvider
- the label obstacle provider for a layer. If this parameter isnull
, no obstacles will be provided for the layer.aLabelPlacementGroup
- the label placement group for a layer. If this parameter isnull
, the background label placement group will be used (DEFAULT_LABEL_PLACEMENT_GROUP
) for the layer.- Since:
- 2020.1
-
TLcyGXYLabelPlacementHint
@Deprecated public TLcyGXYLabelPlacementHint(ILcdGXYLabelLabelingAlgorithmProvider<ILcdGXYLabelingAlgorithm> aLabelingAlgorithmProvider, ILcdGXYLabelObstacleProvider aLabelObstacleProvider, String aLabelPlacementGroup) Deprecated.use the constructor without the label algorithm providerCreates a new label placement hint with the given parameters.- Parameters:
aLabelingAlgorithmProvider
- the labeling algorithm provider used for labels of a layer. If the parameter isnull
, an algorithm provider that always returns a default labeling algorithm will be used.aLabelObstacleProvider
- the label obstacle provider for a layer. If this parameter isnull
, no obstacles will be provided for the layer.aLabelPlacementGroup
- the label placement group for a layer. If this parameter isnull
, the background label placement group will be used (DEFAULT_LABEL_PLACEMENT_GROUP
) for the layer.
-
-
Method Details
-
getLabelingAlgorithmProvider
@Deprecated public ILcdGXYLabelLabelingAlgorithmProvider<ILcdGXYLabelingAlgorithm> getLabelingAlgorithmProvider()Deprecated.label algorithms should be retrieved from the layerReturns the labeling algorithm provider. If it isnull
, and the layer does not provide an algorithm, it will by default be interpreted as an algorithm provider that returns the sameTLcdGXYLabelPainterLocationLabelingAlgorithm
for every label.- Returns:
- the labeling algorithm. Can be
null
.
-
getLabelObstacleProvider
Returns the label obstacle provider. This label obstacle provider will only provider obstacles within the given label placement group (seegetLabelPlacementGroup()
. If it isnull
, it will by default be interpreted as an obstacle provider that returns no obstacles.It should be possible to retrieve obstacles from the returned label obstacles provider without a valid
Graphics
argument (null
).- Returns:
- the label obstacle provider. Can be
null
.
-
getLabelPlacementGroup
Returns the label placement group. If it isnull
, it will by default be interpreted asDEFAULT_LABEL_PLACEMENT_GROUP
. See the class doc for more information on label placement groups.- Returns:
- the label placement group. Can be
null
.
-