|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.swing.text.HighlightedDocument.PositionTriplet
public class HighlightedDocument.PositionTriplet
PositionTriplet maintains three positions which permits efficient synchronous changes.
Field Summary | |
---|---|
protected HighlightedDocument.Position |
caretPosition
|
static int |
NO_CHANGE
The value to pass to set so that the specified position's offset will not change. |
protected HighlightedDocument.Position |
selectionDot
|
protected HighlightedDocument.Position |
selectionMark
|
Constructor Summary | |
---|---|
protected |
HighlightedDocument.PositionTriplet(HighlightedDocument.Position selectionDot,
HighlightedDocument.Position selectionMark,
HighlightedDocument.Position caretPosition)
Creates a new PositionTriplet. |
Method Summary | |
---|---|
int |
getCaretPositionOffset()
Returns the offset of the caretPosition. |
int |
getSelectionDotOffset()
Returns the offset of the selectionDot. |
int |
getSelectionEndOffset()
Returns the greater of the offsets of the selectionDot and selectionMark. |
int |
getSelectionMarkOffset()
Returns the offset of the selectionMark. |
int |
getSelectionStartOffset()
Returns the lesser of the offsets of the selectionDot and selectionMark. |
void |
set(int selectionDotOffset,
int selectionMarkOffset,
int caretPositionOffset)
Moves the offsets of the triplets to the valid position nearest to the specified offset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NO_CHANGE
protected HighlightedDocument.Position selectionDot
protected HighlightedDocument.Position selectionMark
protected HighlightedDocument.Position caretPosition
Constructor Detail |
---|
protected HighlightedDocument.PositionTriplet(HighlightedDocument.Position selectionDot, HighlightedDocument.Position selectionMark, HighlightedDocument.Position caretPosition)
Method Detail |
---|
public void set(int selectionDotOffset, int selectionMarkOffset, int caretPositionOffset)
selectionDotOffset
- The new offset for the selectionDot.selectionMarkOffset
- The new offset for the selectionMark.caretPositionOffset
- The new offset for the caretPosition.public int getSelectionDotOffset()
public int getSelectionMarkOffset()
public int getCaretPositionOffset()
public int getSelectionStartOffset()
public int getSelectionEndOffset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |