| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.editor.wizards.document.InsertElementWizardProvider
public class InsertElementWizardProvider
A wizard that queries contents of new element(s) that should be inserted at
 given location. When wizard finishes, these elements are returned as an array
 of insertpoints and elements. Wizard does not insert those elements itself,
 you may use
 ElementLoc.insert() method
 to do that.
| Field Summary | |
|---|---|
protected  MultiWizard | 
parent
We are being executed in this multiwizard.  | 
protected  List<Element> | 
roots
'Root' elements - elements that'll be inserted into given parent element.  | 
protected  List<NewElementRule> | 
rules
Contains rules for elements.  | 
protected  InsertList | 
selected
Selected insert list.  | 
protected  NamespaceManager | 
startNsManager
This manager was given to the constructor.  | 
protected  List<IWizard> | 
wizards
Wizards that has been activated.  | 
protected  XMLAccess | 
xmlAccess
The document instance.  | 
| Constructor Summary | |
|---|---|
InsertElementWizardProvider(XMLAccess xmlAccess,
                            List<InsertList> insertLists,
                            Element parent,
                            NamespaceManager nsManager)
Constructor.  | 
|
| Method Summary | |
|---|---|
 IWizard | 
current()
Fetches the current wizard.  | 
 void | 
dispose()
Provider should dispose any objects it collected.  | 
static ElementLoc | 
execute(Shell parent,
        XMLAccess xmlAccess,
        DomPointer place,
        NamespaceManager nsManager,
        QName preselected)
Helper method that executes the insert element wizard.  | 
protected  IWizard | 
findNextWizard()
Finds next wizard for querying contents of an element.  | 
 List<Element> | 
getElements()
'Root' elements - elements that'll be inserted into given parent element.  | 
 InsertList | 
getInsertList()
Selected insert list.  | 
 String | 
getName()
Returns name of this wizard.  | 
 NamespaceManager | 
getPrevNsManager()
Previous namespace manager.  | 
 boolean | 
hasNext()
Checks if there is next wizard.  | 
 boolean | 
hasPrevious()
Checks if there is previous wizard.  | 
 NamespaceManager | 
newNsManager()
Current namespace manager.  | 
 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 XMLAccess xmlAccess
protected final List<IWizard> wizards
nulls
 in order to be consistent with rules and
 roots lists.
protected final NamespaceManager startNsManager
protected MultiWizard parent
protected final List<NewElementRule> rules
roots.get(i) using
 wizards.get(i+1) wizard. Note that this wizard may be
 null if element does not require any contents.
protected List<Element> roots
protected InsertList selected
null if this provider is showing
 first wizard.
| Constructor Detail | 
|---|
public InsertElementWizardProvider(XMLAccess xmlAccess,
                                   List<InsertList> insertLists,
                                   Element parent,
                                   NamespaceManager nsManager)
xmlAccess - instance of the document.insertLists - list of possible insertlists.parent - the parent element - here all elements will be created.nsManager - the namespace manager instance.| Method Detail | 
|---|
public static ElementLoc execute(Shell parent,
                                 XMLAccess xmlAccess,
                                 DomPointer place,
                                 NamespaceManager nsManager,
                                 QName preselected)
parent - parent of the wizard dialog. Can be null but
 this is not recommended.place - where to insert new elements.xmlAccess - the document instance.nsManager - the namespace manager instance.preselected - this element was requested by user to appear as first
 element. May be null.
null if user
 cancelled the wizard or no elements are insertable.public void performFinish()
IMultiWizardProvider
performFinish in interface IMultiWizardProviderpublic void performCancel()
IMultiWizardProvider
performCancel in interface IMultiWizardProviderpublic void dispose()
IMultiWizardProviderMultiWizard.
dispose in interface IMultiWizardProviderpublic void setWizard(MultiWizard wizard)
IMultiWizardProvider
setWizard in interface IMultiWizardProviderwizard - the wizard that'll use this provider.public IWizard current()
IMultiWizardProvider
current in interface IMultiWizardProvidernull only if the
 provider provides no wizards.public List<Element> getElements()
null is returned.
null if wizard shows its
 first page.public InsertList getInsertList()
null if this provider is
 showing first wizard.public NamespaceManager getPrevNsManager()
public NamespaceManager newNsManager()
public IWizard next()
IMultiWizardProviderhasNext() returned true - it may throw
 ProviderException.
next in interface IMultiWizardProviderMultiWizard initializes it for you. Never
 null.protected IWizard findNextWizard()
null if no wizard is needed. All used rules are placed
 into the rules array to mark progress done. The
 wizards array is filled with nulls if
 required, to remain consistent with the rules array.
null if no wizard is needed.public IWizard previous()
IMultiWizardProvider
previous in interface IMultiWizardProviderpublic 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 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 | |||||||||