|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectDialogPage
net.refractions.udig.style.sld.editor.StyleEditorPage
public abstract class StyleEditorPage
Provides a user interface (by extension point) for pages in the SLD Editor
| Field Summary | |
|---|---|
protected static java.lang.String |
XPID
Extension Point ID we are processing |
| Constructor Summary | |
|---|---|
StyleEditorPage()
|
|
| Method Summary | |
|---|---|
void |
applyData(java.lang.Object data)
|
Point |
computeSize()
Computes the size for this page's UI control. |
void |
createControl(Composite parent)
Creates the page Control. |
protected Label |
createDescriptionLabel(Composite parent)
Creates and returns an SWT label under the given composite. |
abstract void |
createPageContent(Composite parent)
Creates the page content. |
void |
dispose()
|
protected Point |
doComputeSize()
Computes the size needed by this page's UI control. |
IStyleEditorPageContainer |
getContainer()
|
StyleEditorPage |
getEditorPage()
|
abstract java.lang.String |
getErrorMessage()
Returns an error message, if applicable. |
abstract java.lang.String |
getLabel()
|
StyleLayer |
getSelectedLayer()
|
StyledLayerDescriptor |
getSLD()
Returns the StyledLayerDescriptor from the style object on the blackboard (and creates one if it is missing). |
Style |
getStyle()
Returns the current style object from the dialog. |
abstract void |
gotFocus()
Each subclass must implement this method which is called each time the page obtains focus. |
void |
init(IWorkbench bench)
Initializes the page (optional) Subclasses may override this method if they need to initialize. |
boolean |
isValid()
Determines if the page contents are valid input. |
abstract boolean |
performCancel()
Invoked when the user clicks cancel. |
void |
setContainer(IEditorPageContainer container)
|
void |
setSize(Point size)
Sets the size of this page's UI component. |
void |
setStyle(Style style)
Sets the current style object (on our styleblackboard clone). |
abstract void |
styleChanged(java.lang.Object source)
Each subclass must implement this method which is called each time the style object is modified on ANY page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.refractions.udig.style.sld.IEditorPage |
|---|
okToLeave, performApply, performOk, refresh |
| Field Detail |
|---|
protected static final java.lang.String XPID
| Constructor Detail |
|---|
public StyleEditorPage()
| Method Detail |
|---|
public void applyData(java.lang.Object data)
applyData in interface IEditorPagepublic void createControl(Composite parent)
parent - the parent compositepublic abstract void createPageContent(Composite parent)
parent - composite to put the page content inpublic abstract java.lang.String getLabel()
public void init(IWorkbench bench)
bench - public Point computeSize()
The default implementation of this IPreferencePage
method returns the size set by setSize; if no size
has been set, but the page has a UI control, the framework
method doComputeSize is called to compute the size.
computeSize in interface IEditorPagenew Point(width,height), or
(0,0) if the page doesn't currently have any UI componentprotected Point doComputeSize()
All pages should override this method and set the appropriate sizes
of their widgets, and then call super.doComputeSize.
new Point(width,height)public abstract boolean performCancel()
performCancel in interface IEditorPagefalse to abort the container's cancel
procedure and true to allow the cancel to happenpublic IStyleEditorPageContainer getContainer()
getContainer in interface IStyleEditorPagepublic void setContainer(IEditorPageContainer container)
setContainer in interface IEditorPagepublic void setSize(Point size)
IEditorPage
setSize in interface IEditorPagesize - the size of the preference page encoded as
new Point(width,height)public void dispose()
public abstract java.lang.String getErrorMessage()
protected Label createDescriptionLabel(Composite parent)
parent - the parent composite
public boolean isValid()
isValid in interface IEditorPagetrue if the page is in a valid state,
and false if invalidpublic StyledLayerDescriptor getSLD()
public Style getStyle()
public void setStyle(Style style)
style - public StyleEditorPage getEditorPage()
public StyleLayer getSelectedLayer()
public abstract void gotFocus()
You can use this method to check out the style and update the state of any widgets prior to display. Implementations Hint: The easiest thing to do is call IEditorPage.refresh() - which you have filled in to update the state of the widgets. You can optimize if you like by checking existing widget state and only updating the controls as needed.
public abstract void styleChanged(java.lang.Object source)
A page implementation will usually just update its contents from scratch; as an optimization you can look at the provided source object and see if you can avoid updating everything.
source - Source of change (often a FeatureTypeStyle or Rule)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||