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

pack-priv Class ColorPalette

extends Region
Class Inheritance
Imports
com.sun.javafx.scene.NodeHelper, .ParentHelper, com.sun.javafx.scene.control.CustomColorDialog, com.sun.javafx.scene.control.skin.Utils, com.sun.javafx.scene.traversal.Algorithm, .Direction, .ParentTraversalEngine, .TraversalContext, javafx.collections.FXCollections, .ListChangeListener, .ObservableList, javafx.event.ActionEvent, .Event, .EventHandler, javafx.geometry.Bounds, .NodeOrientation, .Pos, .Side, javafx.scene.Node, javafx.scene.control.ColorPicker, .ContextMenu, .Hyperlink, .Label, .MenuItem, .PopupControl, .Separator, .Tooltip, javafx.scene.input.KeyCode, .KeyEvent, .MouseButton, .MouseEvent, javafx.scene.layout.GridPane, .Region, .StackPane, .VBox, javafx.scene.paint.Color, javafx.scene.shape.Rectangle, .StrokeType, java.util.List

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private ColorPicker
pack-priv ColorPalette.ColorPickerGrid
private ContextMenu
pack-priv CustomColorDialog
private final GridPane
private final Label
private int
pack-priv final Hyperlink
private int
private int
private boolean
private ColorPalette.ColorSquare
private final ColorPalette.ColorSquare
private Color
private static final int
private static final int
private static final int
private PopupControl
private static double[]
private final Separator
private static final int
private final GridPane
Inherited from javafx.scene.layout.Region:
USE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
public
ColorPalette(final ColorPicker colorPicker)

Method Summary

Modifier and TypeMethod and Description
private void
private void
private ColorPalette.ColorSquare
findColorSquare(GridPane colorGrid, Color color)

public ColorPalette.ColorPickerGrid
private void
public boolean
private void
private void
public void
public void
Inherited from javafx.scene.layout.Region:
backgroundPropertyborderPropertycacheShapePropertycenterShapePropertycomputeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetBackgroundgetBordergetClassCssMetaDatagetCssMetaDatagetHeightgetInsetsgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetOpaqueInsetsgetPaddinggetPrefHeightgetPrefWidthgetShapegetUserAgentStylesheetgetWidthheightPropertyinsetsPropertyisCacheShapeisCenterShapeisResizableisScaleShapeisSnapToPixellayoutInArealayoutInArealayoutInArealayoutInAreamaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyopaqueInsetsPropertypaddingPropertypositionInAreapositionInAreaprefHeightprefHeightPropertyprefWidthprefWidthPropertyresizescaleShapePropertysetBackgroundsetBordersetCacheShapesetCenterShapesetHeightsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetOpaqueInsetssetPaddingsetPrefHeightsetPrefSizesetPrefWidthsetScaleShapesetShapesetSnapToPixelsetWidthshapePropertysnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYsnapToPixelPropertywidthProperty

Field Detail

colorPickerback to summary
private ColorPicker colorPicker
colorPickerGridback to summary
pack-priv ColorPalette.ColorPickerGrid colorPickerGrid
contextMenuback to summary
private ContextMenu contextMenu
customColorDialogback to summary
pack-priv CustomColorDialog customColorDialog
customColorGridback to summary
private final GridPane customColorGrid
customColorLabelback to summary
private final Label customColorLabel
customColorLastRowLengthback to summary
private int customColorLastRowLength
customColorNumberback to summary
private int customColorNumber
customColorRowsback to summary
private int customColorRows
dragDetectedback to summary
private boolean dragDetected
focusedSquareback to summary
private ColorPalette.ColorSquare focusedSquare
hoverSquareback to summary
private final ColorPalette.ColorSquare hoverSquare
mouseDragColorback to summary
private Color mouseDragColor
NUM_OF_COLORSback to summary
private static final int NUM_OF_COLORS
NUM_OF_COLUMNSback to summary
private static final int NUM_OF_COLUMNS
NUM_OF_ROWSback to summary
private static final int NUM_OF_ROWS
popupControlback to summary
private PopupControl popupControl
RAW_VALUESback to summary
private static double[] RAW_VALUES
separatorback to summary
private final Separator separator
SQUARE_SIZEback to summary
private static final int SQUARE_SIZE
standardColorGridback to summary
private final GridPane standardColorGrid

Constructor Detail

ColorPaletteback to summary
public ColorPalette(final ColorPicker colorPicker)

Method Detail

