Package com.ribs.plus
Class RJColorPanel
- java.lang.Object
-
- com.ribs.plus.RJColorPanel
-
- Direct Known Subclasses:
AttributesPanel.RMColorPanel
public class RJColorPanel extends java.lang.ObjectThis class provides Swing UI for selecting a color.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRJColorPanel.CPModelAn interface for the object(s) that provide and receive color panel color.static classRJColorPanel.ImagePickerLabelAn inner class to act as an image color picker.
-
Constructor Summary
Constructors Constructor Description RJColorPanel()Creates a new color panel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecentColor(java.awt.Color aColor)Add to the list of Recent Colors shown on the Color Paneljava.awt.ColorgetColor()Returns the current color of the color panel.RJColorWellgetColorWell()Returns the currently selected color well.RJColorPanel.CPModelgetModel()Returns the color panel model (the object that provides color and responds to color changes).intgetSelectedPicker()Returns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static RJColorPanelgetShared()Returns the shared instance of the color panel.static java.lang.ClassgetSharedClass()Returns the class for the shared instance of color panel.RJPanelgetUI()Returns the Swing UI panel with color controls.booleanisVisible()Returns whether color panel ui window is visible.voidresetUI()Updates the Swing UI controls.voidrespondUI(java.lang.Object anObj)Responds to changes to the Swing UI controls.voidsetColor(java.awt.Color aColor)Sets the current color of the color panel.voidsetColorWell(RJColorWell aColorWell)Sets the currently selected color well.voidsetModel(java.lang.Object anObj)Sets 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(java.lang.Class aClass)Sets the class for the shared instanceof color panel.voidsetVisible(boolean aValue)Sets the color panel visible (true==onscreen, false==offscreen).
-
-
-
Method Detail
-
getShared
public static RJColorPanel getShared()
Returns the shared instance of the color panel.
-
getSharedClass
public static java.lang.Class getSharedClass()
Returns the class for the shared instance of color panel.
-
setSharedClass
public static void setSharedClass(java.lang.Class aClass)
Sets the class for the shared instanceof color panel.
-
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
public java.awt.Color getColor()
Returns the current color of the color panel.
-
setColor
public void setColor(java.awt.Color aColor)
Sets the current color of the color panel.
-
getModel
public RJColorPanel.CPModel getModel()
Returns the color panel model (the object that provides color and responds to color changes).
-
setModel
public void setModel(java.lang.Object anObj)
Sets the color panel model (the object that provides color and responds to color changes).
-
addRecentColor
public void addRecentColor(java.awt.Color aColor)
Add to the list of Recent Colors shown on the Color Panel- Parameters:
aColor- the color to be added
-
getColorWell
public RJColorWell getColorWell()
Returns the currently selected color well.
-
setColorWell
public void setColorWell(RJColorWell aColorWell)
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
public RJPanel getUI()
Returns the Swing UI panel with color controls.
-
resetUI
public void resetUI()
Updates the Swing UI controls.
-
respondUI
public void respondUI(java.lang.Object anObj)
Responds to changes to the Swing UI controls.
-
-