org.xwiki.gwt.wysiwyg.client.plugin.readonly
Class ReadOnlyKeyboardHandler

java.lang.Object
  extended by org.xwiki.gwt.user.client.KeyboardAdaptor
      extended by org.xwiki.gwt.wysiwyg.client.plugin.readonly.ReadOnlyKeyboardHandler
All Implemented Interfaces:
com.google.gwt.event.dom.client.KeyDownHandler, com.google.gwt.event.dom.client.KeyPressHandler, com.google.gwt.event.dom.client.KeyUpHandler, com.google.gwt.event.shared.EventHandler
Direct Known Subclasses:
OperaReadOnlyKeyboardHandler, SafariReadOnlyKeyboardHandler

public class ReadOnlyKeyboardHandler
extends KeyboardAdaptor

Handles the keyboard events concerning read-only regions inside the rich text area.

Version:
$Id: ea3b577e4d4dd9196601e90c04b2aa93b8fd4d37 $

Constructor Summary
ReadOnlyKeyboardHandler()
           
 
Method Summary
protected  void handleRepeatableKey(Event event)
           
protected  void moveCaretOutside(com.google.gwt.dom.client.Node node, boolean before)
          Places the caret outside of the specified node, either before or after.
protected  void onDelete(Event event, Element element)
          Deletes a read-only element when it is the only target of the given event.
protected  void onDelete(Event event, Element element, Range range, boolean start)
          Deletes a read-only element when it is not the only target of the given event.
 
Methods inherited from class org.xwiki.gwt.user.client.KeyboardAdaptor
handleKeyRelease, onKeyDown, onKeyPress, onKeyUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyKeyboardHandler

public ReadOnlyKeyboardHandler()
Method Detail

handleRepeatableKey

protected void handleRepeatableKey(Event event)
Overrides:
handleRepeatableKey in class KeyboardAdaptor

onDelete

protected void onDelete(Event event,
                        Element element)
Deletes a read-only element when it is the only target of the given event.

Parameters:
event - the native event that was fired
element - the read-only element to be deleted

onDelete

protected void onDelete(Event event,
                        Element element,
                        Range range,
                        boolean start)
Deletes a read-only element when it is not the only target of the given event.

Parameters:
event - the native event that was fired
element - the read-only element to be deleted
range - the range that touches the read-only element
start - true if the start point of the given range is inside the read-only element, false if the end point is inside the read-only element

moveCaretOutside

protected void moveCaretOutside(com.google.gwt.dom.client.Node node,
                                boolean before)
Places the caret outside of the specified node, either before or after.

Parameters:
node - a DOM node
before - true to place the caret before the given node, false to place it after


Copyright © 2004–2014 XWiki. All rights reserved.