JHotDraw 7.4.1

org.jhotdraw.color
Class DefaultHarmonicColorModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.jhotdraw.color.DefaultHarmonicColorModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.ListModel, HarmonicColorModel

public class DefaultHarmonicColorModel
extends javax.swing.AbstractListModel
implements HarmonicColorModel

DefaultHarmonicColorModel.

Author:
Werner Randelshofer  @version $Id: DefaultHarmonicColorModel.java 527 2009-06-07 14:28:19Z rawcoder $
See Also:
Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport propertySupport
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Fields inherited from interface org.jhotdraw.color.HarmonicColorModel
COLOR_SYSTEM_PROPERTY
 
Constructor Summary
DefaultHarmonicColorModel()
           
 
Method Summary
 boolean add(CompositeColor c)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void addRule(HarmonicRule newValue)
           
 void applyRules()
           
 DefaultHarmonicColorModel clone()
           
 int componentToRGB(float h, float s, float b)
           
protected  void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
           
protected  void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
           
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 CompositeColor get(int index)
           
 int getBase()
           
 ColorSystem getColorSystem()
           
 java.lang.Object getElementAt(int index)
           
 int getSize()
           
 boolean isAdjusting()
           
 void removeAllRules()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 float[] RGBtoComponent(int rgb, float[] hsb)
           
 void set(int index, CompositeColor newValue)
           
 void setBase(int newValue)
           
 void setColorSystem(ColorSystem newValue)
           
 void setSize(int newValue)
           
 int size()
           
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
 

Field Detail

propertySupport

protected java.beans.PropertyChangeSupport propertySupport
Constructor Detail

DefaultHarmonicColorModel

public DefaultHarmonicColorModel()
Method Detail

setSize

public void setSize(int newValue)
Specified by:
setSize in interface HarmonicColorModel

size

public int size()
Specified by:
size in interface HarmonicColorModel

isAdjusting

public boolean isAdjusting()
Specified by:
isAdjusting in interface HarmonicColorModel

set

public void set(int index,
                CompositeColor newValue)
Specified by:
set in interface HarmonicColorModel

applyRules

public void applyRules()
Specified by:
applyRules in interface HarmonicColorModel

get

public CompositeColor get(int index)
Specified by:
get in interface HarmonicColorModel

add

public boolean add(CompositeColor c)
Specified by:
add in interface HarmonicColorModel

setBase

public void setBase(int newValue)
Specified by:
setBase in interface HarmonicColorModel

getBase

public int getBase()
Specified by:
getBase in interface HarmonicColorModel

RGBtoComponent

public float[] RGBtoComponent(int rgb,
                              float[] hsb)
Specified by:
RGBtoComponent in interface HarmonicColorModel

componentToRGB

public int componentToRGB(float h,
                          float s,
                          float b)
Specified by:
componentToRGB in interface HarmonicColorModel

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Specified by:
getElementAt in interface javax.swing.ListModel

getColorSystem

public ColorSystem getColorSystem()
Specified by:
getColorSystem in interface HarmonicColorModel

addRule

public void addRule(HarmonicRule newValue)
Specified by:
addRule in interface HarmonicColorModel

removeAllRules

public void removeAllRules()
Specified by:
removeAllRules in interface HarmonicColorModel

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface HarmonicColorModel

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface HarmonicColorModel

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  boolean oldValue,
                                  boolean newValue)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  int oldValue,
                                  int newValue)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)

clone

public DefaultHarmonicColorModel clone()
Overrides:
clone in class java.lang.Object

setColorSystem

public void setColorSystem(ColorSystem newValue)
Specified by:
setColorSystem in interface HarmonicColorModel

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.