public abstract class BackgroundFileStyle extends AbstractStyle implements IBackgroundFileStyle
Modifier and Type | Class and Description |
---|---|
class |
BackgroundFileStyle.PersistenceCantSetSourceException |
static class |
BackgroundFileStyle.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME |
protected URL |
source |
protected static String |
SOURCE_SYMBOL_IN_LIBRARY |
STYLE_PERSISTENCE_DEFINITION_NAME
Constructor and Description |
---|
BackgroundFileStyle() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
static BackgroundFileStyle |
createStyleByURL(URL url) |
void |
drawInsideRectangle(Graphics2D g,
Rectangle r)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
abstract void |
drawInsideRectangle(Graphics2D g,
Rectangle r,
boolean keepAspectRatio) |
abstract Rectangle |
getBounds()
Gets the bounding
Rectangle of this Rectangle . |
URL |
getSource()
Obtains the source of the file which is used to create the background
|
protected String |
getSourceSymbolInLibrary()
Return the final substring of the URL symbol in the library
|
protected URL |
getSymbolLibraryURL() |
protected boolean |
isLibrarySymbol() |
abstract void |
setSource(URL url)
Sets the file that is used as a source to create the Background
|
getDescription, loadFromState, saveToState, setDescription
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
drawOutline, getDescription, isSuitableFor, setDescription
loadFromState, saveToState
public static final String BACKGROUND_FILE_STYLE_PERSISTENCE_DEFINITION_NAME
protected static final String SOURCE_SYMBOL_IN_LIBRARY
protected URL source
public static BackgroundFileStyle createStyleByURL(URL url) throws IOException
IOException
public abstract void setSource(URL url) throws IOException
setSource
in interface IBackgroundFileStyle
f,
- FileIOException
public abstract Rectangle getBounds()
Rectangle
of this Rectangle
.
This method is included for completeness, to parallel the
getBounds
method of
Component
.
getBounds
in interface IBackgroundFileStyle
Rectangle
, equal to the
bounding Rectangle
for this Rectangle
.Component.getBounds()
,
#setBounds(Rectangle)
,
#setBounds(int, int, int, int)
public final URL getSource()
getSource
in interface IBackgroundFileStyle
public final void drawInsideRectangle(Graphics2D g, Rectangle r) throws SymbolDrawingException
IStyle
drawInsideRectangle
in interface IStyle
g
- Graphics2Dr
- RectangleSymbolDrawingException
public abstract void drawInsideRectangle(Graphics2D g, Rectangle r, boolean keepAspectRatio) throws SymbolDrawingException
SymbolDrawingException
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class AbstractStyle
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
protected boolean isLibrarySymbol()
protected URL getSymbolLibraryURL()
protected String getSourceSymbolInLibrary()