buildCustomColorsback to summary
private void buildCustomColors()
buildStandardColorsback to summary
private void buildStandardColors()
findColorSquareback to summary
private ColorPalette.ColorSquare findColorSquare(GridPane colorGrid, Color color)
getColorGridback to summary
public ColorPalette.ColorPickerGrid getColorGrid()
initNavigationback to summary
private void initNavigation()
isCustomColorDialogShowingback to summary
public boolean isCustomColorDialogShowing()
processSelectKeyback to summary
private void processSelectKey(KeyEvent ke)
setFocusedSquareback to summary
private void setFocusedSquare(ColorPalette.ColorSquare square)
setPopupControlback to summary
public void setPopupControl(PopupControl pc)
updateSelectionback to summary
public void updateSelection(Color color)
javafx.scene.control.skin back to summary

pack-priv Class ColorPalette.ColorPickerGrid

extends GridPane
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final List<ColorPalette.ColorSquare>
Inherited from javafx.scene.layout.GridPane:
REMAINING

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected double
computePrefHeight(double
the width that should be used if preferred height depends on it
width
)

Overrides javafx.scene.layout.GridPane.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.

protected double
computePrefWidth(double
the height that should be used if preferred width depends on it
height
)

Overrides javafx.scene.layout.GridPane.computePrefWidth.

Computes the preferred width of this region for the given height.

public List<ColorPalette.ColorSquare>
Inherited from javafx.scene.layout.GridPane:
addaddaddColumnaddRowalignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthgetAlignmentgetCellBoundsgetClassCssMetaDatagetColumnConstraintsgetColumnCountgetColumnIndexgetColumnSpangetContentBiasgetCssMetaDatagetHalignmentgetHgapgetHgrowgetMargingetRowConstraintsgetRowCountgetRowIndexgetRowSpangetValignmentgetVgapgetVgrowgridLinesVisiblePropertyhgapPropertyisFillHeightisFillWidthisGridLinesVisiblelayoutChildrenrequestLayoutsetAlignmentsetColumnIndexsetColumnSpansetConstraintssetConstraintssetConstraintssetConstraintssetConstraintssetFillHeightsetFillWidthsetGridLinesVisiblesetHalignmentsetHgapsetHgrowsetMarginsetRowIndexsetRowSpansetValignmentsetVgapsetVgrowtoStringvgapProperty

Field Detail

squaresback to summary
private final List<ColorPalette.ColorSquare> squares

Constructor Detail

ColorPickerGridback to summary
public ColorPickerGrid()

Method Detail

computePrefHeightback to summary
protected double computePrefHeight(double width)

Overrides javafx.scene.layout.GridPane.computePrefHeight.

Doc from javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Parameters
width:double

Doc from javafx.scene.Parent.computePrefHeight.

the width that should be used if preferred height depends on it

Returns:double

the computed preferred height for this region

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height)

Overrides javafx.scene.layout.GridPane.computePrefWidth.

Doc from javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.

Parameters
height:double

Doc from javafx.scene.Parent.computePrefWidth.

the height that should be used if preferred width depends on it

Returns:double

the computed preferred width for this region

Annotations
@Override
getSquaresback to summary
public List<ColorPalette.ColorSquare> getSquares()
javafx.scene.control.skin back to summary

pack-priv Class ColorPalette.ColorSquare

extends StackPane
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv ColorPalette.ColorType
pack-priv int
pack-priv boolean
pack-priv Rectangle

Constructor Summary

AccessConstructor and Description
public
public
ColorSquare(Color color, int index)

public
ColorSquare(Color color, int index, ColorPalette.ColorType type)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginlayoutChildrenrequestLayoutsetAlignmentsetAlignmentsetMargin

Field Detail

colorTypeback to summary
pack-priv ColorPalette.ColorType colorType
indexback to summary
pack-priv int index
isEmptyback to summary
pack-priv boolean isEmpty
rectangleback to summary
pack-priv Rectangle rectangle

Constructor Detail

ColorSquareback to summary
public ColorSquare()
ColorSquareback to summary
public ColorSquare(Color color, int index)
ColorSquareback to summary
public ColorSquare(Color color, int index, ColorPalette.ColorType type)

Method Detail

selectColorback to summary
public void selectColor(KeyEvent event)
javafx.scene.control.skin back to summary

pack-priv final Enum ColorPalette.ColorType

extends Enum<ColorPalette.ColorType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ColorPalette.ColorType
public static final ColorPalette.ColorType
public static final ColorPalette.ColorType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ColorPalette.ColorType
public static ColorPalette.ColorType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CUSTOMback to summary
public static final ColorPalette.ColorType CUSTOM
NORMALback to summary
public static final ColorPalette.ColorType NORMAL
STANDARDback to summary
public static final ColorPalette.ColorType STANDARD

Constructor Detail

ColorTypeback to summary
private ColorType()

Method Detail

valueOfback to summary
public static ColorPalette.ColorType valueOf(String name)
valuesback to summary
public static ColorPalette.ColorType[] values()