org.xwiki.gwt.dom.client.internal.ie
Class ControlRange

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by org.xwiki.gwt.dom.client.internal.ie.NativeRange
          extended by org.xwiki.gwt.dom.client.internal.ie.ControlRange

public final class ControlRange
extends NativeRange

A control range is a list of DOM elements. When an element is added to a control range and that range is selected the element will be decorated with special markers for editing that element. For instance if an image is selected this way the user will be able to resize the image.

Version:
$Id: ControlRange.java 20039 2009-05-16 12:04:30Z sdumitriu $

Constructor Summary
protected ControlRange()
          Default constructor.
 
Method Summary
 void add(Element element)
          Adds an element to the control range.
 Element get(int index)
           
 int getLength()
           
static ControlRange newInstance(Document doc)
          Creates a new control range from the given document.
 void remove(int index)
          Removes an element from this control range.
 
Methods inherited from class org.xwiki.gwt.dom.client.internal.ie.NativeRange
getOwnerDocument, isTextRange, select
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ControlRange

protected ControlRange()
Default constructor. Needs to be protected because all instances are created from JavaScript.

Method Detail

newInstance

public static ControlRange newInstance(Document doc)
Creates a new control range from the given document.

Parameters:
doc - The owner document of the created control range.
Returns:
A new control range within the specified document.

getLength

public int getLength()
Returns:
The number of objects included the range.

add

public void add(Element element)
Adds an element to the control range.

Parameters:
element - The element to include in this range.

get

public Element get(int index)
Parameters:
index - Zero-based index of the element to get.
Returns:
The element at the specified index in this control range.

remove

public void remove(int index)
Removes an element from this control range.

Parameters:
index - Zero-based index of the element to remove from the control range.


Copyright © 2004-2009 XWiki. All Rights Reserved.