Package com.ribs.plus

Class RJColorPanel

java.lang.Object
com.ribs.plus.RJColorPanel
Direct Known Subclasses:
AttributesPanel.RMColorPanel

public class RJColorPanel extends Object
This class provides Swing UI for selecting a color.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static 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
    Constructor
    Description
    Creates a new color panel.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add to the list of Recent Colors shown on the Color Panel
    Returns the current color of the color panel.
    Returns the currently selected color well.
    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).
    Returns the shared instance of the color panel.
    static Class
    Returns the class for the shared instance of color panel.
    Returns the Swing UI panel with color controls.
    boolean
    Returns whether color panel ui window is visible.
    void
    Updates the Swing UI controls.
    void
    Responds to changes to the Swing UI controls.
    void
    setColor(Color aColor)
    Sets the current color of the color panel.
    void
    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
    Sets the class for the shared instanceof color panel.
    void
    setVisible(boolean aValue)
    Sets the color panel visible (true==onscreen, false==offscreen).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RJColorPanel

      public RJColorPanel()
      Creates a new color panel.
  • Method Details

    • getShared

      public static RJColorPanel getShared()
      Returns the shared instance of the color panel.
    • getSharedClass

      public static Class getSharedClass()
      Returns the class for the shared instance of color panel.
    • setSharedClass

      public static void setSharedClass(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 Color getColor()
      Returns the current color of the color panel.
    • setColor

      public void setColor(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(Object anObj)
      Sets the color panel model (the object that provides color and responds to color changes).
    • addRecentColor

      public void addRecentColor(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(Object anObj)
      Responds to changes to the Swing UI controls.