Top Description Fields Constructors Methods
com.dlsc.unitfx

public Class CustomTextField

extends TextField
Class Inheritance
Known Direct Subclasses
com.dlsc.unitfx.NumberInputField
Imports
com.dlsc.unitfx.skins.CustomTextFieldSkin, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.scene.Node, javafx.scene.control.Skin, .TextField

A custom text field that allows the application to set nodes on the left-hand and right-hand side of the field (e.g. magnifying glass icon for search on the left-hand side and an X icon for cancelling a search on the right-hand side).

Field Summary

Modifier and TypeField and Description
private ObjectProperty<Node>
left

Hides javafx.scene.Parent.left.

Stores the node shown on the left-hand side of the text field.
private ObjectProperty<Node>
right

Hides javafx.scene.Parent.right.

Stores the node shown on the right-hand side of the text field.
Inherited from javafx.scene.control.TextField:
DEFAULT_PREF_COLUMN_COUNT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.TextField.createDefaultSkin.

Create a new instance of the default skin for this control.

public final Node
public final Node
public final ObjectProperty<Node>
public final ObjectProperty<Node>
public final void
setLeft(Node value)

public final void
setRight(Node right)

Inherited from javafx.scene.control.TextField:
alignmentPropertygetAlignmentgetCharactersgetClassCssMetaDatagetControlCssMetaDatagetOnActiongetPrefColumnCountonActionPropertyprefColumnCountPropertysetAlignmentsetOnActionsetPrefColumnCount

Field Detail

leftback to summary
private ObjectProperty<Node> left

Hides javafx.scene.Parent.left.

Stores the node shown on the left-hand side of the text field.

Constructor Detail

CustomTextFieldback to summary
public CustomTextField()

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.TextField.createDefaultSkin.

Doc from javafx.scene.control.TextField.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

Doc from javafx.scene.control.Control.createDefaultSkin.

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
getLeftback to summary
public final Node getLeft()
getRightback to summary
public final Node getRight()
leftPropertyback to summary
public final ObjectProperty<Node> leftProperty()
rightPropertyback to summary
public final ObjectProperty<Node> rightProperty()
setLeftback to summary
public final void setLeft(Node value)
setRightback to summary
public final void setRight(Node right)