Class TLcyGXYLabelPlacementHint

java.lang.Object
com.luciad.lucy.map.labeling.TLcyGXYLabelPlacementHint

public class TLcyGXYLabelPlacementHint extends Object
A label placement hint fine-tunes label placement with a labeling group and a label obstacle provider. It is created and returned by an 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 Details

    • DEFAULT_LABEL_PLACEMENT_GROUP

      public static final String DEFAULT_LABEL_PLACEMENT_GROUP
      This is the default labeling group used when the labeling group of a label placement hint is null.
      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 is null, no obstacles will be provided for the layer.
      aLabelPlacementGroup - the label placement group for a layer. If this parameter is null, 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 provider
      Creates a new label placement hint with the given parameters.
      Parameters:
      aLabelingAlgorithmProvider - the labeling algorithm provider used for labels of a layer. If the parameter is null, an algorithm provider that always returns a default labeling algorithm will be used.
      aLabelObstacleProvider - the label obstacle provider for a layer. If this parameter is null, no obstacles will be provided for the layer.
      aLabelPlacementGroup - the label placement group for a layer. If this parameter is null, the background label placement group will be used (DEFAULT_LABEL_PLACEMENT_GROUP) for the layer.
  • Method Details

    • getLabelingAlgorithmProvider

      Deprecated.
      label algorithms should be retrieved from the layer
      Returns the labeling algorithm provider. If it is null, and the layer does not provide an algorithm, it will by default be interpreted as an algorithm provider that returns the same TLcdGXYLabelPainterLocationLabelingAlgorithm for every label.
      Returns:
      the labeling algorithm. Can be null.
    • getLabelObstacleProvider

      public ILcdGXYLabelObstacleProvider getLabelObstacleProvider()
      Returns the label obstacle provider. This label obstacle provider will only provider obstacles within the given label placement group (see getLabelPlacementGroup(). If it is null, 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

      public String getLabelPlacementGroup()
      Returns the label placement group. If it is null, it will by default be interpreted as DEFAULT_LABEL_PLACEMENT_GROUP. See the class doc for more information on label placement groups.
      Returns:
      the label placement group. Can be null.