All Superinterfaces:
Cloneable, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent
All Known Subinterfaces:
IBackgroundFileStyle, ILabelStyle

public interface IStyle extends org.gvsig.tools.persistence.Persistent, org.gvsig.tools.lang.Cloneable
Used by Objects that have to define an style for them.This interface has methods to stablish a description and get it,to specify if an object that implements this interface is suitable for a kind of symbol and other methods to draw symbols.
Author:
jaume dominguez faus - jaume.dominguez@iver.es
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Useful to render the symbol inside the TOC, or inside little rectangles.
    void
    Used to show an outline of the style to graphically show its properties.
    Returns the description of a symbol
    boolean
    True if this symbol is ok for the style or class.
    void
    Defines the description of a symbol.It will be specified with an string.

    Methods inherited from interface org.gvsig.tools.lang.Cloneable

    clone

    Methods inherited from interface org.gvsig.tools.persistence.Persistent

    loadFromState, saveToState
  • Method Details

    • setDescription

      void setDescription(String desc)
      Defines the description of a symbol.It will be specified with an string.
      Parameters:
      desc - ,String
    • getDescription

      String getDescription()
      Returns the description of a symbol
      Returns:
      Description of a symbol
    • drawInsideRectangle

      void drawInsideRectangle(Graphics2D g, Rectangle r) throws SymbolDrawingException
      Useful to render the symbol inside the TOC, or inside little rectangles. For example, think about rendering a Label with size in meters => You will need to specify a size in pixels. Of course. You may also preffer to render a prepared image, etc.
      Parameters:
      g - Graphics2D
      r - Rectangle
      Throws:
      SymbolDrawingException
    • isSuitableFor

      boolean isSuitableFor(ISymbol symbol)
      True if this symbol is ok for the style or class.
      Parameters:
      symbol - ISymbol
    • drawOutline

      void drawOutline(Graphics2D g, Rectangle r) throws SymbolDrawingException
      Used to show an outline of the style to graphically show its properties.
      Parameters:
      g - , the Graphics2D where to draw
      r - , the bounds of the style inside such Graphics2D
      Throws:
      SymbolDrawingException