Spec-Zone .ru
спецификации, руководства, описания, API
|
T
- The type of the value that has been selected or otherwise
entered in to this ComboBox.public abstract class ComboBoxBase<T> extends Control
show()
and
hide()
methods are called, however commonly this results in either
a popup or dialog appearing that allows for the user to provide the
required information.
A ComboBox has a value
property that represents
the current user input. This may be based on a selection from a drop-down list,
or it may be from user input when the ComboBox is
editable
.
An editable
ComboBox is one which provides some
means for an end-user to provide input for values that are not otherwise
options available to them. For example, in the ComboBox
implementation,
an editable ComboBox provides a TextField
that may be typed into.
As mentioned above, when the user commits textual input into the textfield
(commonly by pressing the Enter keyboard key), the
value
property will be updated.
The purpose of the separation between this class and, say, ComboBox
is to allow for ComboBox-like controls that do not necessarily pop up a list
of items. Examples of other implementations include color pickers, calendar
pickers, etc. The ComboBox
class provides the default, and most commonly
expected implementation. Refer to that classes javadoc for more information.
ComboBox
Type | Property and Description |
---|---|
BooleanProperty |
armed
Indicates that the ComboBox has been "armed" such that a mouse release
will cause the ComboBox
show() method to be invoked. |
BooleanProperty |
editable
Specifies whether the ComboBox allows for user input.
|
ObjectProperty<EventHandler<ActionEvent>> |
onAction
The ComboBox action, which is invoked whenever the ComboBox
value property is changed. |
ObjectProperty<EventHandler<Event>> |
onHidden |
ObjectProperty<EventHandler<Event>> |
onHiding |
ObjectProperty<EventHandler<Event>> |
onShowing |
ObjectProperty<EventHandler<Event>> |
onShown |
StringProperty |
promptText
The
ComboBox prompt text to display, or null if no
prompt text is displayed. |
ReadOnlyBooleanProperty |
showing
Represents the current state of the ComboBox popup, and whether it is
currently visible on screen (although it may be hidden behind other windows).
|
ObjectProperty<T> |
value
The value of this ComboBox is defined as the selected item if the input
is not editable, or if it is editable, the most recent user action:
either the value input by the user, or the last selected item.
|
contextMenu, height, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth, skinClassName, skin, tooltip, width
needsLayout
blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, visible
Modifier and Type | Field and Description |
---|---|
static EventType<Event> |
ON_HIDDEN
Called when the ComboBox popup/display has been hidden.
|
static EventType<Event> |
ON_HIDING
Called when the ComboBox popup/display will be hidden.
|
static EventType<Event> |
ON_SHOWING
Called prior to the ComboBox showing its popup/display after the user
has clicked or otherwise interacted with the ComboBox.
|
static EventType<Event> |
ON_SHOWN
Called after the ComboBox has shown its popup/display.
|
USE_COMPUTED_SIZE, USE_PREF_SIZE
Constructor and Description |
---|
ComboBoxBase()
Creates a default ComboBoxBase instance.
|
Modifier and Type | Method and Description |
---|---|
void |
arm()
Arms the ComboBox.
|
BooleanProperty |
armedProperty()
Indicates that the ComboBox has been "armed" such that a mouse release
will cause the ComboBox
show() method to be invoked. |
void |
disarm()
Disarms the ComboBox.
|
BooleanProperty |
editableProperty()
Specifies whether the ComboBox allows for user input.
|
EventHandler<ActionEvent> |
getOnAction()
Gets the value of the property onAction.
|
EventHandler<Event> |
getOnHidden()
Gets the value of the property onHidden.
|
EventHandler<Event> |
getOnHiding()
Gets the value of the property onHiding.
|
EventHandler<Event> |
getOnShowing()
Gets the value of the property onShowing.
|
EventHandler<Event> |
getOnShown()
Gets the value of the property onShown.
|
java.lang.String |
getPromptText()
Gets the value of the property promptText.
|
T |
getValue()
Gets the value of the property value.
|
void |
hide()
Closes the popup / dialog that was shown when
show() was called. |
boolean |
isArmed()
Gets the value of the property armed.
|
boolean |
isEditable()
Gets the value of the property editable.
|
boolean |
isShowing()
Gets the value of the property showing.
|
ObjectProperty<EventHandler<ActionEvent>> |
onActionProperty()
The ComboBox action, which is invoked whenever the ComboBox
value property is changed. |
ObjectProperty<EventHandler<Event>> |
onHiddenProperty() |
ObjectProperty<EventHandler<Event>> |
onHidingProperty() |
ObjectProperty<EventHandler<Event>> |
onShowingProperty() |
ObjectProperty<EventHandler<Event>> |
onShownProperty() |
StringProperty |
promptTextProperty()
The
ComboBox prompt text to display, or null if no
prompt text is displayed. |
void |
setEditable(boolean value)
Sets the value of the property editable.
|
void |
setOnAction(EventHandler<ActionEvent> value)
Sets the value of the property onAction.
|
void |
setOnHidden(EventHandler<Event> value)
Called just after the
ComboBoxBase popup/display has been hidden. |
void |
setOnHiding(EventHandler<Event> value)
Called just prior to the
ComboBox popup/display being hidden. |
void |
setOnShowing(EventHandler<Event> value)
Called just prior to the
ComboBoxBase popup/display being shown, |
void |
setOnShown(EventHandler<Event> value)
Called just after the
ComboBoxBase popup/display is shown. |
void |
setPromptText(java.lang.String value)
Sets the value of the property promptText.
|
void |
setValue(T value)
Sets the value of the property value.
|
void |
show()
Requests that the ComboBox display the popup aspect of the user interface.
|
ReadOnlyBooleanProperty |
showingProperty()
Represents the current state of the ComboBox popup, and whether it is
currently visible on screen (although it may be hidden behind other windows).
|
ObjectProperty<T> |
valueProperty()
The value of this ComboBox is defined as the selected item if the input
is not editable, or if it is editable, the most recent user action:
either the value input by the user, or the last selected item.
|
computeMaxHeight, 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, setSkinClassName, setTooltip, setWidth, skinClassNameProperty, skinProperty, tooltipProperty, widthProperty
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, setNeedsLayout
addEventFilter, 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, getLocalToParentTransform, getLocalToSceneTransform, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, 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, localToParentTransformProperty, localToScene, localToScene, localToScene, localToSceneTransformProperty, lookupAll, managedProperty, mouseTransparentProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, 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, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, visibleProperty
public ObjectProperty<T> valueProperty
getValue()
,
setValue(T)
public BooleanProperty editableProperty
value
property.
Note that when the editable property changes, the value property is reset, along with any other relevant state.
isEditable()
,
setEditable(boolean)
public ReadOnlyBooleanProperty showingProperty
isShowing()
public final StringProperty promptTextProperty
ComboBox
prompt text to display, or null if no
prompt text is displayed. Prompt text is not displayed in all circumstances,
it is dependent upon the subclasses of ComboBoxBase to clarify when
promptText will be shown.getPromptText()
,
setPromptText(String)
public BooleanProperty armedProperty
show()
method to be invoked. This is
subtly different from pressed. Pressed indicates that the mouse has been
pressed on a Node and has not yet been released. arm
however
also takes into account whether the mouse is actually over the
ComboBox and pressed.isArmed()
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty
value
property is changed. This
may be due to the value property being programmatically changed, when the
user selects an item in a popup list or dialog, or, in the case of
editable
ComboBoxes, it may be when the user
provides their own input (be that via a TextField
or some other
input mechanism.getOnAction()
,
setOnAction(EventHandler)
public final ObjectProperty<EventHandler<Event>> onShowingProperty
getOnShowing()
,
setOnShowing(EventHandler)
public final ObjectProperty<EventHandler<Event>> onShownProperty
getOnShown()
,
setOnShown(EventHandler)
public final ObjectProperty<EventHandler<Event>> onHidingProperty
getOnHiding()
,
setOnHiding(EventHandler)
public final ObjectProperty<EventHandler<Event>> onHiddenProperty
getOnHidden()
,
setOnHidden(EventHandler)
public static final EventType<Event> ON_SHOWING
Called prior to the ComboBox showing its popup/display after the user has clicked or otherwise interacted with the ComboBox.
public static final EventType<Event> ON_SHOWN
Called after the ComboBox has shown its popup/display.
public static final EventType<Event> ON_HIDING
Called when the ComboBox popup/display will be hidden.
public ObjectProperty<T> valueProperty()
getValue()
,
setValue(T)
public final void setValue(T value)
public final T getValue()
public BooleanProperty editableProperty()
value
property.
Note that when the editable property changes, the value property is reset, along with any other relevant state.
isEditable()
,
setEditable(boolean)
public final void setEditable(boolean value)
value
property.
Note that when the editable property changes, the value property is reset, along with any other relevant state.
public final boolean isEditable()
value
property.
Note that when the editable property changes, the value property is reset, along with any other relevant state.
public ReadOnlyBooleanProperty showingProperty()
isShowing()
public final boolean isShowing()
public final StringProperty promptTextProperty()
ComboBox
prompt text to display, or null if no
prompt text is displayed. Prompt text is not displayed in all circumstances,
it is dependent upon the subclasses of ComboBoxBase to clarify when
promptText will be shown.getPromptText()
,
setPromptText(String)
public final java.lang.String getPromptText()
ComboBox
prompt text to display, or null if no
prompt text is displayed. Prompt text is not displayed in all circumstances,
it is dependent upon the subclasses of ComboBoxBase to clarify when
promptText will be shown.public final void setPromptText(java.lang.String value)
ComboBox
prompt text to display, or null if no
prompt text is displayed. Prompt text is not displayed in all circumstances,
it is dependent upon the subclasses of ComboBoxBase to clarify when
promptText will be shown.public BooleanProperty armedProperty()
show()
method to be invoked. This is
subtly different from pressed. Pressed indicates that the mouse has been
pressed on a Node and has not yet been released. arm
however
also takes into account whether the mouse is actually over the
ComboBox and pressed.isArmed()
public final boolean isArmed()
show()
method to be invoked. This is
subtly different from pressed. Pressed indicates that the mouse has been
pressed on a Node and has not yet been released. arm
however
also takes into account whether the mouse is actually over the
ComboBox and pressed.public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty()
value
property is changed. This
may be due to the value property being programmatically changed, when the
user selects an item in a popup list or dialog, or, in the case of
editable
ComboBoxes, it may be when the user
provides their own input (be that via a TextField
or some other
input mechanism.getOnAction()
,
setOnAction(EventHandler)
public final void setOnAction(EventHandler<ActionEvent> value)
value
property is changed. This
may be due to the value property being programmatically changed, when the
user selects an item in a popup list or dialog, or, in the case of
editable
ComboBoxes, it may be when the user
provides their own input (be that via a TextField
or some other
input mechanism.public final EventHandler<ActionEvent> getOnAction()
value
property is changed. This
may be due to the value property being programmatically changed, when the
user selects an item in a popup list or dialog, or, in the case of
editable
ComboBoxes, it may be when the user
provides their own input (be that via a TextField
or some other
input mechanism.public final ObjectProperty<EventHandler<Event>> onShowingProperty()
getOnShowing()
,
setOnShowing(EventHandler)
public final void setOnShowing(EventHandler<Event> value)
ComboBoxBase
popup/display being shown,public final EventHandler<Event> getOnShowing()
public final ObjectProperty<EventHandler<Event>> onShownProperty()
getOnShown()
,
setOnShown(EventHandler)
public final void setOnShown(EventHandler<Event> value)
ComboBoxBase
popup/display is shown.public final EventHandler<Event> getOnShown()
public final ObjectProperty<EventHandler<Event>> onHidingProperty()
getOnHiding()
,
setOnHiding(EventHandler)
public final void setOnHiding(EventHandler<Event> value)
ComboBox
popup/display being hidden.public final EventHandler<Event> getOnHiding()
public final ObjectProperty<EventHandler<Event>> onHiddenProperty()
getOnHidden()
,
setOnHidden(EventHandler)
public final void setOnHidden(EventHandler<Event> value)
ComboBoxBase
popup/display has been hidden.public final EventHandler<Event> getOnHidden()
public void show()
ComboBoxBase
class javadoc, what is actually
shown when this method is called is undefined, but commonly it is some
form of popup or dialog window.public void hide()
show()
was called.public void arm()
public void disarm()
arm()
.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to