de.grogra.math
Class RGBColor

java.lang.Object
  extended by javax.vecmath.Tuple3f
      extended by javax.vecmath.Color3f
          extended by de.grogra.math.RGBColor
All Implemented Interfaces:
Icon, IconSource, ChannelMap, ColorMap, Manageable, Shareable, java.io.Serializable, java.lang.Cloneable

public class RGBColor
extends Color3f
implements ColorMap, IconSource, Icon, Manageable, Shareable

See Also:
Serialized Form

Field Summary
static ManageableType $TYPE
           
static RGBColor BLACK
          RGBColor whose color is Color.BLACK.
static RGBColor BLUE
          RGBColor whose color is Color.BLUE.
static RGBColor CYAN
          RGBColor whose color is Color.CYAN.
static RGBColor DARK_GRAY
          RGBColor whose color is Color.DARK_GRAY.
static RGBColor GRAY
          RGBColor whose color is Color.GRAY.
static RGBColor GREEN
          RGBColor whose color is Color.GREEN.
static RGBColor LIGHT_GRAY
          RGBColor whose color is Color.LIGHT_GRAY.
static RGBColor MAGENTA
          RGBColor whose color is Color.MAGENTA.
static RGBColor ORANGE
          RGBColor whose color is Color.ORANGE.
static RGBColor PINK
          RGBColor whose color is Color.PINK.
static RGBColor RED
          RGBColor whose color is Color.RED.
static RGBColor WHITE
          RGBColor whose color is Color.WHITE.
static RGBColor YELLOW
          RGBColor whose color is Color.YELLOW.
 
Fields inherited from class javax.vecmath.Tuple3f
x, y, z
 
Fields inherited from interface de.grogra.icon.Icon
DEFAULT, DISABLED
 
Constructor Summary
RGBColor()
           
RGBColor(float red, float green, float blue)
           
RGBColor(Tuple3f color)
           
 
Method Summary
 void accept(ChannelMapVisitor visitor)
           
 void addReference(SharedObjectReference ref)
           
 void appendReferencesTo(java.util.List out)
           
 java.lang.Object clone()
           
 void fieldModified(PersistenceField field, int[] indices, Transaction t)
           
 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)
           
 SharedObjectProvider getProvider()
           
 int getStamp()
          Returns a stamp for this object.
 void initProvider(SharedObjectProvider provider)
           
 boolean isMutable()
           
 boolean isPredefined()
           
 Manageable manageableReadResolve()
           
 java.lang.Object manageableWriteReplace()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y, int w, int h, int state)
           
 void prepareIcon()
           
 void removeReference(SharedObjectReference ref)
           
 
Methods inherited from class javax.vecmath.Color3f
get, set
 
Methods inherited from class javax.vecmath.Tuple3f
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, epsilonEquals, equals, equals, get, get, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, sub, sub, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

$TYPE

public static final ManageableType $TYPE

BLACK

public static final RGBColor BLACK
RGBColor whose color is Color.BLACK.


BLUE

public static final RGBColor BLUE
RGBColor whose color is Color.BLUE.


CYAN

public static final RGBColor CYAN
RGBColor whose color is Color.CYAN.


DARK_GRAY

public static final RGBColor DARK_GRAY
RGBColor whose color is Color.DARK_GRAY.


GRAY

public static final RGBColor GRAY
RGBColor whose color is Color.GRAY.


GREEN

public static final RGBColor GREEN
RGBColor whose color is Color.GREEN.


LIGHT_GRAY

public static final RGBColor LIGHT_GRAY
RGBColor whose color is Color.LIGHT_GRAY.


MAGENTA

public static final RGBColor MAGENTA
RGBColor whose color is Color.MAGENTA.


ORANGE

public static final RGBColor ORANGE
RGBColor whose color is Color.ORANGE.


PINK

public static final RGBColor PINK
RGBColor whose color is Color.PINK.


RED

public static final RGBColor RED
RGBColor whose color is Color.RED.


WHITE

public static final RGBColor WHITE
RGBColor whose color is Color.WHITE.


YELLOW

public static final RGBColor YELLOW
RGBColor whose color is Color.YELLOW.

Constructor Detail

RGBColor

public RGBColor()

RGBColor

public RGBColor(float red,
                float green,
                float blue)

RGBColor

public RGBColor(Tuple3f color)
Method Detail

accept

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

addReference

public void addReference(SharedObjectReference ref)
Specified by:
addReference in interface Shareable

appendReferencesTo

public void appendReferencesTo(java.util.List out)
Specified by:
appendReferencesTo in interface Shareable

clone

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

fieldModified

public void fieldModified(PersistenceField field,
                          int[] indices,
                          Transaction t)
Specified by:
fieldModified in interface Manageable

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

getProvider

public SharedObjectProvider getProvider()
Specified by:
getProvider in interface Shareable

getStamp

public int getStamp()
Description copied from interface: Manageable
Returns a stamp for this object. Each modification to this object increments the stamp. The initial stamp is non-negative.

Specified by:
getStamp in interface ChannelMap
Specified by:
getStamp in interface Manageable
Returns:
a stamp

initProvider

public void initProvider(SharedObjectProvider provider)
Specified by:
initProvider in interface Shareable

isMutable

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

isPredefined

public boolean isPredefined()

manageableReadResolve

public Manageable manageableReadResolve()
Specified by:
manageableReadResolve in interface Manageable

manageableWriteReplace

public java.lang.Object manageableWriteReplace()
Specified by:
manageableWriteReplace in interface Manageable

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

removeReference

public void removeReference(SharedObjectReference ref)
Specified by:
removeReference in interface Shareable