My favorites | Sign in
Project Home Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
*
*/
package com.googlecode.pennybank.swing.controller.actions;

/**
* This interface defines the methods needed to implement the Command Pattern.
* It defines methods for executing, undoing, redoing the action, and obtaining
* the action name.
*
* @author spenap
*/
public interface UIAction {

/**
* Enumerate defining the different outputs from an action
*
* @author spenap
*/
public enum ActionResult {
SUCCESS, FAIL
}

/**
* This method allows the execution of the action.
*/
public boolean execute();

/**
* This method allows undoing the action
*/
public void undo();

/**
* This method allows redoing the action
*/
public void redo();

/**
* This method allows obtaining the action name, which will be used as its
* description in the user interface
*
* @return The string representing the action name
*/
public String getName();
}

Change log

r26 by bulfaiter on Apr 9, 2009   Diff
The menu bar is now completed. Every
action in the user interface is fully
accessible, whether from the main menu bar
or from the context menu. Besides, the
Edit Menu gets its "delete" menu item
updated depending on the current
selection: user, account or operation. The
accelerator is working, too.

Support for undo/redo actions is being
added. It is possible to add, edit and
remove accounts and users, undoing and
...
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 899 bytes, 46 lines

File properties

svn:mime-type
text/plain
Powered by Google Project Hosting