de.grogra.imp3d.shading
Class ChannelSPD

java.lang.Object
  extended by de.grogra.persistence.ShareableBase
      extended by de.grogra.imp3d.shading.ChannelSPD
All Implemented Interfaces:
Icon, IconSource, ChannelMap, ColorMap, Manageable, Shareable, RenderedIcon

public class ChannelSPD
extends ShareableBase
implements ColorMap, IconSource, Icon, RenderedIcon


Nested Class Summary
static class ChannelSPD.Type
           
 
Field Summary
static ChannelSPD.Type $TYPE
           
static SCOType.Field spectraldistribution$FIELD
           
 
Fields inherited from interface de.grogra.icon.Icon
DEFAULT, DISABLED
 
Constructor Summary
ChannelSPD()
          Constructor, creates a spectral channel
ChannelSPD(SpectralCurve curve)
          Constructor, creates a spectral channel with specified spectral curve
 
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 getSizeRatio()
           
 SPD getSpectraldistribution()
           
 boolean isMutable()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y, int w, int h, int state)
           
 void prepareIcon()
           
 int renderImage(JobManager jm, java.awt.image.BufferedImage img, int y)
           
 void setSpectraldistribution(SPD spd)
          Set spectral curve
 void setSpectraldistribution(SpectralCurve curve)
          Set spectral curve
 
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
 
Methods inherited from interface de.grogra.pf.ui.RenderedIcon
getStamp
 

Field Detail

$TYPE

public static final ChannelSPD.Type $TYPE

spectraldistribution$FIELD

public static final SCOType.Field spectraldistribution$FIELD
Constructor Detail

ChannelSPD

public ChannelSPD()
Constructor, creates a spectral channel


ChannelSPD

public ChannelSPD(SpectralCurve curve)
Constructor, creates a spectral channel with specified spectral curve

Parameters:
curve - spectral curve
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

getSizeRatio

public float getSizeRatio()
Specified by:
getSizeRatio in interface RenderedIcon

getSpectraldistribution

public SPD getSpectraldistribution()

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

renderImage

public int renderImage(JobManager jm,
                       java.awt.image.BufferedImage img,
                       int y)
Specified by:
renderImage in interface RenderedIcon

setSpectraldistribution

public void setSpectraldistribution(SPD spd)
Set spectral curve

Parameters:
spd - spectral curve

setSpectraldistribution

public void setSpectraldistribution(SpectralCurve curve)
Set spectral curve

Parameters:
curve - spectral curve