org.jhotdraw.color
Class CompositeColor

java.lang.Object
  extended by org.jhotdraw.color.CompositeColor
All Implemented Interfaces:
java.lang.Cloneable

public class CompositeColor
extends java.lang.Object
implements java.lang.Cloneable

CompositeColor represents an immutable value of a color system.

Author:
Werner Randelshofer  @version $Id: CompositeColor.java 527 2009-06-07 14:28:19Z rawcoder $

Field Summary
private  java.awt.Color color
           
private  float[] components
           
private  ColorSystem system
           
 
Constructor Summary
CompositeColor(ColorSystem system, java.awt.Color color)
           
CompositeColor(ColorSystem system, float... components)
           
 
Method Summary
 CompositeColor clone()
           
 java.awt.Color getColor()
           
 float getComponent(int i)
           
 float[] getComponents()
           
 float[] getComponents(float[] reuse)
           
 ColorSystem getSystem()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

system

private ColorSystem system

components

private float[] components

color

private java.awt.Color color
Constructor Detail

CompositeColor

public CompositeColor(ColorSystem system,
                      float... components)

CompositeColor

public CompositeColor(ColorSystem system,
                      java.awt.Color color)
Method Detail

getComponents

public float[] getComponents()

getComponent

public float getComponent(int i)

getComponents

public float[] getComponents(float[] reuse)

getColor

public java.awt.Color getColor()

getSystem

public ColorSystem getSystem()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

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