com.xpn.xwiki.wysiwyg.client.selection.internal
Class IESelection

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.selection.internal.AbstractSelection
      extended by com.xpn.xwiki.wysiwyg.client.selection.internal.IESelection
All Implemented Interfaces:
Selection

public final class IESelection
extends AbstractSelection


Method Summary
protected  void addRange(com.google.gwt.core.client.JavaScriptObject range)
           
 void collapse(com.google.gwt.dom.client.Node parentNode, int offset)
          Collapses the selection to a single point, at the specified offset in the given DOM node.
 void collapseToEnd()
          Collapses the whole selection to a single point at the end of the current selection (irrespective of direction).
 void collapseToStart()
          Collapses the whole selection to a single point at the start of the current selection (irrespective of direction).
 boolean containsNode(com.google.gwt.dom.client.Node node, boolean partlyContained)
          Indicates whether the node is part of the selection.
 void deleteFromDocument()
          Deletes this selection from document the nodes belong to.
 void extend(com.google.gwt.dom.client.Node parentNode, int offset)
          Extends the selection by moving the selection end to the specified node and offset, preserving the selection begin position.
 com.google.gwt.dom.client.Node getAnchorNode()
           
 int getAnchorOffset()
           
 com.google.gwt.dom.client.Node getFocusNode()
           
 int getFocusOffset()
           
 Range getRangeAt(int index)
           
 int getRangeCount()
           
 boolean isCollapsed()
           
 void removeAllRanges()
          Removes all ranges from the current selection.
protected  void removeRange(com.google.gwt.core.client.JavaScriptObject range)
           
 void selectAllChildren(com.google.gwt.dom.client.Node parentNode)
          Adds all children of the specified node to the selection.
 void selectionLanguageChange(boolean langRTL)
          Modifies the cursor Bidi level after a change in keyboard direction
 java.lang.String toString()
           
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.selection.internal.AbstractSelection
addRange, getJSSelection, removeRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addRange

protected void addRange(com.google.gwt.core.client.JavaScriptObject range)
Specified by:
addRange in class AbstractSelection

collapse

public void collapse(com.google.gwt.dom.client.Node parentNode,
                     int offset)
Description copied from interface: Selection
Collapses the selection to a single point, at the specified offset in the given DOM node. When the selection is collapsed, and the content is focused and editable, the caret will blink there.

Parameters:
parentNode - The given dom node where the selection will be set.
offset - Where in given dom node to place the selection (the offset into the given node).

collapseToEnd

public void collapseToEnd()
Description copied from interface: Selection
Collapses the whole selection to a single point at the end of the current selection (irrespective of direction). If content is focused and editable, the caret will blink there.


collapseToStart

public void collapseToStart()
Description copied from interface: Selection
Collapses the whole selection to a single point at the start of the current selection (irrespective of direction). If content is focused and editable, the caret will blink there.


containsNode

public boolean containsNode(com.google.gwt.dom.client.Node node,
                            boolean partlyContained)
Description copied from interface: Selection
Indicates whether the node is part of the selection. If partlyContained is set to true, the function returns true when some part of the node is part of the selection. If partlyContained is set to false, the function only returns true when the entire node is part of the selection.


deleteFromDocument

public void deleteFromDocument()
Description copied from interface: Selection
Deletes this selection from document the nodes belong to.


extend

public void extend(com.google.gwt.dom.client.Node parentNode,
                   int offset)
Description copied from interface: Selection
Extends the selection by moving the selection end to the specified node and offset, preserving the selection begin position. The new selection end result will always be from the anchorNode to the new focusNode, regardless of direction.

Parameters:
parentNode - The node where the selection will be extended to.
offset - Where in node to place the offset in the new selection end.

getAnchorNode

public com.google.gwt.dom.client.Node getAnchorNode()
Returns:
The node in which the selection begins.

getAnchorOffset

public int getAnchorOffset()
Returns:
The offset within the (text) node where the selection begins.

getFocusNode

public com.google.gwt.dom.client.Node getFocusNode()
Returns:
The node in which the selection ends.

getFocusOffset

public int getFocusOffset()
Returns:
The offset within the (text) node where the selection ends.

getRangeAt

public Range getRangeAt(int index)
Returns:
The range at the specified index.

getRangeCount

public int getRangeCount()
Returns:
The number of ranges in the selection.

isCollapsed

public boolean isCollapsed()
Returns:
true if the selection is collapsed.

removeAllRanges

public void removeAllRanges()
Description copied from interface: Selection
Removes all ranges from the current selection.


removeRange

protected void removeRange(com.google.gwt.core.client.JavaScriptObject range)
Specified by:
removeRange in class AbstractSelection

selectAllChildren

public void selectAllChildren(com.google.gwt.dom.client.Node parentNode)
Description copied from interface: Selection
Adds all children of the specified node to the selection.

Parameters:
parentNode - the parent of the children to be added to the selection.

selectionLanguageChange

public void selectionLanguageChange(boolean langRTL)
Description copied from interface: Selection
Modifies the cursor Bidi level after a change in keyboard direction

Parameters:
langRTL - is true if the new language is right-to-left or false if the new language is left-to-right.

toString

public java.lang.String toString()
Specified by:
toString in interface Selection
Overrides:
toString in class java.lang.Object
Returns:
A string currently being represented by the selection object, i.e. the currently selected text.


Copyright © 2004-2008 XWiki. All Rights Reserved.