java.lang.Object
org.controlsfx.control.spreadsheet.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 Summary

    Constructors
    Constructor
    Description
    Default constructor, the default "picker-label" styleClass is applied.
    Picker(String... styleClass)
    Initialize this Picker with the style classes provided.
    Picker(Collection<String> styleClass)
    Initialize this Picker with the style classes provided.
  • Method Summary

    Modifier and Type
    Method
    Description
    final javafx.collections.ObservableList<String>
     
    abstract void
    This method will be called whenever the user clicks on this picker.

    Methods inherited from class java.lang.Object

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

    • 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 Details

    • getStyleClass

      public final javafx.collections.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.