Class Picker


  • public abstract class Picker
    extends Object
    Pickers can display some Images next to the headers.
    You can specify the image by providing custom StyleClass :
     .picker-label{
       -fx-graphic: url("add.png"); 
       -fx-background-color: white;
       -fx-padding: 0 0 0 0;
     }
     
    The onClick() method does nothing by default, so you can override it if you want to execute a custom action when the user will click on your Picker.

    Visual:

    Screenshot of Picker
    • Constructor Detail

      • Picker

        public Picker()
        Default constructor, the default "picker-label" styleClass is applied.
      • Picker

        public Picker​(String... styleClass)
        Initialize this Picker with the style classes provided.
        Parameters:
        styleClass -
      • Picker

        public Picker​(Collection<String> styleClass)
        Initialize this Picker with the style classes provided.
        Parameters:
        styleClass -
    • Method Detail

      • getStyleClass

        public final ObservableList<String> getStyleClass()
        Returns:
        the style class of this picker.
      • onClick

        public abstract void onClick()
        This method will be called whenever the user clicks on this picker.