public final class GoalBackAction extends MainWindowAction
Modifier and Type | Field and Description |
---|---|
private boolean |
longName
indicates if long names (including the name of the rule to undo) are displayed
|
private static long |
serialVersionUID |
mainWindow
SHORTCUT_KEY_MASK
Constructor and Description |
---|
GoalBackAction(MainWindow mainWindow,
boolean longName)
Creates a new GoalBackAction.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
private Goal |
findNewestGoal(Node subtree)
Finds the newest goal (the goal with the highest serial number) in the given subtree.
|
void |
initListeners()
Registers the action at some listeners to update its status
in a correct fashion.
|
void |
updateName()
Adds the displayName of the rule, which is affected by the undo operation, to the action.
|
getMediator
getIcon, getMenuPath, getName, getPriority, getSmallIcon, getTooltip, isSelected, setAcceleratorKey, setAcceleratorLetter, setIcon, setLargeIcon, setLargeIcon, setMenuPath, setName, setPriority, setSelected, setSmallIcon, setTooltip
private static final long serialVersionUID
private boolean longName
public GoalBackAction(MainWindow mainWindow, boolean longName)
mainWindow
- the main window this action belongs tolongName
- true iff long names (including the name of the rule to undo)
shall be displayed (e.g. in menu items)public void initListeners()
public void updateName()
public void actionPerformed(java.awt.event.ActionEvent e)
private Goal findNewestGoal(Node subtree)
subtree
- the root of the subtree to search. If it is null, the return value is null.