|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.kernel.Wizard
org.argouml.uml.cognitive.critics.WizAssocComposite
A non-modal wizard to assist the user in changing aggregation of an association.
Earlier version always imposed composite aggregation. This version allows the user to choose.
Note. This only applies to binary associations. A separate wizard is needed for 3-way (or more) associations.
Field Summary | |
protected static org.apache.log4j.Category |
cat
|
Fields inherited from class org.argouml.kernel.Wizard |
_finished, _item, _panels, _started, _step |
Constructor Summary | |
WizAssocComposite()
Constructor for the wizard. |
Method Summary | |
boolean |
canFinish()
Determine if we have sufficient information to finish. |
void |
doAction(int oldStep)
Take action at the completion of a step. |
int |
getNumSteps()
Returns the number of steps in this wizard. |
javax.swing.JPanel |
makePanel(int newStep)
Create a JPanel for the given step. |
void |
setInstructions(java.lang.String s)
Set the initial instruction string for the choice. |
Methods inherited from class org.argouml.kernel.Wizard |
back, canGoBack, canGoNext, doAction, finish, getCurrentPanel, getPanel, getProgress, getToDoItem, isFinished, isStarted, next, setToDoItem, undoAction, undoAction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Category cat
Constructor Detail |
public WizAssocComposite()
Constructor for the wizard. Currently does nothing.
Method Detail |
public int getNumSteps()
Returns the number of steps in this wizard.
getNumSteps
in class Wizard
Wizard
public void setInstructions(java.lang.String s)
Set the initial instruction string for the choice. May be called by the creator of the wizard to override the default.
public javax.swing.JPanel makePanel(int newStep)
Create a JPanel
for the given step.
We use a WizStepChoice
to handle the choice selection for the
user. We only create the panel once, saving it in a private field
(_step1Choice
) for subsequent use.
Note. If the association has been deleted, then we may not be able to create a vector of options. Under these circumstances we also return null.
makePanel
in class Wizard
newStep
- The index of the step for which a panel is needed.
JPanel
or null
if no
options were available.Wizard
public void doAction(int oldStep)
Take action at the completion of a step.
The guideline for ArgoUML non-modal wizards is to act immediately, not wait for the finish. This method may also be invoked when finish is triggered for any steps whose panels didn't get created.
The observation is that this seems to be trigged when there is any change on the panel (e.g choosing an option), not just when "next" is pressed. Coded accordingly
We allow for the association that caused the problem having by now been deleted, and hence an exception may be raised. We catch this politely.
doAction
in class Wizard
oldStep
- The index of the step just completed (0 for the first
information panel)Wizard
public boolean canFinish()
Determine if we have sufficient information to finish.
We can't finish if our parent Wizard
can't finish.
We can finish if we're on step 0.
We can finish if we're on step 1 and have made a choice.
canFinish
in class Wizard
true
if we can finish, otherwise
false
.Wizard
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20040125) | ArgoUML Project Home | ArgoUML Cookbook |