|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.editor.wizards.document.NewDocumentWizardProvider
public class NewDocumentWizardProvider
A wizard that creates new XML document and returns it in a form of
XMLAccess instance.
| Field Summary | |
|---|---|
protected MultiWizard |
parentWizard
The instance of multiwizard object. |
protected Element |
root
Root element; valid when user fills third page. |
protected String |
rootNamespace
Root namespace of the document; valid when user fills second page. |
protected NewElementRule |
rootRule
Root element rule; valid when user fills third page. |
protected List<IWizard> |
wizards
List of pages that user visited. |
protected XMLAccess |
xmlAccess
Document instance; non-null when user fills first page. |
| Constructor Summary | |
|---|---|
NewDocumentWizardProvider()
The constructor. |
|
| Method Summary | |
|---|---|
IWizard |
current()
Fetches the current wizard. |
void |
dispose()
Provider should dispose any objects it collected. |
static XMLAccess |
execute(Shell shell)
Helper method that executes the new document wizard. |
XMLAccess |
getDocument()
Returns the document that was created using this wizard. |
String |
getName()
Returns name of this wizard. |
boolean |
hasNext()
Checks if there is next wizard. |
boolean |
hasPrevious()
Checks if there is previous wizard. |
protected IWizard |
moveToFinishWizard()
Creates the 'finish' page. |
protected IWizard |
moveToFourthWizard()
Creates fourth page - starts to fill root element's contents, or finishes the document creation. |
protected OnePageWizard<NamespaceSelectorWizardPage> |
moveToSecondWizard()
Creates second page - the root namespace selector page. |
protected OnePageWizard<NameListItemChooserWizardPage<NewElementRule>> |
moveToThirdWizard()
Creates third page - the root element selector. |
IWizard |
next()
Fetches the next wizard. |
void |
performCancel()
Called when all opened wizards (from first wizard to current wizard) have already been cancelled. |
void |
performFinish()
Called when all wizards (from first wizard to current wizard) have already been finished. |
IWizard |
previous()
Fetches the previous wizard. |
void |
setWizard(MultiWizard wizard)
Sets the multi-wizard object instance, that'll navigate user through other wizards using this provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final List<IWizard> wizards
protected XMLAccess xmlAccess
protected String rootNamespace
protected NewElementRule rootRule
protected Element root
protected MultiWizard parentWizard
| Constructor Detail |
|---|
public NewDocumentWizardProvider()
| Method Detail |
|---|
public static XMLAccess execute(Shell shell)
shell - parent of the wizard dialog. Can be null but
this is not recommended.
null if user cancels the
process.public IWizard current()
IMultiWizardProvider
current in interface IMultiWizardProvidernull only if the
provider provides no wizards.public boolean hasNext()
IMultiWizardProvider
hasNext in interface IMultiWizardProvidertrue if there is next wizard or false
if next() will fail.public boolean hasPrevious()
IMultiWizardProvider
hasPrevious in interface IMultiWizardProvidertrue if there is previous wizard or
false if previous() will fail.
public IWizard next()
throws ProviderException
IMultiWizardProviderhasNext() returned true - it may throw
ProviderException.
next in interface IMultiWizardProviderMultiWizard initializes it for you. Never
null.
ProviderException - if next wizard instance cannot be constructed
thanks to some unexpected error. In such case, wizard stays at current
page, exception is logged and an error dialog is shown.public void performCancel()
IMultiWizardProvider
performCancel in interface IMultiWizardProviderpublic void performFinish()
IMultiWizardProvider
performFinish in interface IMultiWizardProviderpublic IWizard previous()
IMultiWizardProvider
previous in interface IMultiWizardProviderpublic void setWizard(MultiWizard wizard)
IMultiWizardProvider
setWizard in interface IMultiWizardProviderwizard - the wizard that'll use this provider.
protected OnePageWizard<NamespaceSelectorWizardPage> moveToSecondWizard()
throws ProviderException
null if error
occured.
ProviderException - if document fails to create.
protected OnePageWizard<NameListItemChooserWizardPage<NewElementRule>> moveToThirdWizard()
throws ProviderException
null
ProviderException - if schema fails to load.protected IWizard moveToFourthWizard()
moveToFinishWizard() if no contents are required.protected IWizard moveToFinishWizard()
public void dispose()
IMultiWizardProviderMultiWizard.
dispose in interface IMultiWizardProviderpublic XMLAccess getDocument()
public String getName()
IMultiWizardProvider
getName in interface IMultiWizardProvidernull then the name is collected from child wizards.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||