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 interfaceAn interface for the object(s) that provide and receive color panel color.static classAn inner class to act as an image color picker. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecentColor(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).intReturns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static RJColorPanelReturns the shared instance of the color panel.static ClassReturns the class for the shared instance of color panel.getUI()Returns the Swing UI panel with color controls.booleanReturns whether color panel ui window is visible.voidresetUI()Updates the Swing UI controls.voidResponds to changes to the Swing UI controls.voidSets the current color of the color panel.voidsetColorWell(RJColorWell aColorWell) Sets the currently selected color well.voidSets the color panel model (the object that provides color and responds to color changes).voidsetSelectedPicker(int aPicker) Sets the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static voidsetSharedClass(Class aClass) Sets the class for the shared instanceof color panel.voidsetVisible(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.