public class RemoteFileStyle extends BackgroundFileStyle
Modifier and Type | Class and Description |
---|---|
static class |
RemoteFileStyle.RegisterPersistence |
BackgroundFileStyle.PersistenceCantSetSourceException
Modifier and Type | Field and Description |
---|---|
static String |
REMOTE_FILE_STYLE_PERSISTENCE_DEFINITION_NAME |
BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME, source, SOURCE_SYMBOL_IN_LIBRARY
STYLE_PERSISTENCE_DEFINITION_NAME
Constructor and Description |
---|
RemoteFileStyle() |
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()
Gets the bounding
Rectangle of this Rectangle . |
String |
getClassName() |
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)
Sets the file that is used as a source to create the Background
|
clone, createStyleByURL, drawInsideRectangle, getSource, getSourceSymbolInLibrary, getSymbolLibraryURL, isLibrarySymbol
getDescription, setDescription
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, setDescription
public static final String REMOTE_FILE_STYLE_PERSISTENCE_DEFINITION_NAME
public Rectangle getBounds()
BackgroundFileStyle
Rectangle
of this Rectangle
.
This method is included for completeness, to parallel the
getBounds
method of
Component
.
getBounds
in interface IBackgroundFileStyle
getBounds
in class BackgroundFileStyle
Rectangle
, equal to the
bounding Rectangle
for this Rectangle
.Component.getBounds()
,
#setBounds(Rectangle)
,
#setBounds(int, int, int, int)
public void setSource(URL url) throws IOException
BackgroundFileStyle
setSource
in interface IBackgroundFileStyle
setSource
in class BackgroundFileStyle
IOException
public void drawInsideRectangle(Graphics2D g, Rectangle r, boolean keepAspectRatio) throws SymbolDrawingException
drawInsideRectangle
in class BackgroundFileStyle
SymbolDrawingException
public void drawOutline(Graphics2D g, Rectangle r) throws SymbolDrawingException
IStyle
SymbolDrawingException
public boolean isSuitableFor(ISymbol symbol)
IStyle
symbol
- ISymbolpublic String getClassName()
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractStyle
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractStyle
PersistenceException