Overview  Package   Class  Tree  Index 

be.lassi.context
Class ColorSelection

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by be.lassi.context.ColorSelection
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, java.io.Serializable

public class ColorSelection
extends com.jgoodies.binding.beans.Model

Represents the most recent color selection made by the user or the system. The color specification is maintained using both HSB (hue, saturation, brightness) and RGB (red, green, blue) values in parallel. The HSB values are primary stored, while the RGB values are always derived from this.

See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTY_BLUE
           
static java.lang.String PROPERTY_BRIGHTNESS
           
static java.lang.String PROPERTY_COLOR
           
static java.lang.String PROPERTY_GREEN
           
static java.lang.String PROPERTY_HUE
           
static java.lang.String PROPERTY_RED
           
static java.lang.String PROPERTY_SATURATION
           
 
Constructor Summary
ColorSelection()
           
 
Method Summary
 int getBlue()
           
 float getBrightness()
           
 java.awt.Color getColor()
           
 int getGreen()
           
 Hsb getHSB()
           
 float getHue()
           
 int getRed()
           
 float getSaturation()
           
 void setBlue(int value)
           
 void setBrightness(float value)
           
 void setColor(java.awt.Color color)
          Sets the selected color.
 void setGreen(int value)
           
 void setHSB(float h, float s, float b)
          Sets the selected color using hue, saturation and brightness values.
 void setHue(float value)
           
 void setRed(int value)
           
 void setRGB(int r, int g, int b)
          Sets the selected color using red, green and blue values.
 void setSaturation(float value)
           
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_BLUE

public static final java.lang.String PROPERTY_BLUE
See Also:
Constant Field Values

PROPERTY_BRIGHTNESS

public static final java.lang.String PROPERTY_BRIGHTNESS
See Also:
Constant Field Values

PROPERTY_COLOR

public static final java.lang.String PROPERTY_COLOR
See Also:
Constant Field Values

PROPERTY_GREEN

public static final java.lang.String PROPERTY_GREEN
See Also:
Constant Field Values

PROPERTY_HUE

public static final java.lang.String PROPERTY_HUE
See Also:
Constant Field Values

PROPERTY_RED

public static final java.lang.String PROPERTY_RED
See Also:
Constant Field Values

PROPERTY_SATURATION

public static final java.lang.String PROPERTY_SATURATION
See Also:
Constant Field Values
Constructor Detail

ColorSelection

public ColorSelection()
Method Detail

getBlue

public int getBlue()

getBrightness

public float getBrightness()

getColor

public java.awt.Color getColor()

getGreen

public int getGreen()

getHSB

public Hsb getHSB()

getHue

public float getHue()

getRed

public int getRed()

getSaturation

public float getSaturation()

setBlue

public void setBlue(int value)

setBrightness

public void setBrightness(float value)

setColor

public void setColor(java.awt.Color color)
Sets the selected color.

Parameters:
color - the selected color

setGreen

public void setGreen(int value)

setHSB

public void setHSB(float h,
                   float s,
                   float b)
Sets the selected color using hue, saturation and brightness values.

Parameters:
h - the hue value of the selected color
s - the saturation value of the selected color
b - the brightness value of the selected color

setHue

public void setHue(float value)

setRed

public void setRed(int value)

setRGB

public void setRGB(int r,
                   int g,
                   int b)
Sets the selected color using red, green and blue values.

Parameters:
r - the red value of the selected color
g - the green value of the selected color
b - the blue value of the selected color

setSaturation

public void setSaturation(float value)

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2