Class ColorPickerSkin

    • Constructor Detail

      • ColorPickerSkin

        public ColorPickerSkin​(ColorPicker control)
        Creates a new ColorPickerSkin instance, installing the necessary child nodes into the Control children list, as well as the necessary input mappings for handling key, mouse, etc events.
        Parameters:
        control - The control that this skin should be installed onto.
    • Method Detail

      • dispose

        public void dispose​()
        Called by a Skinnable when the Skin is replaced on the Skinnable. This method allows a Skin to implement any logic necessary to clean up itself after the Skin is no longer needed. It may be used to release native resources. The methods Skin.getSkinnable() and Skin.getNode() should return null following a call to dispose. Calling dispose twice has no effect.
        Specified by:
        dispose in interface Skin<ComboBoxBase<T>>
        Overrides:
        dispose in class SkinBase<ComboBoxBase<Color>>
      • computePrefWidth

        protected double computePrefWidth​(double height,
                                          double topInset,
                                          double rightInset,
                                          double bottomInset,
                                          double leftInset)
        Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.
        Overrides:
        computePrefWidth in class ComboBoxBaseSkin<Color>
        Parameters:
        height - the height that should be used if preferred width depends on it
        topInset - the pixel snapped top inset
        rightInset - the pixel snapped right inset
        bottomInset - the pixel snapped bottom inset
        leftInset - the pixel snapped left inset
        Returns:
        the calculated preferred width
      • getPopupContent

        protected Node getPopupContent​()
        This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.
        Specified by:
        getPopupContent in class ComboBoxPopupControl<Color>
        Returns:
        the Node that will be displayed when the user clicks on the ComboBox 'button' area
      • show

        public void show​()
        This method will be called when the ComboBox popup should be displayed. It is up to specific skin implementations to determine how this is handled.
        Overrides:
        show in class ComboBoxPopupControl<Color>
      • getDisplayNode

        public Node getDisplayNode​()
        This method should return a Node that will be positioned within the ComboBox 'button' area.
        Specified by:
        getDisplayNode in class ComboBoxBaseSkin<Color>
        Returns:
        the node that will be positioned within the ComboBox 'button' area
      • layoutChildren

        protected void layoutChildren​(double x,
                                      double y,
                                      double w,
                                      double h)
        Called during the layout pass of the scenegraph.
        Overrides:
        layoutChildren in class ComboBoxBaseSkin<Color>
        Parameters:
        x - the x position
        y - the y position
        w - the width
        h - the height
      • getClassCssMetaData

        public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData​()
        Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
        Returns:
        the CssMetaData associated with this class, which may include the CssMetaData of its superclasses
      • getConverter

        protected StringConverter<Color> getConverter​()
        Subclasses are responsible for getting the converter. This will be removed in FX 9 when the converter property is moved up to ComboBoxBase with JDK-8130354.
        Specified by:
        getConverter in class ComboBoxPopupControl<Color>
        Returns:
        the string converter
      • getEditor

        protected TextField getEditor​()
        ColorPicker does not use a main text field, so this method has been overridden to return null.
        Specified by:
        getEditor in class ComboBoxPopupControl<Color>
        Returns:
        the editor