Top Description Fields Constructors Methods
javafx.scene.control.skin

public abstract Class ComboBoxPopupControl<T>

extends ComboBoxBaseSkin<T>
Class Inheritance
Known Direct Subclasses
javafx.scene.control.skin.DatePickerSkin, javafx.scene.control.skin.ColorPickerSkin, javafx.scene.control.skin.ComboBoxListViewSkin
Type Parameters
<T>
The type of the ComboBox-like control.
Imports
javafx.beans.value.ObservableValue, javafx.css.Styleable, javafx.event.EventHandler, javafx.geometry.Bounds, .HPos, .Point2D, .VPos, javafx.scene.AccessibleAttribute, .Node, javafx.scene.control.ComboBoxBase, .PopupControl, .Skin, .Skinnable, .TextField, javafx.scene.input.DragEvent, .InputMethodEvent, .KeyCode, .KeyEvent, .MouseEvent, javafx.scene.layout.Region, javafx.stage.WindowEvent, javafx.util.StringConverter, com.sun.javafx.scene.ParentHelper, com.sun.javafx.scene.control.FakeFocusTextField, .ListenerHelper, .Properties, com.sun.javafx.scene.control.behavior.TextInputControlBehavior, com.sun.javafx.scene.input.ExtendedInputMethodRequests, com.sun.javafx.scene.traversal.Algorithm, .Direction, .ParentTraversalEngine, .TraversalContext

An abstract class that extends the functionality of ComboBoxBaseSkin to include API related to showing ComboBox-like controls as popups.
Since
9

Field Summary

Modifier and TypeField and Description
private final ComboBoxBase<T>
private String
private EventHandler<? super InputMethodEvent>
pack-priv PopupControl
private boolean
private TextField
private EventHandler<DragEvent>
private EventHandler<MouseEvent>
Inherited from javafx.scene.control.skin.ComboBoxBaseSkin:
arrowarrowButton

Constructor Summary

AccessConstructor and Description
public
ComboBoxPopupControl(ComboBoxBase<T>
The control that this skin should be installed onto.
control
)

Creates a new instance of ComboBoxPopupControl, although note that this instance does not handle any behavior / input mappings - this needs to be handled appropriately by subclasses.

Method Summary

Modifier and TypeMethod and Description
private void
public void
dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

protected abstract StringConverter<T>

Returns:

the string converter
getConverter
()

Subclasses are responsible for getting the converter.

pack-priv TextField
protected abstract TextField

Returns:

the editor
getEditor
()

Subclasses are responsible for getting the editor.

pack-priv PopupControl
protected abstract Node

Returns:

the Node that will be displayed when the user clicks on the ComboBox 'button' area
getPopupContent
()

This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.

private Point2D
private void
handleKeyEvent(KeyEvent ke, boolean doConsume)

public void
hide()

Implements abstract javafx.scene.control.skin.ComboBoxBaseSkin.hide.

This method will be called when the ComboBox popup should be hidden.

public void
install()

Overrides default javafx.scene.control.Skin.install.

Called once when Skin is set.

private void
pack-priv void
private void
pack-priv void
public void
show()

Implements abstract javafx.scene.control.skin.ComboBoxBaseSkin.show.

This method will be called when the ComboBox popup should be displayed.

private void
pack-priv void
pack-priv void
Inherited from javafx.scene.control.skin.ComboBoxBaseSkin:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputePrefHeightcomputePrefWidthfocusLostgetBehaviorgetDisplayNodegetModelayoutChildrensetModeupdateDisplayArea

Field Detail

comboBoxBaseback to summary
private final ComboBoxBase<T> comboBoxBase
initialTextFieldValueback to summary
private String initialTextFieldValue
inputMethodTextChangedHandlerback to summary
private EventHandler<? super InputMethodEvent> inputMethodTextChangedHandler
popupNeedsReconfiguringback to summary
private boolean popupNeedsReconfiguring
textFieldback to summary
private TextField textField
textFieldDragEventHandlerback to summary
private EventHandler<DragEvent> textFieldDragEventHandler
textFieldMouseEventHandlerback to summary
private EventHandler<MouseEvent> textFieldMouseEventHandler

Constructor Detail

ComboBoxPopupControlback to summary
public ComboBoxPopupControl(ComboBoxBase<T> control)

Creates a new instance of ComboBoxPopupControl, although note that this instance does not handle any behavior / input mappings - this needs to be handled appropriately by subclasses.

Parameters
control:ComboBoxBase<T>

The control that this skin should be installed onto.

Method Detail

createPopupback to summary
private void createPopup()
disposeback to summary
public void dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
getConverterback to summary
protected abstract 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.

Returns:StringConverter<T>

the string converter

getEditableInputNodeback to summary
pack-priv TextField getEditableInputNode()
getEditorback to summary
protected abstract 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.

Returns:TextField

the editor

getPopupback to summary
pack-priv PopupControl getPopup()
getPopupContentback to summary
protected abstract Node getPopupContent()

This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.

Returns:Node

the Node that will be displayed when the user clicks on the ComboBox 'button' area

getPrefPopupPositionback to summary
private Point2D getPrefPopupPosition()
handleKeyEventback to summary
private void handleKeyEvent(KeyEvent ke, boolean doConsume)
hideback to summary
public void hide()

Implements abstract javafx.scene.control.skin.ComboBoxBaseSkin.hide.

Doc from javafx.scene.control.skin.ComboBoxBaseSkin.hide.

This method will be called when the ComboBox popup should be hidden. It is up to specific skin implementations to determine how this is handled.

Annotations
@Override
installback to summary
public void install()

Overrides default javafx.scene.control.Skin.install.

Doc from javafx.scene.control.Skin.install.

Called once when Skin is set. This method is called after the previous skin, if any, has been uninstalled via its dispose() method. The skin can now safely make changes to its associated control, like registering listeners, adding child nodes, and modifying properties and event handlers.

Application code must not call this method.

The default implementation of this method does nothing.

Annotations
@Override
positionAndShowPopupback to summary
private void positionAndShowPopup()
reconfigurePopupback to summary
pack-priv void reconfigurePopup()
removeTextFieldEventFiltersback to summary
private void removeTextFieldEventFilters()
setTextFromTextFieldIntoComboBoxValueback to summary
pack-priv void setTextFromTextFieldIntoComboBoxValue()
showback to summary
public void show()

Implements abstract javafx.scene.control.skin.ComboBoxBaseSkin.show.

Doc from javafx.scene.control.skin.ComboBoxBaseSkin.show.

This method will be called when the ComboBox popup should be displayed. It is up to specific skin implementations to determine how this is handled.

Annotations
@Override
sizePopupback to summary
private void sizePopup()
updateDisplayNodeback to summary
pack-priv void updateDisplayNode()
updateEditableback to summary
pack-priv void updateEditable()