"Position" refers to the place in-between characters. In other words, every "|" in
"|t|e|x|t|" is a valid position. There are two kinds of positions used here:
getPosition(), which refers to a position somewhere in the entire area's content.
It's bounds are 0 <= x <= area.getLength().
getColumnPosition(), which refers to a position somewhere in the current paragraph.
It's bounds are 0 <= x <= area.getParagraphLength(index).
"Line" refers either to a single paragraph when the area does not wrap
its text or to a line on a multi-line paragraph when the area does wrap its text.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Caret.
Determines whether the caret is visible. |
| Modifier and Type | Method and Description |
|---|---|
| public ObservableValue | |
| public ObservableValue | |
| public ObservableValue | caretBoundsProperty()
The selectionBoundsProperty of the caret in the Screen's coordinate system or |
| public void | |
| public ObservableValue | |
| public void | |
| public GenericStyledArea | |
| public Duration | |
| public Optional | |
| public String | |
| public int | |
| public OptionalInt | |
| public int | |
| public int | |
| public Caret. | |
| public ParagraphBox. | getTargetOffset()
Stores the caret's current column position, so that moving the caret vertically will keep it close to its original offset in a line. |
| public boolean | |
| public boolean | |
| public ObservableValue | |
| public void | moveBreaksBackwards(int numOfBreaks, BreakIterator breakIterator)
Moves the caret backwards by the number of breaks. |
| public void | moveBreaksForwards(int numOfBreaks, BreakIterator breakIterator)
Moves the caret forwards by the number of breaks. |
| public default void | |
| public default void | |
| public void | |
| public void | |
| public void | |
| public default void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public default void | |
| public default void | |
| public ObservableValue | |
| public ObservableValue | |
| public void | |
| public void | |
| public Var | |
| public ObservableValue |
| beingUpdatedProperty | back to summary |
|---|---|
| public ObservableValue | |
| blinkRateProperty | back to summary |
|---|---|
| public ObservableValue | |
| caretBoundsProperty | back to summary |
|---|---|
| public ObservableValue The selectionBoundsProperty of the caret in the Screen's coordinate system or | |
| clearTargetOffset | back to summary |
|---|---|
| public void clearTargetOffset() Clears the caret's x offset | |
| columnPositionProperty | back to summary |
|---|---|
| public ObservableValue The column position of the caret on its given line | |
| dispose | back to summary |
|---|---|
| public void dispose() Disposes the caret and prevents memory leaks | |
| getArea | back to summary |
|---|---|
| public GenericStyledArea Gets the area with which this caret is associated. | |
| getBlinkRate | back to summary |
|---|---|
| public Duration getBlinkRate() | |
| getCaretBounds | back to summary |
|---|---|
| public Optional | |
| getCaretName | back to summary |
|---|---|
| public String getCaretName() Gets the name of this caret. Each caret that is added to an area must have a unique name since it is used to distinguish it from others in a Set. | |
| getColumnPosition | back to summary |
|---|---|
| public int getColumnPosition() | |
| getLineIndex | back to summary |
|---|---|
| public OptionalInt getLineIndex() | |
| getParagraphIndex | back to summary |
|---|---|
| public int getParagraphIndex() | |
| getPosition | back to summary |
|---|---|
| public int getPosition() | |
| getShowCaret | back to summary |
|---|---|
| public Caret. | |
| getTargetOffset | back to summary |
|---|---|
| public ParagraphBox. Stores the caret's current column position, so that moving the caret vertically will keep it close to its original offset in a line. | |
| isBeingUpdated | back to summary |
|---|---|
| public boolean isBeingUpdated() | |
| isVisible | back to summary |
|---|---|
| public boolean isVisible() | |
| lineIndexProperty | back to summary |
|---|---|
| public ObservableValue The line index of a multi-line paragraph that contains this caret | |
| moveBreaksBackwards | back to summary |
|---|---|
| public void moveBreaksBackwards(int numOfBreaks, BreakIterator breakIterator) Moves the caret backwards by the number of breaks. | |
| moveBreaksForwards | back to summary |
|---|---|
| public void moveBreaksForwards(int numOfBreaks, BreakIterator breakIterator) Moves the caret forwards by the number of breaks. | |
| moveSentenceBreaksBackwards | back to summary |
|---|---|
| public default void moveSentenceBreaksBackwards(int numOfSentenceBreaks) | |
| moveSentenceBreaksForwards | back to summary |
|---|---|
| public default void moveSentenceBreaksForwards(int numOfSentenceBreaks) | |
| moveTo | back to summary |
|---|---|
| public void moveTo(int paragraphIndex, int columnPosition) Moves the caret to the given position in the area. If this caret is bound to a Caution see | |
| moveTo | back to summary |
|---|---|
| public void moveTo(int position) Moves the caret to the given position in the area. If this caret is bound to a | |
| moveToAreaEnd | back to summary |
|---|---|
| public void moveToAreaEnd() Moves the caret to the end of the area. | |
| moveToAreaStart | back to summary |
|---|---|
| public default void moveToAreaStart() Moves the caret to the beginning of the area. | |
| moveToNextChar | back to summary |
|---|---|
| public void moveToNextChar() Moves the caret forward one char in the text. | |
| moveToParEnd | back to summary |
|---|---|
| public void moveToParEnd() Moves the caret to the end of the current paragraph. | |
| moveToParStart | back to summary |
|---|---|
| public void moveToParStart() Moves the caret to the beginning of the current paragraph. | |
| moveToPrevChar | back to summary |
|---|---|
| public void moveToPrevChar() Moves the caret backward one char in the text. | |
| moveWordBreaksBackwards | back to summary |
|---|---|
| public default void moveWordBreaksBackwards(int numOfWordBreaks) | |
| moveWordBreaksForwards | back to summary |
|---|---|
| public default void moveWordBreaksForwards(int numOfWordBreaks) | |
| paragraphIndexProperty | back to summary |
|---|---|
| public ObservableValue The paragraph index that contains this caret | |
| positionProperty | back to summary |
|---|---|
| public ObservableValue The position of the caret within the text | |
| setBlinkRate | back to summary |
|---|---|
| public void setBlinkRate(Duration blinkRate) | |
| setShowCaret | back to summary |
|---|---|
| public void setShowCaret(Caret. | |
| showCaretProperty | back to summary |
|---|---|
| public Var Whether to display the caret or not. Default value is
| |
| visibleProperty | back to summary |
|---|---|
| public ObservableValue Whether the caret is being shown in the viewport | |
AUTO while those who want a more custom configuration should make a caret's CaretVisibility
value oscillate between ON and OFF.
| Modifier and Type | Field and Description |
|---|---|
| public static final Caret. | AUTO
Caret is displayed when area is focused, enabled, and editable. |
| public static final Caret. | OFF
Caret is not displayed. |
| public static final Caret. | ON
Caret is displayed. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Caret. | |
| public static Caret. |
| AUTO | back to summary |
|---|---|
| public static final Caret. Caret is displayed when area is focused, enabled, and editable. | |
| OFF | back to summary |
|---|---|
| public static final Caret. Caret is not displayed. | |
| ON | back to summary |
|---|---|
| public static final Caret. Caret is displayed. | |
| CaretVisibility | back to summary |
|---|---|
| private CaretVisibility() | |
| valueOf | back to summary |
|---|---|
| public static Caret. | |
| values | back to summary |
|---|---|
| public static Caret. | |