de.grogra.math
Class Graytone

java.lang.Object
  extended by de.grogra.persistence.ShareableBase
      extended by de.grogra.math.Graytone
All Implemented Interfaces:
Icon, IconSource, ChannelMap, ColorMap, Manageable, Shareable

public final class Graytone
extends ShareableBase
implements ColorMap, IconSource, Icon


Nested Class Summary
static class Graytone.Type
           
 
Field Summary
static Graytone.Type $TYPE
           
static SCOType.Field value$FIELD
           
 
Fields inherited from interface de.grogra.icon.Icon
DEFAULT, DISABLED
 
Constructor Summary
Graytone()
           
Graytone(float value)
           
Graytone(Tuple3f color)
           
 
Method Summary
 void accept(ChannelMapVisitor visitor)
           
 int getAverageColor()
           
 float getFloatValue(ChannelData data, int channel)
           
 Icon getIcon(java.awt.Dimension size, int state)
           
 java.awt.Rectangle getIconBounds()
           
 IconSource getIconSource()
           
 java.awt.Image getImage()
           
 java.awt.Image getImage(int w, int h)
           
 java.net.URL getImageSource()
           
 ManageableType getManageableType()
           
 java.lang.Object getObjectValue(ChannelData data, int channel)
           
 java.awt.Dimension getPreferredIconSize(boolean small)
           
 float getValue()
           
 boolean isMutable()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y, int w, int h, int state)
           
 void prepareIcon()
           
 void setValue(float value)
           
 
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.math.ChannelMap
getStamp
 

Field Detail

$TYPE

public static final Graytone.Type $TYPE

value$FIELD

public static final SCOType.Field value$FIELD
Constructor Detail

Graytone

public Graytone()

Graytone

public Graytone(float value)

Graytone

public Graytone(Tuple3f color)
Method Detail

accept

public void accept(ChannelMapVisitor visitor)
Specified by:
accept in interface ChannelMap

getAverageColor

public int getAverageColor()
Specified by:
getAverageColor in interface ColorMap

getFloatValue

public float getFloatValue(ChannelData data,
                           int channel)
Specified by:
getFloatValue in interface ChannelMap

getIcon

public Icon getIcon(java.awt.Dimension size,
                    int state)
Specified by:
getIcon in interface IconSource

getIconBounds

public java.awt.Rectangle getIconBounds()
Specified by:
getIconBounds in interface Icon

getIconSource

public IconSource getIconSource()
Specified by:
getIconSource in interface Icon

getImage

public java.awt.Image getImage()
Specified by:
getImage in interface Icon

getImage

public java.awt.Image getImage(int w,
                               int h)
Specified by:
getImage in interface Icon

getImageSource

public java.net.URL getImageSource()
Specified by:
getImageSource in interface Icon

getManageableType

public ManageableType getManageableType()
Specified by:
getManageableType in interface Manageable

getObjectValue

public java.lang.Object getObjectValue(ChannelData data,
                                       int channel)
Specified by:
getObjectValue in interface ChannelMap

getPreferredIconSize

public java.awt.Dimension getPreferredIconSize(boolean small)
Specified by:
getPreferredIconSize in interface IconSource

getValue

public float getValue()

isMutable

public boolean isMutable()
Specified by:
isMutable in interface Icon

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics2D g,
                      int x,
                      int y,
                      int w,
                      int h,
                      int state)
Specified by:
paintIcon in interface Icon

prepareIcon

public void prepareIcon()
Specified by:
prepareIcon in interface Icon

setValue

public void setValue(float value)