|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.wizards.OnePageWizard<P>
P
- page type.public class OnePageWizard<P extends BaseWizardPage>
Wraps given wizard page into a one-paged wizard. Intended to be used with
MultiWizard
. Does nothing when finished.
Field Summary | |
---|---|
protected P |
page
The represented page. |
protected String |
wizardName
Returned as a wizard name. |
Constructor Summary | |
---|---|
OnePageWizard(P page,
String wizardName)
Constructor. |
Method Summary | |
---|---|
boolean |
canFinish()
Returns whether this wizard could be finished without further user interaction. |
BaseWizardPage |
current()
Fetches the current page. |
void |
dispose()
Disposes of this wizard. |
String |
getName()
Returns name of this wizard. |
P |
getPage()
Returns the page that this wizard represents. |
RGB |
getTitleBarColor()
Returns the title bar color for this wizard. |
boolean |
hasNext()
Checks if there is next page. |
boolean |
hasPrevious()
Checks if there is previous page. |
BaseWizardPage |
next()
Fetches the next page. |
boolean |
performCancel()
Performs any actions appropriate in response to the user having pressed the Cancel button, or refuse if canceling now is not permitted. |
boolean |
performFinish()
Performs any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted. |
BaseWizardPage |
previous()
Fetches the previous page. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final P extends BaseWizardPage page
getPage()
function.
protected final String wizardName
Constructor Detail |
---|
public OnePageWizard(P page, String wizardName)
page
- represent this page.wizardName
- a name returned as a wizard name.Method Detail |
---|
public P getPage()
public boolean canFinish()
IWizard
The result of this method is typically used by the wizard container to enable or disable the Finish button.
canFinish
in interface IWizard
true
if the wizard could be finished, and
false
otherwisepublic BaseWizardPage current()
IWizard
current
in interface IWizard
null
only if the provider
provides no pages.public void dispose()
IWizard
dispose
in interface IWizard
public RGB getTitleBarColor()
IWizard
getTitleBarColor
in interface IWizard
null
if default should be
used.public boolean hasNext()
IWizard
false
if current page contains errors.
hasNext
in interface IWizard
true
if there is next wizard or false
if next()
will fail.public boolean hasPrevious()
IWizard
hasPrevious
in interface IWizard
true
if there is previous wizard or
false
if previous()
will fail.public BaseWizardPage next() throws ProviderException
IWizard
hasNext()
returned true
- it may throw
ProviderException
.
next
in interface IWizard
MultiWizard
initializes it for you. Never
null
.
ProviderException
- if next page instance cannot be constructed
because of to some unexpected error. In such case, wizard stays at
current page, exception is logged and an error dialog is shown.public boolean performCancel()
IWizard
performCancel
in interface IWizard
true
to indicate the cancel request was accepted,
and false
to indicate that the cancel request was refusedpublic boolean performFinish()
IWizard
performFinish
in interface IWizard
true
to indicate the finish request was accepted,
and false
to indicate that the finish request was refusedpublic BaseWizardPage previous()
IWizard
previous
in interface IWizard
public String getName()
IWizard
getName
in interface IWizard
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |