Class BackgroundFileStyle
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic classNested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected URLprotected static final Stringprotected org.gvsig.expressionevaluator.SymbolTableFields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
LOGGER, STYLE_PERSISTENCE_DEFINITION_NAMEFields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
PAPER, WORLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static BackgroundFileStylecreateStyleByURL(URL url) final voidabstract voiddrawInsideRectangle(Graphics2D g, Rectangle r, boolean keepAspectRatio) abstract RectangleGets the boundingRectangleof thisRectangle.final URLObtains the source of the file which is used to create the backgroundprotected StringReturn the final substring of the URL symbol in the libraryprotected URLprotected booleanabstract voidSets the file that is used as a source to create the BackgroundvoidsetSymbolTable(org.gvsig.expressionevaluator.SymbolTable symbolTable) Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
getDescription, loadFromState, saveToState, setDescriptionMethods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
drawOutline, getDescription, isSuitableFor, setDescriptionMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Field Details
-
BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME
- See Also:
-
SOURCE_SYMBOL_IN_LIBRARY
- See Also:
-
source
-
symbolTable
protected org.gvsig.expressionevaluator.SymbolTable symbolTable
-
-
Constructor Details
-
BackgroundFileStyle
public BackgroundFileStyle()
-
-
Method Details
-
createStyleByURL
- Throws:
IOException
-
setSource
Sets the file that is used as a source to create the Background- Specified by:
setSourcein interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle- Parameters:
f- , File- Throws:
IOException
-
getBounds
Gets the boundingRectangleof thisRectangle.This method is included for completeness, to parallel the
getBoundsmethod ofComponent.- Specified by:
getBoundsin interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle- Returns:
- a new
Rectangle, equal to the boundingRectanglefor thisRectangle. - Since:
- JDK1.1
- See Also:
-
getSource
Obtains the source of the file which is used to create the background- Specified by:
getSourcein interfaceorg.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:
drawInsideRectanglein interfaceorg.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
- Specified by:
clonein interfaceorg.gvsig.tools.lang.Cloneable- Overrides:
clonein classAbstractStyle- Throws:
CloneNotSupportedException
-
isLibrarySymbol
protected boolean isLibrarySymbol() -
getSymbolLibraryURL
-
getSourceSymbolInLibrary
Return the final substring of the URL symbol in the library- Returns:
-
setSymbolTable
public void setSymbolTable(org.gvsig.expressionevaluator.SymbolTable symbolTable) - Specified by:
setSymbolTablein interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle
-