|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.pilots.html4.DRange
| Constructor Summary | |
protected |
DRange()
|
| Method Summary | |
DElement |
duplicateSelectedDomHierarchy()
Retrieve the topmost Element of the selected DOM hierarchy. |
void |
empty()
|
DNode |
getEndContainer()
|
int |
getEndOffset()
|
DNode |
getStartContainer()
|
int |
getStartOffset()
|
boolean |
isInside(DNode n)
Check to see if a given node is in the selection path. |
boolean |
isInside(DNode node,
int chrIndex)
More complex isInside. |
String |
toString()
Retrieve a string representation of the selection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected DRange()
| Method Detail |
public void empty()
public String toString()
public final DElement duplicateSelectedDomHierarchy()
public boolean isInside(DNode n)
Given a possible node hierarchy as follows:
common node
/ \
n1 - n2 n3 - n4 - n5
/ / \ \ \
n6 n7 n8 n9 n10
Given a startpath of n9 - n4 and and endPath of n6-n1, this code does
a test for inclusion and exclusion based upon how siblings of a given node
intersect with the start and end Paths.
For example, n5 would be excluded since it's outside the dome of selection.
Think of the Dome of silence in Maxwell Smart. You're either sitting in
the Dome, or you're sitting outside the dome. n8 and n7 would be inside
the dome, since sibling navigation always runs into the start or end path
from the correct direction.By ascending up the hierarchy, any node must either be entirely included or excluded from the selected area.
n - The Node to test
public boolean isInside(DNode node,
int chrIndex)
node - The node to testchrIndex - The equivalent char index of the point within the node.
public DNode getStartContainer()
public DNode getEndContainer()
public int getStartOffset()
public int getEndOffset()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||