textbender.o.rhinohide.ranges
Class RhiSelection

java.lang.Object
  extended by Rhinohide
      extended by RhiSelection

@ThreadSafe
public final class RhiSelection
extends Rhinohide

A text selection implemented as an overlay of a JavaScript text selection. This is non-standard. It has only been tested with Mozilla browsers.

See Also:
http://developer.mozilla.org/en/docs/DOM:selection

Field Summary
 
Fields inherited from class Rhinohide
window
 
Constructor Summary
RhiSelection(RhiWindow window, netscape.javascript.JSObject jsObject)
           
 
Method Summary
 Range getRangeAt(int index)
           
 int getRangeCount()
           
static RhiSelection wrapSelection(RhiWindow window, netscape.javascript.JSObject jsObject)
          Creates a RhiSelection.
 
Methods inherited from class Rhinohide
call, callV, checkV, equals, eval, evalV, getMember, getMemberV, hashCode, jsObject, setMember, toJSObject, toString, window
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RhiSelection

RhiSelection(RhiWindow window,
             netscape.javascript.JSObject jsObject)
Method Detail

wrapSelection

public static RhiSelection wrapSelection(RhiWindow window,
                                         netscape.javascript.JSObject jsObject)
Creates a RhiSelection.

Parameters:
window - global object
jsObject - bridge to underlying JavaScript selection, per jsObject()
Returns:
selection, or null if jsObject is null
See Also:
RhiWindow.getSelection()

getRangeAt

public Range getRangeAt(int index)
Returns:
range or null

getRangeCount

public int getRangeCount()