summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/event/Action.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2010-03-23 15:40:24 +0000
committerMarc Englund <marc.englund@itmill.com>2010-03-23 15:40:24 +0000
commit6c663d40425234642afecd7f1d36c7e62ac308ab (patch)
tree256d814f322ab4ef85ca6e8089a957d9e8ae4446 /src/com/vaadin/event/Action.java
parent30684aae91c5f82c242d6f8daa584373dcb01fdc (diff)
downloadvaadin-framework-6c663d40425234642afecd7f1d36c7e62ac308ab.tar.gz
vaadin-framework-6c663d40425234642afecd7f1d36c7e62ac308ab.zip
Some API changes for #875 as discussed at length.
svn changeset:12048/svn branch:6.3
Diffstat (limited to 'src/com/vaadin/event/Action.java')
-rw-r--r--src/com/vaadin/event/Action.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/com/vaadin/event/Action.java b/src/com/vaadin/event/Action.java
index b2e3f6a930..fcb8f165b4 100644
--- a/src/com/vaadin/event/Action.java
+++ b/src/com/vaadin/event/Action.java
@@ -72,20 +72,33 @@ public class Action implements Serializable {
return icon;
}
+ /**
+ * An Action that implements this interface can be added to an
+ * Action.Notifier (or NotifierProxy) via the <code>addAction()</code>
+ * -method, which in many cases is easier than implementing the
+ * Action.Handler interface.<br/>
+ *
+ */
public interface Listener {
public void handleAction(Object sender, Object target);
}
+ /**
+ * Action.Containers implementing this support an easier way of adding
+ * single Actions than the more involved Action.Handler. The added actions
+ * must be Action.Listeners, thus handling the action themselves.
+ *
+ */
public interface Notifier extends Container {
public <T extends Action & Action.Listener> void addAction(T action);
public <T extends Action & Action.Listener> void removeAction(T action);
}
- public interface NotifierProxy {
- public <T extends Action & Action.Listener> void addAction(T action);
+ public interface ShortcutNotifier {
+ public void addShortcutListener(ShortcutListener shortcut);
- public <T extends Action & Action.Listener> void removeAction(T action);
+ public void removeShortcutListener(ShortcutListener shortcut);
}
/**