public class ImageStyle extends BackgroundFileStyle
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageStyle.RegisterPersistence |
BackgroundFileStyle.PersistenceCantSetSourceException| Modifier and Type | Field and Description |
|---|---|
static String |
IMAGE_STYLE_PERSISTENCE_DEFINITION_NAME |
BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME, source, SOURCE_SYMBOL_IN_LIBRARYSTYLE_PERSISTENCE_DEFINITION_NAME| Constructor and Description |
|---|
ImageStyle() |
| Modifier and Type | Method and Description |
|---|---|
void |
drawInsideRectangle(Graphics2D g,
Rectangle r,
boolean keepAspectRatio) |
void |
drawOutline(Graphics2D g,
Rectangle r)
Used to show an outline of the style to graphically show its properties.
|
Rectangle |
getBounds()
Creates a rectangle with the dimensions of the buffered image
|
boolean |
isSuitableFor(ISymbol symbol)
True if this symbol is ok for the style or class.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setSource(URL url)
Defines the source (file) from where the buffered image will be taken.
|
clone, createStyleByURL, drawInsideRectangle, getSource, getSourceSymbolInLibrary, getSymbolLibraryURL, isLibrarySymbolgetDescription, setDescriptionequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, setDescriptionpublic static final String IMAGE_STYLE_PERSISTENCE_DEFINITION_NAME
public Rectangle getBounds()
getBounds in interface IBackgroundFileStylegetBounds in class BackgroundFileStyleComponent.getBounds(),
#setBounds(Rectangle),
#setBounds(int, int, int, int)public void setSource(URL url) throws IOException
setSource in interface IBackgroundFileStylesetSource in class BackgroundFileStylef,File - IOExceptionpublic void drawInsideRectangle(Graphics2D g, Rectangle r, boolean keepAspectRatio)
drawInsideRectangle in class BackgroundFileStylepublic boolean isSuitableFor(ISymbol symbol)
IStylesymbol - ISymbolpublic void drawOutline(Graphics2D g, Rectangle r) throws SymbolDrawingException
IStyleSymbolDrawingExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractStylePersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractStylePersistenceException