summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/event
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-10-01 18:53:43 +0300
committerArtur Signell <artur@vaadin.com>2012-10-01 18:53:43 +0300
commit6da74b9512c50ffe736160d697913552c70172ef (patch)
tree384874c6c99b30ba399091991adc27c2c7214942 /server/src/com/vaadin/event
parent4934e0539f4d773dcecfabc0456746e7f6a26fb6 (diff)
downloadvaadin-framework-6da74b9512c50ffe736160d697913552c70172ef.tar.gz
vaadin-framework-6da74b9512c50ffe736160d697913552c70172ef.zip
Moved ShortcutActionHandler constants to shared (#8484)
Change-Id: Ia75fa0ca8b7f563ccc412381e88abae7c630569e
Diffstat (limited to 'server/src/com/vaadin/event')
-rw-r--r--server/src/com/vaadin/event/ActionManager.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/server/src/com/vaadin/event/ActionManager.java b/server/src/com/vaadin/event/ActionManager.java
index ad643863a7..50bb2f8dad 100644
--- a/server/src/com/vaadin/event/ActionManager.java
+++ b/server/src/com/vaadin/event/ActionManager.java
@@ -18,13 +18,13 @@ package com.vaadin.event;
import java.util.HashSet;
import java.util.Map;
-import com.vaadin.client.ui.ShortcutActionHandler;
import com.vaadin.event.Action.Container;
import com.vaadin.event.Action.Handler;
import com.vaadin.server.KeyMapper;
import com.vaadin.server.PaintException;
import com.vaadin.server.PaintTarget;
import com.vaadin.server.VariableOwner;
+import com.vaadin.shared.ui.ShortCutConstants;
import com.vaadin.ui.Component;
/**
@@ -188,10 +188,9 @@ public class ActionManager implements Action.Container, Action.Handler,
}
if (a instanceof ShortcutAction) {
final ShortcutAction sa = (ShortcutAction) a;
- paintTarget
- .addAttribute(
- ShortcutActionHandler.ACTION_SHORTCUT_KEY_ATTRIBUTE,
- sa.getKeyCode());
+ paintTarget.addAttribute(
+ ShortCutConstants.ACTION_SHORTCUT_KEY_ATTRIBUTE,
+ sa.getKeyCode());
final int[] modifiers = sa.getModifiers();
if (modifiers != null) {
final String[] smodifiers = new String[modifiers.length];
@@ -200,16 +199,16 @@ public class ActionManager implements Action.Container, Action.Handler,
}
paintTarget
.addAttribute(
- ShortcutActionHandler.ACTION_MODIFIER_KEYS_ATTRIBUTE,
+ ShortCutConstants.ACTION_MODIFIER_KEYS_ATTRIBUTE,
smodifiers);
}
if (sa.getTarget() != null) {
paintTarget.addAttribute(
- ShortcutActionHandler.ACTION_TARGET_ATTRIBUTE,
+ ShortCutConstants.ACTION_TARGET_ATTRIBUTE,
sa.getTarget());
paintTarget
.addAttribute(
- ShortcutActionHandler.ACTION_TARGET_ACTION_ATTRIBUTE,
+ ShortCutConstants.ACTION_TARGET_ACTION_ATTRIBUTE,
sa.getTargetAction());
}
}
@@ -229,13 +228,13 @@ public class ActionManager implements Action.Container, Action.Handler,
public void handleActions(Map<String, Object> variables, Container sender) {
if (variables
- .containsKey(ShortcutActionHandler.ACTION_TARGET_ACTION_VARIABLE)
+ .containsKey(ShortCutConstants.ACTION_TARGET_ACTION_VARIABLE)
&& actionMapper != null) {
final String key = (String) variables
- .get(ShortcutActionHandler.ACTION_TARGET_ACTION_VARIABLE);
+ .get(ShortCutConstants.ACTION_TARGET_ACTION_VARIABLE);
final Action action = actionMapper.get(key);
final Object target = variables
- .get(ShortcutActionHandler.ACTION_TARGET_VARIABLE);
+ .get(ShortCutConstants.ACTION_TARGET_VARIABLE);
if (action != null) {
handleAction(action, sender, target);
}