Package com.ribs.plus

Class RJColorPanel

  • Direct Known Subclasses:
    AttributesPanel.RMColorPanel

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

      Nested Classes 
      Modifier and Type Class Description
      static interface  RJColorPanel.CPModel
      An interface for the object(s) that provide and receive color panel color.
      static class  RJColorPanel.ImagePickerLabel
      An 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
      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.
      RJColorPanel.CPModel getModel()
      Returns the color panel model (the object that provides color and responds to color changes).
      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.
      boolean isVisible()
      Returns whether color panel ui window is visible.
      void resetUI()
      Updates the Swing UI controls.
      void respondUI​(java.lang.Object anObj)
      Responds to changes to the Swing UI 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 setModel​(java.lang.Object anObj)
      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​(java.lang.Class aClass)
      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 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.
      • 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.