be.lassi.context
Class ColorSelection
java.lang.Object
com.jgoodies.binding.beans.Model
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
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 |
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
ColorSelection
public ColorSelection()
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 colors
- the saturation value of the selected colorb
- 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 colorg
- the green value of the selected colorb
- the blue value of the selected color
setSaturation
public void setSaturation(float value)