org.argouml.uml.cognitive.critics
Class WizOperName
java.lang.Object
org.argouml.kernel.Wizard
org.argouml.uml.cognitive.critics.WizMEName
org.argouml.uml.cognitive.critics.WizOperName
- All Implemented Interfaces:
- java.io.Serializable
- public class WizOperName
- extends WizMEName
A wizard to help the user change the name of an operation to a better name.
Same as WizMEName expect that it handles the special case where
the operation instead should be made a constructor of the class.
This is helpful in languages where constructors have names that
do not agree with the convention for method names (i.e. Java).
Path looks like this for the case when it is not supposed to be a
constructor:
step0 -> step1
Path looks like this for the case when it is supposed to be a constructor:
step0 -> step1 -> step2 (OK! in the case converted to constructor)
-> step2 (same as step1 in the scenario above)
- See Also:
- Serialized Form
Method Summary |
void |
doAction(int oldStep)
Take action at the completion of a step. |
int |
getNumSteps()
Get the number of steps in this wizard. |
javax.swing.JPanel |
makePanel(int newStep)
Create a new panel for the given step. |
void |
setPossibleConstructor(boolean b)
Method to tell the Wizard what path it should work with. |
void |
undoAction(int origStep)
There is a possibility that the next step forward takes another path
in this wizard. |
Methods inherited from class org.argouml.kernel.Wizard |
back, canFinish, canGoBack, doAction, finish, getCurrentPanel, getPanel, getProgress, getToDoItem, isFinished, isStarted, next, setToDoItem, undoAction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cat
protected static org.apache.log4j.Category cat
_option0
protected java.lang.String _option0
_option1
protected java.lang.String _option1
_step1
protected WizStepChoice _step1
_step2
protected WizStepCue _step2
_oldStereotype
protected ru.novosoft.uml.foundation.extension_mechanisms.MStereotype _oldStereotype
_oldStereotypeIsSet
protected boolean _oldStereotypeIsSet
WizOperName
public WizOperName()
getNumSteps
public int getNumSteps()
- Description copied from class:
Wizard
- Get the number of steps in this wizard. Subclasses should
override to return a constant, or compute based on context.
- Overrides:
getNumSteps
in class WizMEName
setPossibleConstructor
public void setPossibleConstructor(boolean b)
- Method to tell the Wizard what path it should work with.
makePanel
public javax.swing.JPanel makePanel(int newStep)
- Create a new panel for the given step.
- Overrides:
makePanel
in class WizMEName
undoAction
public void undoAction(int origStep)
- There is a possibility that the next step forward takes another path
in this wizard. To allow for this we must destroy the path already
traveled by.
TODO:
I (Linus) would say that this is really a problem with the Wizard
implementation since I believe it should be possible to explore a
path in the wizard and then go back.
- Overrides:
undoAction
in class Wizard
doAction
public void doAction(int oldStep)
- Take action at the completion of a step. For example, when the
given step is 0, do nothing; and when the given step is 1, do
the first action. Argo non-modal wizards should take action as
they do along, as soon as possible, they should not wait until
the final step.
- Overrides:
doAction
in class WizMEName