|
|||||||||
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.
Note: this will be rewritten in uDig 1.1.1
Field Summary | |
---|---|
protected static java.lang.String |
XPID
|
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(GTEvent event)
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 IEditorPage
public 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 IEditorPage
new 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 IEditorPage
false
to abort the container's cancel
procedure and true
to allow the cancel to happenpublic IStyleEditorPageContainer getContainer()
getContainer
in interface IStyleEditorPage
public void setContainer(IEditorPageContainer container)
setContainer
in interface IEditorPage
public void setSize(Point size)
IEditorPage
setSize
in interface IEditorPage
size
- 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 IEditorPage
true
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()
public abstract void styleChanged(GTEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |