java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.BackgroundFileStyle
All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport, org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle, org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent
Direct Known Subclasses:
ImageStyle, RemoteFileStyle, SVGStyle

public abstract class BackgroundFileStyle extends AbstractStyle implements org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle
Defines methods that allows the user to create an style based in a background file.For this reason, BackgroundFileStyle will have a parameter that will be an string in order to specify this source file.
Author:
jaume dominguez faus - jaume.dominguez@iver.es
  • Field Details

    • BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME

      public static final String BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME
      See Also:
    • SOURCE_SYMBOL_IN_LIBRARY

      protected static final String SOURCE_SYMBOL_IN_LIBRARY
      See Also:
    • source

      protected URL source
    • symbolTable

      protected org.gvsig.expressionevaluator.SymbolTable symbolTable
  • Constructor Details

    • BackgroundFileStyle

      public BackgroundFileStyle()
  • Method Details

    • createStyleByURL

      public static BackgroundFileStyle createStyleByURL(URL url) throws IOException
      Throws:
      IOException
    • setSource

      public abstract void setSource(URL url) throws IOException
      Sets the file that is used as a source to create the Background
      Specified by:
      setSource in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle
      Parameters:
      f - , File
      Throws:
      IOException
    • getBounds

      public abstract Rectangle getBounds()
      Gets the bounding Rectangle of this Rectangle.

      This method is included for completeness, to parallel the getBounds method of Component.

      Specified by:
      getBounds in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle
      Returns:
      a new Rectangle, equal to the bounding Rectangle for this Rectangle.
      Since:
      JDK1.1
      See Also:
      • Component.getBounds()
      • invalid reference
        #setBounds(Rectangle)
      • invalid reference
        #setBounds(int, int, int, int)
    • getSource

      public final URL getSource()
      Obtains the source of the file which is used to create the background
      Specified by:
      getSource in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle
      Returns:
    • drawInsideRectangle

      public final void drawInsideRectangle(Graphics2D g, Rectangle r) throws org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
      Specified by:
      drawInsideRectangle in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
      Throws:
      org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
    • drawInsideRectangle

      public abstract void drawInsideRectangle(Graphics2D g, Rectangle r, boolean keepAspectRatio) throws org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
      Throws:
      org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class AbstractStyle
      Throws:
      CloneNotSupportedException
    • isLibrarySymbol

      protected boolean isLibrarySymbol()
    • getSymbolLibraryURL

      protected URL getSymbolLibraryURL()
    • getSourceSymbolInLibrary

      protected String getSourceSymbolInLibrary()
      Return the final substring of the URL symbol in the library
      Returns:
    • setSymbolTable

      public void setSymbolTable(org.gvsig.expressionevaluator.SymbolTable symbolTable)
      Specified by:
      setSymbolTable in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle