01: package org.osbl.client.wings.action;
02:
03: import org.wings.*;
04: import org.osbl.client.action.AuthorizedAction;
05:
06: import javax.swing.*;
07: import java.util.Map;
08:
09: /**
10: * @author hengels
11: * @version $Revision$
12: */
13: public abstract class NavigationAction extends AuthorizedAction
14: implements Cloneable {
15: protected NavigationAction() {
16: }
17:
18: protected NavigationAction(String command) {
19: putValue(ACTION_COMMAND_KEY, command);
20: }
21:
22: protected NavigationAction(String command, SIcon icon) {
23: putValue(ACTION_COMMAND_KEY, command);
24: putValue(SMALL_ICON, icon);
25: }
26:
27: public abstract void navigate(Object object);
28:
29: public abstract void navigate(Map<String, String> query);
30:
31: public String toString() {
32: return getValue(ACTION_COMMAND_KEY).toString();
33: }
34:
35: public Object clone() {
36: try {
37: return super .clone();
38: } catch (CloneNotSupportedException e) {
39: throw new RuntimeException(e);
40: }
41: }
42: }
|