Top Description Inners Fields Constructors Methods
javafx.scene.control.skin

public Class ColorPickerSkin

extends ComboBoxPopupControl<Color>
Class Inheritance
Static Imports
javafx.scene.paint.Color.*

Default skin implementation for the ColorPicker control.
Since
9
See Also
ColorPicker

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static class

Field Summary

Modifier and TypeField and Description
private final ColorPickerBehavior
private static final Map<Color, String>
pack-priv BooleanProperty
private Rectangle
private final StyleableDoubleProperty
private final StyleableDoubleProperty
private final StyleableDoubleProperty
private final StyleableDoubleProperty
private static final Map<Color, String>
private Label
private final StyleableStringProperty
private StackPane
private ColorPalette
Inherited from javafx.scene.control.skin.ComboBoxPopupControl:
popup

Constructor Summary

AccessConstructor and Description
public
ColorPickerSkin(final ColorPicker
The control that this skin should be installed onto.
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.

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.ComboBoxBaseSkin.computePrefWidth.

Calculates the preferred width of this SkinBase.

public void
dispose()

Overrides javafx.scene.control.skin.ComboBoxPopupControl.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

pack-priv void
pack-priv ComboBoxBaseBehavior<T>
public static List<CssMetaData<? extends Styleable, ?>>

Returns:

the CssMetaData associated with this class, which may include the CssMetaData of its superclasses
getClassCssMetaData
()

Hides javafx.scene.control.SkinBase.getClassCssMetaData.

Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

protected StringConverter<Color>
getConverter()

Implements abstract javafx.scene.control.skin.ComboBoxPopupControl.getConverter.

Subclasses are responsible for getting the converter.

public List<CssMetaData<? extends Styleable, ?>>
getCssMetaData()

Overrides javafx.scene.control.SkinBase.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

public Node
getDisplayNode()

Implements abstract javafx.scene.control.skin.ComboBoxBaseSkin.getDisplayNode.

This method should return a Node that will be positioned within the ComboBox 'button' area.

protected TextField
getEditor()

Implements abstract javafx.scene.control.skin.ComboBoxPopupControl.getEditor.

ColorPicker does not use a main text field, so this method has been overridden to return null.

protected Node
getPopupContent()

Implements abstract javafx.scene.control.skin.ComboBoxPopupControl.getPopupContent.

This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.

private final StringProperty
protected void
layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.skin.ComboBoxBaseSkin.layoutChildren.

Called during the layout pass of the scenegraph.

public void
show()

Overrides javafx.scene.control.skin.ComboBoxPopupControl.show.

This method will be called when the ComboBox popup should be displayed.

pack-priv static String
private void
private void
Inherited from javafx.scene.control.skin.ComboBoxPopupControl:
getEditableInputNodegetPopuphideinstallreconfigurePopupsetTextFromTextFieldIntoComboBoxValueupdateDisplayNodeupdateEditable

Field Detail

behaviorback to summary
private final ColorPickerBehavior behavior
COLOR_NAME_MAPback to summary
private static final Map<Color, String> COLOR_NAME_MAP
colorLabelVisibleback to summary
pack-priv BooleanProperty colorLabelVisible
colorRectback to summary
private Rectangle colorRect
colorRectHeightback to summary
private final StyleableDoubleProperty colorRectHeight
colorRectWidthback to summary
private final StyleableDoubleProperty colorRectWidth
colorRectXback to summary
private final StyleableDoubleProperty colorRectX
colorRectYback to summary
private final StyleableDoubleProperty colorRectY
CSS_NAME_MAPback to summary
private static final Map<Color, String> CSS_NAME_MAP
displayNodeback to summary
private Label displayNode

Hides javafx.scene.control.skin.ComboBoxBaseSkin.displayNode.

imageUrlback to summary
private final StyleableStringProperty imageUrl
pickerColorBoxback to summary
private StackPane pickerColorBox
popupContentback to summary
private ColorPalette popupContent

Constructor Detail

ColorPickerSkinback to summary
public ColorPickerSkin(final 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:ColorPicker

The control that this skin should be installed onto.

Method Detail

colorDisplayNameback to summary
pack-priv static String colorDisplayName(Color c)
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.ComboBoxBaseSkin.computePrefWidth.

Doc from javafx.scene.control.skin.ComboBoxBaseSkin.computePrefWidth.

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.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides javafx.scene.control.skin.ComboBoxPopupControl.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
focusLostback to summary
pack-priv void focusLost()

Overrides javafx.scene.control.skin.ComboBoxBaseSkin.focusLost.

Annotations
@Override
getBehaviorback to summary
pack-priv ComboBoxBaseBehavior<T> getBehavior()

Overrides javafx.scene.control.skin.ComboBoxBaseSkin.getBehavior.

Annotations
@Override
getClassCssMetaDataback to summary
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData()

Hides javafx.scene.control.SkinBase.getClassCssMetaData.

Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

Returns:List<CssMetaData<? extends Styleable, ?>>

the CssMetaData associated with this class, which may include the CssMetaData of its superclasses

getConverterback to summary
protected StringConverter<Color> getConverter()

Implements abstract javafx.scene.control.skin.ComboBoxPopupControl.getConverter.

Doc from javafx.scene.control.skin.ComboBoxPopupControl.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.

Annotations
@Override
getCssMetaDataback to summary
public List<CssMetaData<? extends Styleable, ?>> getCssMetaData()

Overrides javafx.scene.control.SkinBase.getCssMetaData.

Doc from javafx.scene.control.SkinBase.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

Annotations
@Override
getDisplayNodeback to summary
public Node getDisplayNode()

Implements abstract javafx.scene.control.skin.ComboBoxBaseSkin.getDisplayNode.

Doc from javafx.scene.control.skin.ComboBoxBaseSkin.getDisplayNode.

This method should return a Node that will be positioned within the ComboBox 'button' area.

Annotations
@Override
getEditorback to summary
protected TextField getEditor()

Implements abstract javafx.scene.control.skin.ComboBoxPopupControl.getEditor.

ColorPicker does not use a main text field, so this method has been overridden to return null.

Annotations
@Override
getPopupContentback to summary
protected Node getPopupContent()

Implements abstract javafx.scene.control.skin.ComboBoxPopupControl.getPopupContent.

Doc from javafx.scene.control.skin.ComboBoxPopupControl.getPopupContent.

This method should return the Node that will be displayed when the user clicks on the ComboBox 'button' area.

Annotations
@Override
imageUrlPropertyback to summary
private final StringProperty imageUrlProperty()
layoutChildrenback to summary
protected void layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.skin.ComboBoxBaseSkin.layoutChildren.

Doc from javafx.scene.control.skin.ComboBoxBaseSkin.layoutChildren.

Called during the layout pass of the scenegraph.

Annotations
@Override
showback to summary
public void show()

Overrides javafx.scene.control.skin.ComboBoxPopupControl.show.

Doc from javafx.scene.control.skin.ComboBoxPopupControl.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.

Annotations
@Override
tooltipStringback to summary
pack-priv static String tooltipString(Color c)
updateColorback to summary
private void updateColor()
updateComboBoxModeback to summary
private void updateComboBoxMode()
javafx.scene.control.skin back to summary

private Class ColorPickerSkin.PickerColorBox

extends StackPane
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected void
layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginrequestLayoutsetAlignmentsetAlignmentsetMargin

Constructor Detail

PickerColorBoxback to summary
private PickerColorBox()

Method Detail

layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
javafx.scene.control.skin back to summary

private Class ColorPickerSkin.StyleableProperties

extends Object
Class Inheritance
  • java.lang.Object
  • javafx.scene.control.skin.ColorPickerSkin.StyleableProperties

Field Summary

Modifier and TypeField and Description
private static final CssMetaData<ColorPicker, Boolean>
private static final CssMetaData<ColorPicker, Number>
private static final CssMetaData<ColorPicker, Number>
private static final CssMetaData<ColorPicker, Number>
private static final CssMetaData<ColorPicker, Number>
private static final CssMetaData<ColorPicker, String>
private static final List<CssMetaData<? extends Styleable, ?>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COLOR_LABEL_VISIBLEback to summary
private static final CssMetaData<ColorPicker, Boolean> COLOR_LABEL_VISIBLE
COLOR_RECT_HEIGHTback to summary
private static final CssMetaData<ColorPicker, Number> COLOR_RECT_HEIGHT
COLOR_RECT_WIDTHback to summary
private static final CssMetaData<ColorPicker, Number> COLOR_RECT_WIDTH
COLOR_RECT_Xback to summary
private static final CssMetaData<ColorPicker, Number> COLOR_RECT_X
COLOR_RECT_Yback to summary
private static final CssMetaData<ColorPicker, Number> COLOR_RECT_Y
GRAPHICback to summary
private static final CssMetaData<ColorPicker, String> GRAPHIC
STYLEABLESback to summary
private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES

Constructor Detail

StyleablePropertiesback to summary
private StyleableProperties()