Skip navigation links
JavaFX 8
javafx.scene.control

Class ColorPicker

    • Field Detail

      • STYLE_CLASS_BUTTON

        public static final String STYLE_CLASS_BUTTON
        The style class to specify a Button like appearance of ColorPicker control.
        See Also:
        Constant Field Values
      • STYLE_CLASS_SPLIT_BUTTON

        public static final String STYLE_CLASS_SPLIT_BUTTON
        The style class to specify a SplitMenuButton like appearance of ColorPicker control.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ColorPicker

        public ColorPicker()
        Creates a default ColorPicker instance with a selected color set to white.
      • ColorPicker

        public ColorPicker(Color color)
        Creates a ColorPicker instance and sets the selected color to the given color.
        Parameters:
        color - to be set as the currently selected color of the ColorPicker.
    • Method Detail

      • getCustomColors

        public final ObservableList<Color> getCustomColors()
        Gets the list of custom colors added to the Color Palette by the user.
      • createDefaultSkin

        protected Skin<?> createDefaultSkin()
        Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).
        Overrides:
        createDefaultSkin in class Control
        Returns:
        new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.