Change

scalafx.scene.control.TextFormatter.Change
See theChange companion object
class Change(val delegate: Change) extends SFXDelegate[Change]

Contains the state representing a change in the content or selection for a TextInputControl.

Wraps a JavaFX https://docs.oracle.com/javase/8/javafx/api/javafx/scalafx/scene/control/TextFormatter.Change.html

Attributes

Companion
object
Graph
Supertypes
trait SFXDelegate[Change]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def anchor: Int

Gets the new anchor. This value will always be > 0 and <= controlNewText.Length

Gets the new anchor. This value will always be > 0 and <= controlNewText.Length

Attributes

Returns

The new anchor position

def anchor_=(newAnchor: Int): Unit

Sets the anchor. The anchor value must be > 0 and <= controlNewText.Length. Note that there is an order dependence here, in that the position should be specified after the new text has been specified.

Sets the anchor. The anchor value must be > 0 and <= controlNewText.Length. Note that there is an order dependence here, in that the position should be specified after the new text has been specified.

Value parameters

newAnchor

The new anchor position

Attributes

Gets the new caret position. This value will always be > 0 and <= controlNewText.Length

Gets the new caret position. This value will always be > 0 and <= controlNewText.Length

Attributes

Returns

The new caret position

def caretPosition_=(newCaretPosition: Int): Unit

Sets the caret position. The caret position value must be > 0 and <= controlNewText.Length. Note that there is an order dependence here, in that the position should be specified after the new text has been specified.

Sets the caret position. The caret position value must be > 0 and <= controlNewText.Length. Note that there is an order dependence here, in that the position should be specified after the new text has been specified.

Value parameters

newCaretPosition

The new caret position

Attributes

Gets the control associated with this change.

Gets the control associated with this change.

Attributes

Returns

The control associated with this change. This will never be null.

Gets the current anchor position of the control.

Gets the current anchor position of the control.

Attributes

Returns

The previous anchor

Gets the current caret position of the control.

Gets the current caret position of the control.

Attributes

Returns

The previous caret position

Gets the complete new text which will be used on the control after this change. Note that some controls (such as TextField) may do further filtering after the change is made (such as stripping out newlines) such that you cannot assume that the newText will be exactly the same as what is finally set as the content on the control, however it is correct to assume that this is the case for the purpose of computing the new caret position and new anchor position (as those values supplied will be modified as necessary after the control has stripped any additional characters that the control might strip).

Gets the complete new text which will be used on the control after this change. Note that some controls (such as TextField) may do further filtering after the change is made (such as stripping out newlines) such that you cannot assume that the newText will be exactly the same as what is finally set as the content on the control, however it is correct to assume that this is the case for the purpose of computing the new caret position and new anchor position (as those values supplied will be modified as necessary after the control has stripped any additional characters that the control might strip).

Attributes

Returns

The controls proposed new text at the time of this call, according to the state set for start, end, and text properties on this Change object.

This is the full text that control has before the change. To get the text after this change, use controlNewText.

This is the full text that control has before the change. To get the text after this change, use controlNewText.

Attributes

Returns

the previous text of control

def rangeEnd: Int

Gets the end index into the TextInputControl.text for the modification. This will always be a value > angeStart and <= TextInputControl.length.

Gets the end index into the TextInputControl.text for the modification. This will always be a value > angeStart and <= TextInputControl.length.

Attributes

Returns

The end index

Gets the start index into the TextInputControl.text for the modification. This will always be a value > 0 and <= TextInputControl.length.

Gets the start index into the TextInputControl.text for the modification. This will always be a value > 0 and <= TextInputControl.length.

Attributes

Returns

The start index

Gets the selection of this change. Note that the selection range refers to controlNewText, not the current control text.

Gets the selection of this change. Note that the selection range refers to controlNewText, not the current control text.

Attributes

Returns

The selected range of this change.

def text: String

Gets the text used in this change. For example, this may be new text being added, or text which is replacing all the control's text within the range of start and end. Typically it is an empty string only for cases where the range is being deleted.

Gets the text used in this change. For example, this may be new text being added, or text which is replacing all the control's text within the range of start and end. Typically it is an empty string only for cases where the range is being deleted.

Attributes

Returns

The text involved in this change. This will never be null.

def text_=(value: String): Unit

Sets the text to use in this change. This is used to replace the range from start to end, if such a range exists, or to insert text at the position represented by start == end.

Sets the text to use in this change. This is used to replace the range from start to end, if such a range exists, or to insert text at the position represented by start == end.

Value parameters

value

The text. This cannot be null.

Attributes

Inherited methods

override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value parameters

ref

Object to be compared.

Attributes

Returns

if the other object is equals to this delegate or not.

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def hashCode: Int

Attributes

Returns

The delegate hashcode

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def toString: String

Attributes

Returns

Returns the original delegate's toString() adding a [SFX] prefix.

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate

Concrete fields

override val delegate: Change

JavaFX object to be wrapped.

JavaFX object to be wrapped.

Attributes