|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cburch.editor.util.Positions
public class Positions
This class is a collection exclusively of class members that
are helpful in dealing with javax.swing.text's
Position class.
| Method Summary | |
|---|---|
static javax.swing.text.Position |
createDummy(int offset)
Creates and returns a Position object that is
not associated with any Document. |
static java.util.Comparator<javax.swing.text.Position> |
getComparator()
Returns a comparator that compares two positions' offsets. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Comparator<javax.swing.text.Position> getComparator()
Position objects are at the
same offset, the comparator will return a zero value. This
is technically erroneous, because two positions may be
different at one invocation and later, due to edits in the
document, become the same.
public static javax.swing.text.Position createDummy(int offset)
Position object that is
not associated with any Document. As a result,
the associated position does not change.
offset - the offset of the returned position.
Position object wrapped around the
given offset.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||