summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/AbstractField.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/ui/AbstractField.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/ui/AbstractField.java')
-rw-r--r--src/com/vaadin/ui/AbstractField.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java
index 35f186dd09..fb436b8ca0 100644
--- a/src/com/vaadin/ui/AbstractField.java
+++ b/src/com/vaadin/ui/AbstractField.java
@@ -55,7 +55,7 @@ import com.vaadin.terminal.PaintTarget;
*/
@SuppressWarnings("serial")
public abstract class AbstractField extends AbstractComponent implements Field,
- Property.ReadOnlyStatusChangeNotifier, Action.NotifierProxy {
+ Property.ReadOnlyStatusChangeNotifier, Action.ShortcutNotifier {
/* Private members */
@@ -138,7 +138,7 @@ public abstract class AbstractField extends AbstractComponent implements Field,
* Keeps track of the Actions added to this component; the actual
* handling/notifying is delegated, usually to the containing window.
*/
- protected ActionManager actionManager;
+ private ActionManager actionManager;
/* Component basics */
@@ -1072,9 +1072,7 @@ public abstract class AbstractField extends AbstractComponent implements Field,
if (delayedFocus) {
focus();
}
- if (actionManager != null && !(this instanceof Action.Container)) {
- // Only for non Action.Containers because those want to paint
- // actions themselves - e.g Form
+ if (actionManager != null) {
actionManager.setViewer(getWindow());
}
}
@@ -1082,9 +1080,7 @@ public abstract class AbstractField extends AbstractComponent implements Field,
@Override
public void detach() {
super.detach();
- if (actionManager != null && !(this instanceof Action.Container)) {
- // Only for non Action.Containers because those want to paint
- // actions themselves - e.g Form
+ if (actionManager != null) {
actionManager.setViewer((Window) null);
}
}
@@ -1216,13 +1212,13 @@ public abstract class AbstractField extends AbstractComponent implements Field,
return actionManager;
}
- public <T extends Action & Action.Listener> void addAction(T action) {
- getActionManager().addAction(action);
+ public void addShortcutListener(ShortcutListener shortcut) {
+ getActionManager().addAction(shortcut);
}
- public <T extends Action & Action.Listener> void removeAction(T action) {
+ public void removeShortcutListener(ShortcutListener shortcut) {
if (actionManager == null) {
- actionManager.removeAction(action);
+ actionManager.removeAction(shortcut);
}
}