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
PropertiesTypePropertyDescriptionfinal BooleanPropertyBy default this skin hides the popup whenever the ListView is clicked in. -
Constructor Summary
ConstructorsConstructorDescriptionComboBoxListViewSkin(ComboBox<T> control) Creates a new ComboBoxListViewSkin instance, installing the necessary child nodes into the Controlchildrenlist, 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 TextFieldSubclasses 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 BooleanPropertyBy default this skin hides the popup whenever the ListView is clicked in.final booleanGets the value of thehideOnClickproperty.queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) This method is called by the assistive technology to request the value for an attribute.final voidsetHideOnClick(boolean value) Sets the value of thehideOnClickproperty.Methods declared in class javafx.scene.control.skin.ComboBoxPopupControl
hide, showMethods 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 Controlchildrenlist, 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
hideOnClickproperty - See Also:
-
isHideOnClick
public final boolean isHideOnClick()Gets the value of thehideOnClickproperty.- 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 thehideOnClickproperty.- 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
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
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
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
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
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 attributeparameters- optional list of parameters- Returns:
- the value for the requested attribute
- See Also:
-