Class ImageStyle
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
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ImageStyle
- 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
Controls the style of an image to be correctly painted. This class controls
aspects like the source path of the image, creates a rectangle to paint
inside the image, draws the outline of the image and so on.
- Author:
- gvSIG Team
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.BackgroundFileStyle
BackgroundFileStyle.PersistenceCantSetSourceExceptionNested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext -
Field Summary
FieldsFields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.BackgroundFileStyle
BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME, source, SOURCE_SYMBOL_IN_LIBRARY, 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 TypeMethodDescriptionvoiddrawInsideRectangle(Graphics2D g, Rectangle r, boolean keepAspectRatio) voiddrawOutline(Graphics2D g, Rectangle r) Creates a rectangle with the dimensions of the buffered imagebooleanisSuitableFor(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol) voidloadFromState(org.gvsig.tools.persistence.PersistentState state) voidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidDefines the source (file) from where the buffered image will be taken.Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.BackgroundFileStyle
clone, createStyleByURL, drawInsideRectangle, getSource, getSourceSymbolInLibrary, getSymbolLibraryURL, isLibrarySymbol, setSymbolTableMethods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
getDescription, 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
getDescription, setDescription
-
Field Details
-
IMAGE_STYLE_PERSISTENCE_DEFINITION_NAME
- See Also:
-
-
Constructor Details
-
ImageStyle
public ImageStyle()
-
-
Method Details
-
setSource
Defines the source (file) from where the buffered image will be taken.- Specified by:
setSourcein interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle- Specified by:
setSourcein classBackgroundFileStyle- Parameters:
url-- Throws:
IOException
-
getBounds
Creates a rectangle with the dimensions of the buffered image- Specified by:
getBoundsin interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IBackgroundFileStyle- Specified by:
getBoundsin classBackgroundFileStyle- Returns:
- Rectangle
- See Also:
-
drawInsideRectangle
- Specified by:
drawInsideRectanglein classBackgroundFileStyle
-
isSuitableFor
public boolean isSuitableFor(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol) -
drawOutline
public void drawOutline(Graphics2D g, Rectangle r) throws org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException - Throws:
org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Overrides:
loadFromStatein classAbstractStyle- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Overrides:
saveToStatein classAbstractStyle- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-