Package com.ribs.plus
Class RJColorPanel
java.lang.Object
com.ribs.plus.RJColorPanel
- Direct Known Subclasses:
AttributesPanel.RMColorPanel
This class provides Swing UI for selecting a color.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
An interface for the object(s) that provide and receive color panel color.static class
An inner class to act as an image color picker. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRecentColor
(Color aColor) Add to the list of Recent Colors shown on the Color PanelgetColor()
Returns the current color of the color panel.Returns the currently selected color well.getModel()
Returns the color panel model (the object that provides color and responds to color changes).int
Returns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static RJColorPanel
Returns the shared instance of the color panel.static Class
Returns the class for the shared instance of color panel.getUI()
Returns the Swing UI panel with color controls.boolean
Returns whether color panel ui window is visible.void
resetUI()
Updates the Swing UI controls.void
Responds to changes to the Swing UI controls.void
Sets the current color of the color panel.void
setColorWell
(RJColorWell aColorWell) Sets the currently selected color well.void
Sets the color panel model (the object that provides color and responds to color changes).void
setSelectedPicker
(int aPicker) Sets the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static void
setSharedClass
(Class aClass) Sets the class for the shared instanceof color panel.void
setVisible
(boolean aValue) Sets the color panel visible (true==onscreen, false==offscreen).
-
Constructor Details
-
RJColorPanel
public RJColorPanel()Creates a new color panel.
-
-
Method Details
-
isVisible
public boolean isVisible()Returns whether color panel ui window is visible. -
setVisible
public void setVisible(boolean aValue) Sets the color panel visible (true==onscreen, false==offscreen). -
getColor
Returns the current color of the color panel. -
setColor
Sets the current color of the color panel. -
getModel
Returns the color panel model (the object that provides color and responds to color changes). -
setModel
Sets the color panel model (the object that provides color and responds to color changes). -
addRecentColor
Add to the list of Recent Colors shown on the Color Panel- Parameters:
aColor
- the color to be added
-
getColorWell
Returns the currently selected color well. -
setColorWell
Sets the currently selected color well. -
getSelectedPicker
public int getSelectedPicker()Returns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker). -
setSelectedPicker
public void setSelectedPicker(int aPicker) Sets the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker). -
getUI
Returns the Swing UI panel with color controls. -
resetUI
public void resetUI()Updates the Swing UI controls. -
respondUI
Responds to changes to the Swing UI controls.