com.vaadin.terminal.gwt.client.ui
Class ShortcutActionHandler

java.lang.Object
  extended by com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler

public class ShortcutActionHandler
extends Object

A helper class to implement keyboard shorcut handling. Keeps a list of owners actions and fires actions to server. User class needs to delegate keyboard events to handleKeyboardEvents function.

Author:
Vaadin Ltd

Nested Class Summary
static interface ShortcutActionHandler.BeforeShortcutActionListener
          A focusable ComponentConnector implementing this interface will be notified before shortcut actions are handled if it will be the target of the action (most commonly means it is the focused component during the keyboard combination is triggered by the user).
static interface ShortcutActionHandler.ShortcutActionHandlerOwner
          An interface implemented by those users of this helper class that want to support special components like VRichTextArea that don't properly propagate key down events.
 
Constructor Summary
ShortcutActionHandler(String pid, ApplicationConnection c)
           
 
Method Summary
 void handleKeyboardEvent(com.google.gwt.user.client.Event event)
           
 void handleKeyboardEvent(com.google.gwt.user.client.Event event, ComponentConnector target)
           
 void updateActionMap(UIDL c)
          Updates list of actions this handler listens to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortcutActionHandler

public ShortcutActionHandler(String pid,
                             ApplicationConnection c)
Parameters:
pid - Paintable id
c - reference to application connections
Method Detail

updateActionMap

public void updateActionMap(UIDL c)
Updates list of actions this handler listens to.

Parameters:
c - UIDL snippet containing actions

handleKeyboardEvent

public void handleKeyboardEvent(com.google.gwt.user.client.Event event,
                                ComponentConnector target)

handleKeyboardEvent

public void handleKeyboardEvent(com.google.gwt.user.client.Event event)


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.