Class SelectionBoxSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<SelectionBox<T>>
com.dlsc.gemsfx.skins.GemsSkinBase<SelectionBox<T>>
com.dlsc.gemsfx.skins.SelectionBoxSkin<T>
Type Parameters:
T - the item type
All Implemented Interfaces:
javafx.scene.control.Skin<SelectionBox<T>>

public class SelectionBoxSkin<T> extends GemsSkinBase<SelectionBox<T>>
Skin for SelectionBox.

The skin renders the selected item text and arrow button, and manages a popup containing check boxes or radio buttons depending on the selection mode.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new skin for the given selection box.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
     
    void
    Hides the selection popup.
    protected void
    layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight)
     
    void
    Shows the selection popup when the control is interactive.
    void
    Updates the display label from the current selection and converters.

    Methods inherited from class javafx.scene.control.SkinBase

    computeBaselineOffset, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners

    Methods inherited from class Object

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

    • SelectionBoxSkin

      public SelectionBoxSkin(SelectionBox<T> control)
      Creates a new skin for the given selection box.
      Parameters:
      control - the selection box to skin
  • Method Details

    • showPopup

      public void showPopup()
      Shows the selection popup when the control is interactive.
    • hidePopup

      public void hidePopup()
      Hides the selection popup.
    • updateDisplayLabelText

      public void updateDisplayLabelText()
      Updates the display label from the current selection and converters.
    • computeMinHeight

      protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMinHeight in class javafx.scene.control.SkinBase<SelectionBox<T>>
    • computeMinWidth

      protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMinWidth in class javafx.scene.control.SkinBase<SelectionBox<T>>
    • computeMaxWidth

      protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxWidth in class javafx.scene.control.SkinBase<SelectionBox<T>>
    • computeMaxHeight

      protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxHeight in class javafx.scene.control.SkinBase<SelectionBox<T>>
    • computePrefWidth

      protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computePrefWidth in class javafx.scene.control.SkinBase<SelectionBox<T>>
    • computePrefHeight

      protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computePrefHeight in class javafx.scene.control.SkinBase<SelectionBox<T>>
    • layoutChildren

      protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight)
      Overrides:
      layoutChildren in class javafx.scene.control.SkinBase<SelectionBox<T>>