Interface IStyle
- 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 TypeMethodDescriptionvoidUseful to render the symbol inside the TOC, or inside little rectangles.voiddrawOutline(Graphics2D g, Rectangle r) Used to show an outline of the style to graphically show its properties.Returns the description of a symbolbooleanisSuitableFor(ISymbol symbol) True if this symbol is ok for the style or class.voidsetDescription(String desc) Defines the description of a symbol.It will be specified with an string.Methods inherited from interface org.gvsig.tools.lang.Cloneable
cloneMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Method Details
-
setDescription
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
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- Graphics2Dr- Rectangle- Throws:
SymbolDrawingException
-
isSuitableFor
True if this symbol is ok for the style or class.- Parameters:
symbol- ISymbol
-
drawOutline
Used to show an outline of the style to graphically show its properties.- Parameters:
g- , the Graphics2D where to drawr- , the bounds of the style inside such Graphics2D- Throws:
SymbolDrawingException
-