Class SearchFieldPopup<T>

java.lang.Object
javafx.stage.Window
javafx.stage.PopupWindow
javafx.scene.control.PopupControl
com.dlsc.gemsfx.CustomPopupControl
com.dlsc.gemsfx.skins.SearchFieldPopup<T>
Type Parameters:
T - the suggestion item type
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

public class SearchFieldPopup<T> extends CustomPopupControl
Popup control used by SearchField to display suggestions.

The popup tracks the owning search field, sizes itself to the field, and delegates its visual content to SearchFieldPopupSkin.

  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.scene.control.PopupControl

    javafx.scene.control.PopupControl.CSSBridge

    Nested classes/interfaces inherited from class javafx.stage.PopupWindow

    javafx.stage.PopupWindow.AnchorLocation
  • Property Summary

    Properties inherited from class javafx.scene.control.PopupControl

    id, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth, skin, style

    Properties inherited from class javafx.stage.PopupWindow

    anchorLocation, anchorX, anchorY, autoFix, autoHide, consumeAutoHidingEvents, hideOnEscape, onAutoHide, ownerNode, ownerWindow

    Properties inherited from class javafx.stage.Window

    eventDispatcher, focused, forceIntegerRenderScale, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, opacity, outputScaleX, outputScaleY, renderScaleX, renderScaleY, scene, showing, width, x, y
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default style class for the popup.

    Fields inherited from class javafx.scene.control.PopupControl

    bridge, USE_COMPUTED_SIZE, USE_PREF_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new popup for the given search field.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javafx.scene.control.Skin<?>
    Creates the default skin for this popup.
    Returns the search field that owns this popup.
    javafx.collections.ObservableList<T>
    Returns this popup's observable suggestions list.

    Methods inherited from class CustomPopupControl

    show

    Methods inherited from class javafx.scene.control.PopupControl

    getClassCssMetaData, getCssMetaData, getId, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, getPseudoClassStates, getSkin, getStyle, getStyleableNode, getStyleableParent, getStyleClass, getTypeSelector, idProperty, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, pseudoClassStateChanged, setId, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setPrefHeight, setPrefSize, setPrefWidth, setSkin, setStyle, skinProperty, styleProperty

    Methods inherited from class javafx.stage.PopupWindow

    anchorLocationProperty, anchorXProperty, anchorYProperty, autoFixProperty, autoHideProperty, consumeAutoHidingEventsProperty, getAnchorLocation, getAnchorX, getAnchorY, getConsumeAutoHidingEvents, getOnAutoHide, getOwnerNode, getOwnerWindow, hide, hideOnEscapeProperty, isAutoFix, isAutoHide, isHideOnEscape, onAutoHideProperty, ownerNodeProperty, ownerWindowProperty, setAnchorLocation, setAnchorX, setAnchorY, setAutoFix, setAutoHide, setConsumeAutoHidingEvents, setHideOnEscape, setOnAutoHide, setScene, show, show, show

    Methods inherited from class javafx.stage.Window

    addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, forceIntegerRenderScaleProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getOutputScaleX, getOutputScaleY, getProperties, getRenderScaleX, getRenderScaleY, getScene, getUserData, getWidth, getWindows, getX, getY, hasProperties, heightProperty, isFocused, isForceIntegerRenderScale, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, outputScaleXProperty, outputScaleYProperty, removeEventFilter, removeEventHandler, renderScaleXProperty, renderScaleYProperty, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setForceIntegerRenderScale, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setRenderScaleX, setRenderScaleY, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yProperty

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_STYLE_CLASS

      public static final String DEFAULT_STYLE_CLASS
      The default style class for the popup.
      See Also:
  • Constructor Details

    • SearchFieldPopup

      public SearchFieldPopup(SearchField<T> searchField)
      Creates a new popup for the given search field.
      Parameters:
      searchField - the search field that owns this popup
  • Method Details

    • getSearchField

      public SearchField<T> getSearchField()
      Returns the search field that owns this popup.
      Returns:
      the owning search field
    • getSuggestions

      public javafx.collections.ObservableList<T> getSuggestions()
      Returns this popup's observable suggestions list.

      The default popup skin displays suggestions from the owning search field.

      Returns:
      this popup's suggestions list
    • createDefaultSkin

      protected javafx.scene.control.Skin<?> createDefaultSkin()
      Creates the default skin for this popup.
      Overrides:
      createDefaultSkin in class javafx.scene.control.PopupControl
      Returns:
      the default popup skin