Ribs API

com.ribs.plus
Class RJColorPanel

java.lang.Object
  extended bycom.ribs.plus.RJColorPanel

public class RJColorPanel
extends java.lang.Object

This class provides Swing GUI for selecting a color.


Nested Class Summary
static class RJColorPanel.ImagePickerLabel
          An inner class to act as an image color picker.
 
Constructor Summary
RJColorPanel()
          Creates a new color panel.
 
Method Summary
 void addRecentColor(java.awt.Color aColor)
          Add to the list of Recent Colors shown on the Color Panel
 java.awt.Color getColor()
          Returns the current color of the color panel.
 RJColorWell getColorWell()
          Returns the currently selected color well.
 int getSelectedPicker()
          Returns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).
static RJColorPanel getShared()
          Returns the shared instance of the color panel.
static java.lang.Class getSharedClass()
          Returns the class for the shared instance of color panel.
 RJPanel getUI()
          Returns the Swing UI panel with color controls.
 void resetUI()
          Updates the Swing GUI controls.
 void respondUI(java.lang.Object anObj)
          Responds to changes to the Swing GUI controls.
 void setColor(java.awt.Color aColor)
          Sets the current color of the color panel.
 void setColorWell(RJColorWell aColorWell)
          Sets the currently selected color well.
 void setSelectedPicker(int aPicker)
          Sets the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).
static void setSharedClass(java.lang.Class aClass)
          Sets the class for the shared instanceof color panel.
 void setVisible(boolean aValue)
          Orders the color panel onscreen (true) or offscreen (false).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RJColorPanel

public RJColorPanel()
Creates a new color panel.

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.


setVisible

public void setVisible(boolean aValue)
Orders the color panel onscreen (true) or offscreen (false).


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.


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 GUI controls.


respondUI

public void respondUI(java.lang.Object anObj)
Responds to changes to the Swing GUI controls.


Ribs API.