toxi.color
Class CMYKAccessor

java.lang.Object
  extended by toxi.color.AccessCriteria
      extended by toxi.color.CMYKAccessor
All Implemented Interfaces:
java.util.Comparator<ReadonlyTColor>

public class CMYKAccessor
extends AccessCriteria

Compares 2 colors by one of their CMYK component values.


Field Summary
 
Fields inherited from class toxi.color.AccessCriteria
ALPHA, BLACK, BLUE, BRIGHTNESS, CYAN, GREEN, HUE, LUMINANCE, MAGENTA, RED, SATURATION, YELLOW
 
Constructor Summary
CMYKAccessor(int comp)
           
 
Method Summary
 int compare(ReadonlyTColor a, ReadonlyTColor b)
           
 float getComponentValueFor(ReadonlyTColor col)
           
 void setComponentValueFor(TColor col, float val)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

CMYKAccessor

public CMYKAccessor(int comp)
Method Detail

compare

public int compare(ReadonlyTColor a,
                   ReadonlyTColor b)

getComponentValueFor

public float getComponentValueFor(ReadonlyTColor col)
Specified by:
getComponentValueFor in class AccessCriteria

setComponentValueFor

public void setComponentValueFor(TColor col,
                                 float val)
Specified by:
setComponentValueFor in class AccessCriteria