net.refractions.udig.project.interceptor
Class ShowViewInterceptor.ViewStyleContent

java.lang.Object
  extended by net.refractions.udig.project.StyleContent
      extended by net.refractions.udig.project.interceptor.ShowViewInterceptor.ViewStyleContent
Enclosing class:
ShowViewInterceptor

public static class ShowViewInterceptor.ViewStyleContent
extends StyleContent

Persists Query and Filters saved on the style blackboard.

Author:
Jesse

Field Summary
 
Fields inherited from class net.refractions.udig.project.StyleContent
XPID
 
Constructor Summary
ShowViewInterceptor.ViewStyleContent()
           
 
Method Summary
 java.lang.Object createDefaultStyle(IGeoResource resource, java.awt.Color colour, IProgressMonitor monitor)
          Creates a default Style give a resource and color.
 java.lang.Class<? extends java.lang.Object> getStyleClass()
          Returns the class of the object which does the actual styling work.
 java.lang.Object load(IMemento memento)
          Loads a style object from a memento.
 java.lang.Object load(java.net.URL url, IProgressMonitor monitor)
          Loads a style object from a URL.
 void save(IMemento memento, java.lang.Object value)
          Saves the state of a style object.
 
Methods inherited from class net.refractions.udig.project.StyleContent
getId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShowViewInterceptor.ViewStyleContent

public ShowViewInterceptor.ViewStyleContent()
Method Detail

createDefaultStyle

public java.lang.Object createDefaultStyle(IGeoResource resource,
                                           java.awt.Color colour,
                                           IProgressMonitor monitor)
                                    throws java.io.IOException
Description copied from class: StyleContent
Creates a default Style give a resource and color.

Specified by:
createDefaultStyle in class StyleContent
Parameters:
resource - to attempt to create a style for.
colour - color to use while creating style.
monitor - monitor used to show progress of style creation.
Returns:
a "default" style or null if the style does not apply to the resource
Throws:
java.io.IOException - if a problem occurs accessing the GeoResource.

getStyleClass

public java.lang.Class<? extends java.lang.Object> getStyleClass()
Description copied from class: StyleContent
Returns the class of the object which does the actual styling work.

Specified by:
getStyleClass in class StyleContent
Returns:
the class of the style object.

load

public java.lang.Object load(IMemento memento)
Description copied from class: StyleContent
Loads a style object from a memento.

(Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be writen).

Specified by:
load in class StyleContent
Parameters:
memento - object which contains previously saved object state.
Returns:
Loaded object and state.

load

public java.lang.Object load(java.net.URL url,
                             IProgressMonitor monitor)
                      throws java.io.IOException
Description copied from class: StyleContent
Loads a style object from a URL. This method is blocking.

Specified by:
load in class StyleContent
Parameters:
url - the URL pointing to the style's location
monitor - Progress monitor to report back to caller, allowed to be null.
Returns:
a load style object, or null if it could not be loaded
Throws:
java.io.IOException - if there is an error loading the URL

save

public void save(IMemento memento,
                 java.lang.Object value)
Description copied from class: StyleContent
Saves the state of a style object.

(Currently used with XMLMemento to persist StyleEntry, it is hoped that an EMFMemento can be writen).

Specified by:
save in class StyleContent
Parameters:
memento - Momento used to store the style object state.