net.refractions.udig.style.sld
Class SLDEditorPart

java.lang.Object
  extended by net.refractions.udig.style.sld.SLDEditorPart

public abstract class SLDEditorPart
extends java.lang.Object

Provides a user interface to edit a component of an Style Layer Descriptor (SLD) style object.

An SLD style component can be one of the following classes of object:

This object does not store state. Any state information of ui widgets must be immediatley reflected in the style component.


Field Summary
static java.lang.String XPID
           
 
Constructor Summary
SLDEditorPart()
           
 
Method Summary
 void createControl(PageBook book)
          Signals the ui control to be created.
 ImageDescriptor createImageDescriptor()
          Returns an image descriptor for the editor part.
protected abstract  Control createPartControl(Composite parent)
          The internal method for creating the ui component.
 java.lang.Object getContent()
           
abstract  java.lang.Class getContentType()
          Style class, like TextSymbolizer, used for editing.
 ImageDescriptor getImageDescriptor()
           
 java.lang.String getLabel()
           
 Layer getLayer()
           
 Composite getPage()
          Returns the ui control.
 java.lang.String getPluginId()
           
 StyleBuilder getStyleBuilder()
           
abstract  void init()
          Initializes the editor.
abstract  void reset()
          Resets the editor.
 void setContent(java.lang.Object content)
           
 void setImageDescriptor(ImageDescriptor image)
           
 void setLabel(java.lang.String label)
           
 void setLayer(Layer layer)
           
 void setPluginId(java.lang.String pluginId)
           
 void setStyleBuilder(StyleBuilder styleBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XPID

public static final java.lang.String XPID
See Also:
Constant Field Values
Constructor Detail

SLDEditorPart

public SLDEditorPart()
Method Detail

getPage

public Composite getPage()
Returns the ui control. This method should not be overridden.

Returns:
The ui control.

createControl

public void createControl(PageBook book)
Signals the ui control to be created. This method should not be overidden.

Parameters:
parent - The parent control.

getContent

public java.lang.Object getContent()
Returns:
Returns the content.

setContent

public void setContent(java.lang.Object content)
Parameters:
content - The content to set.

getLabel

public java.lang.String getLabel()
Returns:
Returns the label.

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - The label to set.

getLayer

public Layer getLayer()
Returns:
Returns the layer.

setLayer

public void setLayer(Layer layer)
Parameters:
layer - The layer to set.

setStyleBuilder

public void setStyleBuilder(StyleBuilder styleBuilder)
Parameters:
styleBuilder - The styleBuilder to set.

getStyleBuilder

public StyleBuilder getStyleBuilder()
Returns:
Returns the styleBuilder.

setImageDescriptor

public void setImageDescriptor(ImageDescriptor image)
Parameters:
image - The image descriptor.

getImageDescriptor

public ImageDescriptor getImageDescriptor()
Returns:
The image descriptor.

setPluginId

public void setPluginId(java.lang.String pluginId)
Parameters:
pluginId - The pluginId to set.

getPluginId

public java.lang.String getPluginId()
Returns:
Returns the pluginId.

createImageDescriptor

public ImageDescriptor createImageDescriptor()
Returns an image descriptor for the editor part. Sublcasses have the option of overiding to provide a custom image.


init

public abstract void init()
Initializes the editor. This method is called before the ui is created so this method should not attempt to access any of its (yet to be created) widgets.


getContentType

public abstract java.lang.Class getContentType()
Style class, like TextSymbolizer, used for editing.

Returns:
the class of style component the ui is used for editing.

createPartControl

protected abstract Control createPartControl(Composite parent)
The internal method for creating the ui component. The parent control passed to the method must not be modified in any way.

Parameters:
parent - The parent control.
Returns:
The newly created control.

reset

public abstract void reset()
Resets the editor. This method resets the ui to reflect the new state of the content being edited, and the layer being styled.. This method is not called unless content, and a layer are available.