|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.wizards.document.CreateAttributeListWizard
public class CreateAttributeListWizard
Manages the process of creating new attributes into newly created element. Attributes themselves are not created, their names and values are returned instead. Prefixes for new namespaces are queried.
Field Summary | |
---|---|
CreateAttributeListWizardPage |
calPage
First wizard page. |
protected NamespaceManager |
currentManager
Current namespace manager. |
XMLAccess |
xmlAccess
The document instance. |
Constructor Summary | |
---|---|
CreateAttributeListWizard(List<AttributeListRule> listRules,
String parentName,
XMLAccess xmlAccess,
NamespaceManager currentManager)
Constructor. |
Method Summary | |
---|---|
boolean |
canFinish()
Returns whether this wizard could be finished without further user interaction. |
void |
createAttributes(Element e,
DocumentModifier modifier)
Creates all selected attributes with their values. |
BaseWizardPage |
current()
Fetches the current page. |
void |
dispose()
Disposes of this wizard. |
static void |
execute(Shell parent,
List<AttributeListRule> listRules,
Element element,
XMLAccess xmlAccess)
Executes the wizard. |
String |
getName()
Returns name of this wizard. |
List<QName> |
getNames()
Returns qnames of new attributes, with appropriate prefixes when needed. |
NewPrefixesQueryWizardPage |
getNpqPage()
Returns second wizard page. |
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. |
NamespaceManager |
newNsManager()
Creates new namespace manager, with new namespace-prefix mappings. |
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 |
---|
public final CreateAttributeListWizardPage calPage
null
.
public final XMLAccess xmlAccess
protected final NamespaceManager currentManager
Constructor Detail |
---|
public CreateAttributeListWizard(List<AttributeListRule> listRules, String parentName, XMLAccess xmlAccess, NamespaceManager currentManager)
listRules
- the list of lists of attribute. Exactly one list will be
chosen.parentName
- the name of the parent element. Used only to display
the name on the shell.xmlAccess
- the xml document instance.currentManager
- the current manager. It won't get modified. If new
prefixes needs to be registered, they are registered in a separate
namespace manager, built on demand by the newNsManager()
.Method Detail |
---|
public NewPrefixesQueryWizardPage getNpqPage()
null
when wizard is on the
first page.
null
when wizard is on the
first page.public NamespaceManager newNsManager()
IllegalArgumentException
- if the page contains errors thus some
prefixes cannot be registered.
IllegalStateException
- if the page contains errors thus some
prefixes cannot be registered.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 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()
IWizard
hasNext()
returned true
- it may throw
ProviderException
.
next
in interface IWizard
MultiWizard
initializes it for you. Never
null
.public BaseWizardPage current()
IWizard
current
in interface IWizard
null
only if the provider
provides no pages.public void dispose()
IWizard
dispose
in interface IWizard
public String getName()
IWizard
getName
in interface IWizard
public RGB getTitleBarColor()
IWizard
getTitleBarColor
in interface IWizard
null
if default should be
used.public BaseWizardPage previous()
IWizard
previous
in interface IWizard
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 List<QName> getNames()
null
if error occurs.public void createAttributes(Element e, DocumentModifier modifier)
e
- create attributes here.modifier
- if not null
then changes are written using
document modifier. Otherwise, they are written directly to the element.
IllegalStateException
- if there are still errors on the page.public static void execute(Shell parent, List<AttributeListRule> listRules, Element element, XMLAccess xmlAccess) throws sk.baka.xml.gene.ExportException
parent
- the parent window. Should not be null
.listRules
- the rules describing creatable attributes.element
- where to create the attributes.xmlAccess
- the document instance.
sk.baka.xml.gene.ExportException
- if modification finalizer fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |