org.xwiki.gwt.wysiwyg.client.plugin.link.exec
Class LinkExecutableUtils

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.link.exec.LinkExecutableUtils

public class LinkExecutableUtils
extends Object

Utility class to perform functions associated to link executables, such as detecting the selected anchor. We have this as static function in a distinct class since there is no way to insert this on both the CreateLinkExecutable and UnlinkExecutable hierarchies.

Version:
$Id$

Field Summary
static String ANCHOR_TAG_NAME
          The tag name of the anchor element.
 
Constructor Summary
protected LinkExecutableUtils()
          Protected constructor.
 
Method Summary
static com.google.gwt.dom.client.AnchorElement getSelectedAnchor(RichTextArea rta)
          Returns the currently selected anchor element in the passed RichTextArea, as the user perceives the selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANCHOR_TAG_NAME

public static final String ANCHOR_TAG_NAME
The tag name of the anchor element.

See Also:
Constant Field Values
Constructor Detail

LinkExecutableUtils

protected LinkExecutableUtils()
Protected constructor.

Method Detail

getSelectedAnchor

public static com.google.gwt.dom.client.AnchorElement getSelectedAnchor(RichTextArea rta)
Returns the currently selected anchor element in the passed RichTextArea, as the user perceives the selection. The algorithm used is as follows:

Parameters:
rta - the rich text area whose selection to test
Returns:
the anchor in which the current selection is found


Copyright © 2004-2012 XWiki. All Rights Reserved.