java.lang.Object
javafx.scene.control.SkinBase<ComboBoxBase<T>>
javafx.scene.control.skin.ComboBoxBaseSkin<T>
javafx.scene.control.skin.ComboBoxPopupControl<T>
javafx.scene.control.skin.ComboBoxListViewSkin<T>
- All Implemented Interfaces:
Skin<ComboBoxBase<T>>
Default skin implementation for the
ComboBox
control.- Since:
- 9
- See Also:
-
Property Summary
TypePropertyDescriptionfinal BooleanProperty
By default this skin hides the popup whenever the ListView is clicked in. -
Constructor Summary
ConstructorDescriptionComboBoxListViewSkin
(ComboBox<T> control) Creates a new ComboBoxListViewSkin instance, installing the necessary child nodes into the Controlchildren
list, as well as the necessary input mappings for handling key, mouse, etc events. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringConverter
<T> Subclasses are responsible for getting the converter.This method should return a Node that will be positioned within the ComboBox 'button' area.protected TextField
Subclasses are responsible for getting the editor.This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.final BooleanProperty
By default this skin hides the popup whenever the ListView is clicked in.final boolean
Gets the value of thehideOnClick
property.queryAccessibleAttribute
(AccessibleAttribute attribute, Object... parameters) This method is called by the assistive technology to request the value for an attribute.final void
setHideOnClick
(boolean value) Sets the value of thehideOnClick
property.Methods declared in class javafx.scene.control.skin.ComboBoxPopupControl
hide, show
Methods declared in class javafx.scene.control.SkinBase
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners
-
Property Details
-
hideOnClick
By default this skin hides the popup whenever the ListView is clicked in. By setting hideOnClick to false, the popup will not be hidden when the ListView is clicked in. This is beneficial in some scenarios (for example, when the ListView cells have checkboxes).- See Also:
-
-
Constructor Details
-
ComboBoxListViewSkin
Creates a new ComboBoxListViewSkin instance, installing the necessary child nodes into the Controlchildren
list, as well as the necessary input mappings for handling key, mouse, etc events.- Parameters:
control
- The control that this skin should be installed onto.
-
-
Method Details
-
hideOnClickProperty
By default this skin hides the popup whenever the ListView is clicked in. By setting hideOnClick to false, the popup will not be hidden when the ListView is clicked in. This is beneficial in some scenarios (for example, when the ListView cells have checkboxes).- Returns:
- the
hideOnClick
property - See Also:
-
isHideOnClick
public final boolean isHideOnClick()Gets the value of thehideOnClick
property.- Property description:
- By default this skin hides the popup whenever the ListView is clicked in. By setting hideOnClick to false, the popup will not be hidden when the ListView is clicked in. This is beneficial in some scenarios (for example, when the ListView cells have checkboxes).
- Returns:
- the value of the
hideOnClick
property - See Also:
-
setHideOnClick
public final void setHideOnClick(boolean value) Sets the value of thehideOnClick
property.- Property description:
- By default this skin hides the popup whenever the ListView is clicked in. By setting hideOnClick to false, the popup will not be hidden when the ListView is clicked in. This is beneficial in some scenarios (for example, when the ListView cells have checkboxes).
- Parameters:
value
- the value for thehideOnClick
property- See Also:
-
getEditor
Subclasses are responsible for getting the editor. This will be removed in FX 9 when the editor property is moved up to ComboBoxBase with JDK-8130354 Note: ComboBoxListViewSkin should return null if editable is false, even if the ComboBox does have an editor set.- Specified by:
getEditor
in classComboBoxPopupControl<T>
- Returns:
- the editor
-
getConverter
Subclasses are responsible for getting the converter. This will be removed in FX 9 when the converter property is moved up to ComboBoxBase with JDK-8130354.- Specified by:
getConverter
in classComboBoxPopupControl<T>
- Returns:
- the string converter
-
getDisplayNode
This method should return a Node that will be positioned within the ComboBox 'button' area.- Specified by:
getDisplayNode
in classComboBoxBaseSkin<T>
- Returns:
- the node that will be positioned within the ComboBox 'button' area
-
getPopupContent
This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.- Specified by:
getPopupContent
in classComboBoxPopupControl<T>
- Returns:
- the Node that will be displayed when the user clicks on the ComboBox 'button' area
-
queryAccessibleAttribute
This method is called by the assistive technology to request the value for an attribute.This method is commonly overridden by subclasses to implement attributes that are required for a specific role.
If a particular attribute is not handled, the superclass implementation must be called.- Overrides:
queryAccessibleAttribute
in classSkinBase<ComboBoxBase<T>>
- Parameters:
attribute
- the requested attributeparameters
- optional list of parameters- Returns:
- the value for the requested attribute
- See Also:
-