All Superinterfaces:
Cloneable, org.gvsig.tools.lang.Cloneable, IStyle, org.gvsig.tools.persistence.Persistent

public interface ILabelStyle extends IStyle
Defines the style that a Label symbol can contain which typically define a background of the label as an Image, the texts that the label holds and their position within the label in rendering time.
Author:
jaume dominguez faus - jaume.dominguez@iver.es
  • Method Details

    • getFieldCount

      int getFieldCount()
      Returns:
      int, the amount of fields this style allows
    • setTextFields

      void setTextFields(String[] texts)
      Sets the texts that will appear in the label.
      Parameters:
      texts -
    • getTextBounds

      Rectangle2D[] getTextBounds()
      Returns an array of rectangles defining the text boxes where text is placed.
      Returns:
    • getSize

      Dimension getSize()
    • getMarkerPoint

      Point2D getMarkerPoint()
      Returns the position of the point labeled by this label in percent units relative to the label bounds. It determines the offset to be applied to the label to be placed and allows the user to use custom styles.
    • setMarkerPoint

      void setMarkerPoint(Point2D p) throws IllegalArgumentException
      Sets the position of the point labeled by this in percent units relative to the label bounds
      Parameters:
      p -
      Throws:
      IllegalArgumentException - if the point coordinates are >0.0 or invalid input: '<'1.0
    • setTextFieldArea

      void setTextFieldArea(int index, Rectangle2D rect)
      Sets a TextFieldArea using its index. With this method the user can modify the size of the rectangle for the TextFieldArea
      Parameters:
      index -
      rect -
    • addTextFieldArea

      void addTextFieldArea(Rectangle2D rect)
      Adds a new TextFieldArea with an specific size which is defined as a rectangle.
      Parameters:
      rect - ,Rectangle2D
      index - ,int
    • deleteTextFieldArea

      void deleteTextFieldArea(int index)
      Delete the TextFieldArea specified by its index.
      Parameters:
      index - ,int
    • setSize

      void setSize(double width, double height)
      Sets the size for a laber and stablishes an unit scale factor to not change too much its content
      Parameters:
      width -
      height -
    • getBackgroundFileStyle

      IBackgroundFileStyle getBackgroundFileStyle()
    • setBackgroundFileStyle

      void setBackgroundFileStyle(IBackgroundFileStyle background)