|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.project.StyleContent
public abstract class StyleContent
Provides a way to persist an arbitrary object placed on the style blackboard.
Field Summary | |
---|---|
static java.lang.String |
XPID
XPID field |
Constructor Summary | |
---|---|
protected |
StyleContent(java.lang.String id)
Construct with ID suplied by subclass. |
Method Summary | |
---|---|
abstract java.lang.Object |
createDefaultStyle(IGeoResource resource,
java.awt.Color colour,
IProgressMonitor monitor)
Creates a default Style give a resource and color. |
java.lang.String |
getId()
Unique identifier of the style. |
abstract java.lang.Class |
getStyleClass()
Returns the class of the object which does the actual styling work. |
abstract java.lang.Object |
load(IMemento memento)
Loads a style object from a memento. |
abstract java.lang.Object |
load(java.net.URL url,
IProgressMonitor monitor)
Loads a style object from a URL. |
abstract void |
save(IMemento memento,
java.lang.Object value)
Saves the state of a style object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XPID
XPID
field
Constructor Detail |
---|
protected StyleContent(java.lang.String id)
id
- Method Detail |
---|
public java.lang.String getId()
This id is also used by Renderer and StyleConfigurator, often implementation will have a
static final String ID
defined for programmers.
public abstract java.lang.Class getStyleClass()
public abstract void save(IMemento memento, java.lang.Object value)
(Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be writen).
style
- the style object to persisit.memento
- Momento used to store the style object state.public abstract java.lang.Object load(IMemento memento)
(Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be writen).
memento
- object which contains previously saved object state.
public abstract java.lang.Object load(java.net.URL url, IProgressMonitor monitor) throws java.io.IOException
url
- the URL pointing to the style's locationmonitor
- Progress monitor to report back to caller, allowed to be null.
java.io.IOException
- if there is an error loading the URLpublic abstract java.lang.Object createDefaultStyle(IGeoResource resource, java.awt.Color colour, IProgressMonitor monitor) throws java.io.IOException
resource
- to attempt to create a style for.colour
- color to use while creating style.monitor
- monitor used to show progress of style creation.
java.io.IOException
- if a problem occurs accessing the GeoResource.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |