Class ColorState

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    SimpleBoundColorAdapter.ColorState

    public class ColorState
    extends java.lang.Object
    implements java.io.Serializable
    This class represents a color state, one color, possibly with an alternate (blink) color and a blink rate
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorState()  
      ColorState​(ColorState clone)  
      ColorState​(java.awt.Color mainColor)  
      ColorState​(java.awt.Color mainColor, java.awt.Color blinkColor, boolean blink, int blinkTime)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.awt.Color getBlinkColor()
      Returns the color to be used as the blink color.
      int getBlinkRate()
      Returns the blink rate for this state, if it is a blinkning state.
      java.awt.Color getMainColor()
      Returns the main color (i.e.
      int hashCode()  
      boolean isBlink()
      Returns true if this color state is a blinkning state.
      void setBlink​(boolean b)  
      void setBlinkColor​(java.awt.Color color)  
      void setBlinkRate​(int i)  
      void setMainColor​(java.awt.Color color)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ColorState

        public ColorState()
      • ColorState

        public ColorState​(java.awt.Color mainColor)
      • ColorState

        public ColorState​(java.awt.Color mainColor,
                          java.awt.Color blinkColor,
                          boolean blink,
                          int blinkTime)
      • ColorState

        public ColorState​(ColorState clone)
    • Method Detail

      • isBlink

        public boolean isBlink()
        Returns true if this color state is a blinkning state.
      • getBlinkColor

        public java.awt.Color getBlinkColor()
        Returns the color to be used as the blink color.
      • getBlinkRate

        public int getBlinkRate()
        Returns the blink rate for this state, if it is a blinkning state.
      • getMainColor

        public java.awt.Color getMainColor()
        Returns the main color (i.e. NOT the blink color) for this color state. This is the color to use for non-blinking states too.
      • setBlink

        public void setBlink​(boolean b)
      • setBlinkColor

        public void setBlinkColor​(java.awt.Color color)
      • setBlinkRate

        public void setBlinkRate​(int i)
      • setMainColor

        public void setMainColor​(java.awt.Color color)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object