Class ComboBoxListViewSkin<T>
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>
- Type Parameters:
-
T- the type of the ComboBox control
- All Implemented Interfaces:
Skin<ComboBoxBase<T>>
public class ComboBoxListViewSkin<T> extends ComboBoxPopupControl<T>
Default skin implementation for the
ComboBox control.- Since:
- 9
- See Also:
Property Summary
| Type | Property | Description |
|---|---|---|
final BooleanProperty |
hideOnClick |
By default this skin hides the popup whenever the ListView is clicked in. |
Constructor Summary
| Constructor | Description |
|---|---|
ComboBoxListViewSkin |
Creates a new ComboBoxListViewSkin instance, installing the necessary child nodes into the Control children list, as well as the necessary input mappings for handling key, mouse, etc events. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
protected StringConverter |
getConverter() |
Subclasses are responsible for getting the converter. |
Node |
getDisplayNode() |
This method should return a Node that will be positioned within the ComboBox 'button' area. |
protected TextField |
getEditor() |
Subclasses are responsible for getting the editor. |
Node |
getPopupContent() |
This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area. |
final BooleanProperty |
hideOnClickProperty() |
By default this skin hides the popup whenever the ListView is clicked in. |
final boolean |
isHideOnClick() |
Gets the value of the hideOnClick property. |
Object |
queryAccessibleAttribute |
This method is called by the assistive technology to request the value for an attribute. |
final void |
setHideOnClick |
Sets the value of the hideOnClick 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
public final BooleanProperty 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).
- See Also:
Constructor Details
ComboBoxListViewSkin
public ComboBoxListViewSkin(ComboBox<T> control)
Creates a new ComboBoxListViewSkin instance, installing the necessary child nodes into the Control
children 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
public final BooleanProperty 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
hideOnClickproperty - See Also:
isHideOnClick
public final boolean isHideOnClick()
Gets the value of the
hideOnClick 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
hideOnClickproperty - See Also:
setHideOnClick
public final void setHideOnClick(boolean value)
Sets the value of the
hideOnClick 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 thehideOnClickproperty - See Also:
getEditor
protected TextField 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:
-
getEditorin classComboBoxPopupControl<T> - Returns:
- the editor
getConverter
protected StringConverter<T> 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:
-
getConverterin classComboBoxPopupControl<T> - Returns:
- the string converter
getDisplayNode
public Node getDisplayNode()
This method should return a Node that will be positioned within the ComboBox 'button' area.
- Specified by:
-
getDisplayNodein classComboBoxBaseSkin<T> - Returns:
- the node that will be positioned within the ComboBox 'button' area
getPopupContent
public Node getPopupContent()
This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.
- Specified by:
-
getPopupContentin classComboBoxPopupControl<T> - Returns:
- the Node that will be displayed when the user clicks on the ComboBox 'button' area
queryAccessibleAttribute
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
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:
-
queryAccessibleAttributein classSkinBase<ComboBoxBase<T>> - Parameters:
-
attribute- the requested attribute -
parameters- optional list of parameters - Returns:
- the value for the requested attribute
- See Also:
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.