|
Spec-Zone .ru
спецификации, руководства, описания, API
|
public class TextField extends TextInputControl
TextArea control. Additionally, if you want
a form of rich-text editing, there is also the
HTMLEditor control.
TextField supports the notion of showing prompt text
to the user when there is no text already in the
TextField (either via the user, or set programmatically). This is a useful
way of informing the user as to what is expected in the text field, without
having to resort to tooltips or on-screen labels.
TextArea| Type | Property and Description |
|---|---|
ObjectProperty<EventHandler<ActionEvent>> |
onAction
The action handler associated with this text field, or
null if no action handler is assigned.
|
IntegerProperty |
prefColumnCount
The preferred number of text columns.
|
StringProperty |
promptText
The
TextField's prompt text to display, or
null if no prompt text is displayed. |
anchorProperty, caretPositionProperty, editableProperty, lengthProperty, selectedTextProperty, selectionProperty, textPropertycontextMenuProperty, heightProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, prefHeightProperty, prefWidthProperty, skinProperty, tooltipProperty, widthPropertyneedsLayoutPropertyblendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, managedProperty, mouseTransparentProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDraggedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onScrollProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visiblePropertyTextInputControl.Content| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PREF_COLUMN_COUNT
The default value for
prefColumnCount. |
USE_COMPUTED_SIZE, USE_PREF_SIZE| Constructor and Description |
|---|
TextField()
Creates a
TextField with empty text content. |
TextField(java.lang.String text)
Creates a
TextField with initial text content. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.CharSequence |
getCharacters()
Returns the character sequence backing the text field's content.
|
EventHandler<ActionEvent> |
getOnAction()
The action handler associated with this text field, or
null if no action handler is assigned.
|
int |
getPrefColumnCount()
The preferred number of text columns.
|
java.lang.String |
getPromptText()
The
TextField's prompt text to display, or
null if no prompt text is displayed. |
ObjectProperty<EventHandler<ActionEvent>> |
onActionProperty()
The action handler associated with this text field, or
null if no action handler is assigned.
|
IntegerProperty |
prefColumnCountProperty()
The preferred number of text columns.
|
StringProperty |
promptTextProperty()
The
TextField's prompt text to display, or
null if no prompt text is displayed. |
void |
setOnAction(EventHandler<ActionEvent> value)
The action handler associated with this text field, or
null if no action handler is assigned.
|
void |
setPrefColumnCount(int value)
The preferred number of text columns.
|
void |
setPromptText(java.lang.String value)
The
TextField's prompt text to display, or
null if no prompt text is displayed. |
anchorProperty, appendText, backward, caretPositionProperty, clear, copy, cut, deleteNextChar, deletePreviousChar, deleteText, deleteText, deselect, editableProperty, end, endOfNextWord, extendSelection, forward, getAnchor, getCaretPosition, getContent, getLength, getSelectedText, getSelection, getText, getText, home, insertText, isEditable, lengthProperty, nextWord, paste, positionCaret, previousWord, replaceSelection, replaceText, replaceText, selectAll, selectBackward, selectedTextProperty, selectEnd, selectEndOfNextWord, selectForward, selectHome, selectionProperty, selectNextWord, selectPositionCaret, selectPreviousWord, selectRange, setEditable, setText, textPropertycomputeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, getSkin, getTooltip, getUserAgentStylesheet, getWidth, heightProperty, intersects, isResizable, layoutChildren, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, setContextMenu, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setPrefHeight, setPrefSize, setPrefWidth, setSkin, setTooltip, setWidth, skinProperty, tooltipProperty, widthPropertygetChildren, getChildrenUnmodifiable, getManagedChildren, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, setNeedsLayoutaddEventFilter, addEventHandler, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragged, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnScroll, getOpacity, getParent, getProperties, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getUserData, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToScene, localToScene, localToScene, lookupAll, managedProperty, mouseTransparentProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDraggedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onScrollProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragged, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnScroll, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, startDragAndDrop, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, visiblePropertyTextField's prompt text to display, or
null if no prompt text is displayed.getPromptText(),
setPromptText(String)TextField's preferred width.getPrefColumnCount(),
setPrefColumnCount(int)getOnAction(),
setOnAction(EventHandler)public static final int DEFAULT_PREF_COLUMN_COUNT
prefColumnCount.public TextField()
TextField with empty text content.public TextField(java.lang.String text)
TextField with initial text content.text - A string for text content.public java.lang.CharSequence getCharacters()
public final StringProperty promptTextProperty()
TextField's prompt text to display, or
null if no prompt text is displayed.getPromptText(),
setPromptText(String)public final java.lang.String getPromptText()
TextField's prompt text to display, or
null if no prompt text is displayed.public final void setPromptText(java.lang.String value)
TextField's prompt text to display, or
null if no prompt text is displayed.public final IntegerProperty prefColumnCountProperty()
TextField's preferred width.getPrefColumnCount(),
setPrefColumnCount(int)public final int getPrefColumnCount()
TextField's preferred width.public final void setPrefColumnCount(int value)
TextField's preferred width.public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty()
getOnAction(),
setOnAction(EventHandler)public final EventHandler<ActionEvent> getOnAction()
public final void setOnAction(EventHandler<ActionEvent> value)
Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. Use is subject to .