Class TLcdKML22GXYLabelPainterProvider

java.lang.Object
com.luciad.format.kml22.view.gxy.TLcdKML22GXYLabelPainterProvider
All Implemented Interfaces:
ILcdGXYLabelPainterProvider, Serializable, Cloneable

public class TLcdKML22GXYLabelPainterProvider extends Object implements ILcdGXYLabelPainterProvider

A GXY label painter for KML features.

The current implementation supports the labeling of Placemarks and PhotoOverlays.

Since:
10.0
See Also:
  • Constructor Details

    • TLcdKML22GXYLabelPainterProvider

      public TLcdKML22GXYLabelPainterProvider(TLcdKML22ResourceProvider aResourceProvider)

      Creates a new instance of this label painter

  • Method Details

    • getGXYLabelPainter

      public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject)
      Description copied from interface: ILcdGXYLabelPainterProvider
      Finds an ILcdGXYLabelPainter that can be used to label the object passed.

      The label painter provider is responsible for setting the object to the label painter before returning the label painter. An implementation should therefore have the following structure:

      
       public ILcdGXYLabelPainter getGXYLabelPainter(Object aObject) {
         ILcdGXYLabelPainter labelPainter = ... // find the label painter for the object
         if (labelPainter != null) {
          labelPainter.setObject(aObject);
         }
         return labelPainter;
       }
       

      Specified by:
      getGXYLabelPainter in interface ILcdGXYLabelPainterProvider
      Parameters:
      aObject - the object to find a label painter for
      Returns:
      a label painter that can be used to label the object; or null if no label painter could be found for the given object, or the object could not be set on the retrieved label painter.
    • clone

      public Object clone()
      Description copied from interface: ILcdGXYLabelPainterProvider
      Redefines Object.clone to make it public.
      Specified by:
      clone in interface ILcdGXYLabelPainterProvider
      Overrides:
      clone in class Object
    • setDefaultFont

      public void setDefaultFont(Font aDefaultFont)

      Sets the default font template used to model any font from a label style. For instance, the scale attribute of a label style defines a relative scaling of the size of the font. This font will be used as a starting point.

      Parameters:
      aDefaultFont - A font
    • getDefaultFont

      public Font getDefaultFont()

      Gets the default font template used to derive any fonts from a label style.

      Returns:
      the default font used by this label painter provider
      See Also:
    • setMinimumFontSize

      public void setMinimumFontSize(double aMinimumFontSize)

      Sets the minimum font size for this label painter. Setting this value prevents any fonts from being smaller than the given size

      Parameters:
      aMinimumFontSize - The minimum font size
    • setMaximumFontSize

      public void setMaximumFontSize(double aMaximumFontSize)

      Sets the maximum font size for this label painter. Setting this value prevents any fonts from being larger than the given size

      Parameters:
      aMaximumFontSize - The maximum font size
    • getMinimumFontSize

      public double getMinimumFontSize()

      Returns the minimum font size for this label painter

      Returns:
      The minimum font size for this label painter.
    • getMaximumFontSize

      public double getMaximumFontSize()

      Returns the maximum font size for this label painter

      Returns:
      The maximum font size for this label painter