|
JHotDraw 7.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jhotdraw.beans.AbstractBean org.jhotdraw.color.AbstractColorSlidersModel org.jhotdraw.color.DefaultColorSliderModel
public class DefaultColorSliderModel
DefaultColorSliderModel.
Field Summary | |
---|---|
protected javax.swing.DefaultBoundedRangeModel[] |
componentModels
Components of the color model. |
protected java.util.LinkedList<javax.swing.JSlider> |
sliders
JSlider's associated to this AbstractColorSystem. |
protected ColorSystem |
system
|
Fields inherited from class org.jhotdraw.color.AbstractColorSlidersModel |
---|
listeners |
Fields inherited from class org.jhotdraw.beans.AbstractBean |
---|
propertySupport |
Constructor Summary | |
---|---|
DefaultColorSliderModel()
|
|
DefaultColorSliderModel(ColorSystem sys)
|
Method Summary | |
---|---|
protected void |
addColorSlider(javax.swing.JSlider slider)
|
void |
configureSlider(int componentIndex,
javax.swing.JSlider slider)
Configures a JSlider for this AbstractColorSystem. |
protected void |
fireColorChanged(int componentIndex)
|
javax.swing.DefaultBoundedRangeModel |
getBoundedRangeModel(int componentIndex)
Returns the bounded range model of the specified color componentIndex. |
java.awt.Color |
getColor()
Returns the color value of the model. |
ColorSystem |
getColorSystem()
Returns the ColorSystem used by this ColorSliderModel. |
int |
getComponentCount()
Returns the number of components used by this ColorSliderModel. |
float |
getComponentValue(int componentIndex)
Gets a value of an individual component. |
CompositeColor |
getCompositeColor()
Returns a CompositeColor representing the current value of the ColorSliderModel. |
int |
getInterpolatedRGB(int componentIndex,
float componentValue)
Returns an RGB value based on the value of the specified component index and value, based on the values of all other components of the model. |
int |
getSliderValue(int componentIndex)
Returns the value of the specified color componentIndex. |
protected void |
removeColorSlider(javax.swing.JSlider slider)
|
void |
setColor(java.awt.Color newValue)
Sets the color value of the model. |
void |
setColorSystem(ColorSystem newValue)
Changes the ColorSystem used by this ColorSliderModel. |
void |
setComponentValue(int componentIndex,
float newValue)
Sets a value for an individual component. |
void |
setCompositeColor(CompositeColor newValue)
Sets the composite color value of the model. |
void |
setSliderValue(int componentIndex,
int value)
Sets the value of the specified color componentIndex. |
void |
unconfigureSlider(javax.swing.JSlider slider)
Unconfigures a JSlider from this AbstractColorSystem. |
Methods inherited from class org.jhotdraw.color.AbstractColorSlidersModel |
---|
addChangeListener, fireStateChanged, removeChangeListener |
Methods inherited from class org.jhotdraw.beans.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ColorSystem system
protected java.util.LinkedList<javax.swing.JSlider> sliders
protected javax.swing.DefaultBoundedRangeModel[] componentModels
Constructor Detail |
---|
public DefaultColorSliderModel()
public DefaultColorSliderModel(ColorSystem sys)
Method Detail |
---|
public void setColorSystem(ColorSystem newValue)
ColorSliderModel
newValue
- ColorSystem.public void configureSlider(int componentIndex, javax.swing.JSlider slider)
public void unconfigureSlider(javax.swing.JSlider slider)
public javax.swing.DefaultBoundedRangeModel getBoundedRangeModel(int componentIndex)
componentIndex
- .
public int getSliderValue(int componentIndex)
public void setSliderValue(int componentIndex, int value)
protected void addColorSlider(javax.swing.JSlider slider)
protected void removeColorSlider(javax.swing.JSlider slider)
protected void fireColorChanged(int componentIndex)
public ColorSystem getColorSystem()
ColorSliderModel
public int getComponentCount()
ColorSliderModel
public CompositeColor getCompositeColor()
ColorSliderModel
public int getInterpolatedRGB(int componentIndex, float componentValue)
ColorSliderModel
public void setComponentValue(int componentIndex, float newValue)
ColorSliderModel
public float getComponentValue(int componentIndex)
ColorSliderModel
public void setCompositeColor(CompositeColor newValue)
ColorSliderModel
newValue
- .public java.awt.Color getColor()
ColorSliderModel
public void setColor(java.awt.Color newValue)
ColorSliderModel
newValue
- .
|
Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |