Caret. Since only one Path object is used per caret, the model
and view were combined into one item to grant easier access to and modification of CSS-related
properties. Caution must be exercised when depending on Path-related properties in any way (e.g.
boundsInLocalProperty(), parentProperty(), etc.). Also, caretBoundsProperty()
is distinguishable from boundsInLocalProperty().
This class adds the css property "-rtfx-blink-rate" (blinkRateProperty()}
| Modifier and Type | Field and Description |
|---|---|
| private static final EventStream | |
| private static final EventStream | |
| private final GenericStyledArea | |
| private final SuspendableNo | |
| private static final CssMetaData | |
| private final StyleableObjectProperty | blinkRate
Controls the blink rate of the caret, when one is displayed. |
| private final SuspendableVal | |
| private final SuspendableVal | |
| private static final List | |
| private final SuspendableNo | |
| private final EventStream | |
| private static final Duration | |
| private final Var | |
| private final SuspendableVal | |
| private final String | |
| private final SuspendableVal | |
| private final SuspendableVal | |
| private final Var | |
| private Subscription | |
| private Optional |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | CaretNode(String name, GenericStyledArea<?, ?, ?> area, SuspendableNo dependentBeingUpdated, int startingPosition)
|
| Modifier and Type | Method and Description |
|---|---|
| public final SuspendableNo | |
| public ObjectProperty | blinkRateProperty()
Implements org. The blink rate of the caret. |
| private static EventStream | |
| public final ObservableValue | caretBoundsProperty()
Implements org. The selectionBoundsProperty of the caret in the Screen's coordinate system or |
| public final void | clearTargetOffset()
Implements org. Clears the caret's x offset |
| public final ObservableValue | columnPositionProperty()
Implements org. The column position of the caret on its given line |
| public int | compareTo(CaretNode o)
Implements java. Compares this object with the specified object for order. |
| public void | |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public GenericStyledArea | getArea()
Implements org. Gets the area with which this caret is associated. |
| public Duration | |
| public final Optional | |
| public final String | |
| public static List | getClassCssMetaData()
Hides javafx. Gets the |
| public final int | |
| public List | getCssMetaData()
Overrides javafx. Implements javafx. This method should delegate to |
| public final OptionalInt | |
| public final int | |
| public final int | |
| public final Caret. | |
| public final ParagraphBox. | getTargetOffset()
Implements org. 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 int | |
| public final boolean | |
| public final ObservableValue | lineIndexProperty()
Implements org. The line index of a multi-line paragraph that contains this caret |
| private <T> void | |
| private void | |
| public void | moveBreaksBackwards(int numOfBreaks, BreakIterator breakIterator)
Implements org. Moves the caret backwards by the number of breaks. |
| public void | moveBreaksForwards(int numOfBreaks, BreakIterator breakIterator)
Implements org. Moves the caret forwards by the number of breaks. |
| private void | moveContentBreaks(int
the number of breaks numOfBreaks, BreakIterator the type of iterator to use breakIterator, boolean if true, use followingNotPreceding)BreakIterator#following(int).
Otherwise, use BreakIterator#preceding(int).Helper method for reducing duplicate code |
| public void | moveTo(int paragraphIndex, int columnPosition)
Implements org. Moves the caret to the given position in the area. |
| public void | moveTo(int position)
Implements org. Moves the caret to the given position in the area. |
| public void | moveToAreaEnd()
Implements org. Moves the caret to the end of the area. |
| public void | moveToNextChar()
Implements org. Moves the caret forward one char in the text. |
| public void | moveToParEnd()
Implements org. Moves the caret to the end of the current paragraph. |
| public void | moveToParStart()
Implements org. Moves the caret to the beginning of the current paragraph. |
| public void | moveToPrevChar()
Implements org. Moves the caret backward one char in the text. |
| public final ObservableValue | paragraphIndexProperty()
Implements org. The paragraph index that contains this caret |
| public final ObservableValue | positionProperty()
Implements org. The position of the caret within the text |
| public void | |
| public final void | |
| public final Var | showCaretProperty()
Implements org. Whether to display the caret or not. |
| private int | |
| public String | toString()
Overrides javafx. Returns a string representation of this |
| ALWAYS_FALSE | back to summary |
|---|---|
| private static final EventStream<Boolean> ALWAYS_FALSE | |
| ALWAYS_TRUE | back to summary |
|---|---|
| private static final EventStream<Boolean> ALWAYS_TRUE | |
| area | back to summary |
|---|---|
| private final GenericStyledArea<?, ?, ?> area | |
| beingUpdated | back to summary |
|---|---|
| private final SuspendableNo beingUpdated | |
| BLINK_RATE | back to summary |
|---|---|
| private static final CssMetaData<CaretNode, Duration> BLINK_RATE | |
| blinkRate | back to summary |
|---|---|
| private final StyleableObjectProperty<Duration> blinkRate Controls the blink rate of the caret, when one is displayed. Setting the duration to zero disables blinking. | |
| bounds | back to summary |
|---|---|
| private final SuspendableVal<Optional<Bounds>> bounds | |
| columnPosition | back to summary |
|---|---|
| private final SuspendableVal<Integer> columnPosition | |
| CSS_META_DATA_LIST | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> CSS_META_DATA_LIST | |
| dependentBeingUpdated | back to summary |
|---|---|
| private final SuspendableNo dependentBeingUpdated | |
| dirty | back to summary |
|---|---|
| private final EventStream<?> dirty | |
| HALF_A_SECOND | back to summary |
|---|---|
| private static final Duration HALF_A_SECOND | |
| internalTextPosition | back to summary |
|---|---|
| private final Var<Integer> internalTextPosition | |
| lineIndex | back to summary |
|---|---|
| private final SuspendableVal<OptionalInt> lineIndex | |
| name | back to summary |
|---|---|
| private final String name | |
| paragraphIndex | back to summary |
|---|---|
| private final SuspendableVal<Integer> paragraphIndex | |
| position | back to summary |
|---|---|
| private final SuspendableVal<Integer> position | |
| showCaret | back to summary |
|---|---|
| private final Var<Caret. | |
| subscriptions | back to summary |
|---|---|
| private Subscription subscriptions | |
| targetOffset | back to summary |
|---|---|
| private Optional<ParagraphBox. | |
| CaretNode | back to summary |
|---|---|
| public CaretNode(String name, GenericStyledArea<?, ?, ?> area) | |
| CaretNode | back to summary |
|---|---|
| public CaretNode(String name, GenericStyledArea<?, ?, ?> area, int startingPosition) | |
| CaretNode | back to summary |
|---|---|
| public CaretNode(String name, GenericStyledArea<?, ?, ?> area, SuspendableNo dependentBeingUpdated, int startingPosition) | |
| beingUpdatedProperty | back to summary |
|---|---|
| public final SuspendableNo beingUpdatedProperty() Implements org.
| |
| blinkRateProperty | back to summary |
|---|---|
| public ObjectProperty Implements org. The blink rate of the caret. Can be styled from CSS using the "-rtfx-blink-rate" property.
| |
| booleanPulse | back to summary |
|---|---|
| private static EventStream | |
| caretBoundsProperty | back to summary |
|---|---|
| public final ObservableValue Implements org. Doc from org. The selectionBoundsProperty of the caret in the Screen's coordinate system or
| |
| clearTargetOffset | back to summary |
|---|---|
| public final void clearTargetOffset() Implements org. Doc from org. Clears the caret's x offset
| |
| columnPositionProperty | back to summary |
|---|---|
| public final ObservableValue Implements org. Doc from org. The column position of the caret on its given line
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(CaretNode o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| dispose | back to summary |
|---|---|
| public void dispose() Implements org. Doc from org. Disposes the caret and prevents memory leaks | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getArea | back to summary |
|---|---|
| public GenericStyledArea Implements org. Doc from org. Gets the area with which this caret is associated.
| |
| getBlinkRate | back to summary |
|---|---|
| public Duration getBlinkRate() Implements org.
| |
| getCaretBounds | back to summary |
|---|---|
| public final Optional Implements org.
| |
| getCaretName | back to summary |
|---|---|
| public final String getCaretName() Implements org. Doc from org. 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.
| |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Doc from javafx. Gets the | |
| getColumnPosition | back to summary |
|---|---|
| public final int getColumnPosition() Implements org.
| |
| getCssMetaData | back to summary |
|---|---|
| public List Overrides javafx. Implements javafx. Doc from javafx. This method should delegate to
| |
| getLineIndex | back to summary |
|---|---|
| public final OptionalInt getLineIndex() Implements org.
| |
| getParagraphIndex | back to summary |
|---|---|
| public final int getParagraphIndex() Implements org.
| |
| getPosition | back to summary |
|---|---|
| public final int getPosition() Implements org.
| |
| getShowCaret | back to summary |
|---|---|
| public final Caret. Implements org.
| |
| getTargetOffset | back to summary |
|---|---|
| public final ParagraphBox. Implements org. Doc from org. Stores the caret's current column position, so that moving the caret vertically will keep it close to its original offset in a line.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isBeingUpdated | back to summary |
|---|---|
| public final boolean isBeingUpdated() Implements org.
| |
| lineIndexProperty | back to summary |
|---|---|
| public final ObservableValue Implements org. Doc from org. The line index of a multi-line paragraph that contains this caret
| |
| manageSubscription | back to summary |
|---|---|
| private <T> void manageSubscription(EventStream<T> stream, Consumer<T> subscriber) | |
| manageSubscription | back to summary |
|---|---|
| private void manageSubscription(Subscription s) | |
| moveBreaksBackwards | back to summary |
|---|---|
| public void moveBreaksBackwards(int numOfBreaks, BreakIterator breakIterator) Implements org. Doc from org. Moves the caret backwards by the number of breaks.
| |
| moveBreaksForwards | back to summary |
|---|---|
| public void moveBreaksForwards(int numOfBreaks, BreakIterator breakIterator) Implements org. Doc from org. Moves the caret forwards by the number of breaks.
| |
| moveContentBreaks | back to summary |
|---|---|
| private void moveContentBreaks(int numOfBreaks, BreakIterator breakIterator, boolean followingNotPreceding) Helper method for reducing duplicate code
| |
| moveTo | back to summary |
|---|---|
| public void moveTo(int paragraphIndex, int columnPosition) Implements org. Doc from org. 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) Implements org. Doc from org. Moves the caret to the given position in the area. If this caret is bound to a | |
| moveToAreaEnd | back to summary |
|---|---|
| public void moveToAreaEnd() Implements org. Doc from org. Moves the caret to the end of the area.
| |
| moveToNextChar | back to summary |
|---|---|
| public void moveToNextChar() Implements org. Doc from org. Moves the caret forward one char in the text.
| |
| moveToParEnd | back to summary |
|---|---|
| public void moveToParEnd() Implements org. Doc from org. Moves the caret to the end of the current paragraph.
| |
| moveToParStart | back to summary |
|---|---|
| public void moveToParStart() Implements org. Doc from org. Moves the caret to the beginning of the current paragraph.
| |
| moveToPrevChar | back to summary |
|---|---|
| public void moveToPrevChar() Implements org. Doc from org. Moves the caret backward one char in the text.
| |
| paragraphIndexProperty | back to summary |
|---|---|
| public final ObservableValue Implements org. Doc from org. The paragraph index that contains this caret
| |
| positionProperty | back to summary |
|---|---|
| public final ObservableValue Implements org. Doc from org. The position of the caret within the text
| |
| setBlinkRate | back to summary |
|---|---|
| public void setBlinkRate(Duration rate) Implements org.
| |
| setShowCaret | back to summary |
|---|---|
| public final void setShowCaret(Caret. Implements org.
| |
| showCaretProperty | back to summary |
|---|---|
| public final Var Implements org. Doc from org. Whether to display the caret or not. Default value is
| |
| textPosition | back to summary |
|---|---|
| private int textPosition(int row, int col) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides javafx. Doc from javafx. Returns a string representation of this
| |