org.ascape.util.vis
Class ColorFeatureFixed

java.lang.Object
  extended by org.ascape.util.vis.ColorFeatureConcrete
      extended by org.ascape.util.vis.ColorFeatureFixed
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HasName, ColorFeature

public class ColorFeatureFixed
extends ColorFeatureConcrete

An interface for a class providing an color that doesn't change in relation to the supplied object. All awt colors are supplied.

Since:
1.0
Version:
1.2
Author:
Miles Parker
See Also:
Serialized Form

Field Summary
static ColorFeatureFixed black
          A color feature that always returns black.
static ColorFeatureFixed blue
          A color feature that always returns blue.
static ColorFeatureFixed cyan
          A color feature that always returns cyan.
static ColorFeatureFixed darkGray
          A color feature that always returns darkGray.
static ColorFeatureFixed gray
          A color feature that always returns gray.
static ColorFeatureFixed green
          A color feature that always returns green.
static ColorFeatureFixed lightGray
          A color feature that always returns lightGray.
static ColorFeatureFixed magenta
          A color feature that always returns magenta.
static ColorFeatureFixed orange
          A color feature that always returns orange.
static ColorFeatureFixed pink
          A color feature that always returns pink.
static ColorFeatureFixed red
          A color feature that always returns red.
static ColorFeatureFixed white
          A color feature that always returns white.
static ColorFeatureFixed yellow
          A color feature that always returns yellow.
 
Fields inherited from class org.ascape.util.vis.ColorFeatureConcrete
name
 
Constructor Summary
ColorFeatureFixed()
          Constructs a ColorFeatureFixed.
ColorFeatureFixed(java.lang.String name, java.awt.Color color)
          Constructs a ColorFeatureFixed.
 
Method Summary
 java.lang.Object clone()
          Clones this feature.
 java.awt.Color getColor(java.lang.Object object)
          Returns a color for the object as defined irrespective of object by setColor.
 void setColor(java.awt.Color color)
          Sets the color of this feature.
 
Methods inherited from class org.ascape.util.vis.ColorFeatureConcrete
getName, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

black

public static final ColorFeatureFixed black
A color feature that always returns black.


blue

public static final ColorFeatureFixed blue
A color feature that always returns blue.


cyan

public static final ColorFeatureFixed cyan
A color feature that always returns cyan.


darkGray

public static final ColorFeatureFixed darkGray
A color feature that always returns darkGray.


gray

public static final ColorFeatureFixed gray
A color feature that always returns gray.


green

public static final ColorFeatureFixed green
A color feature that always returns green.


lightGray

public static final ColorFeatureFixed lightGray
A color feature that always returns lightGray.


magenta

public static final ColorFeatureFixed magenta
A color feature that always returns magenta.


orange

public static final ColorFeatureFixed orange
A color feature that always returns orange.


pink

public static final ColorFeatureFixed pink
A color feature that always returns pink.


red

public static final ColorFeatureFixed red
A color feature that always returns red.


white

public static final ColorFeatureFixed white
A color feature that always returns white.


yellow

public static final ColorFeatureFixed yellow
A color feature that always returns yellow.

Constructor Detail

ColorFeatureFixed

public ColorFeatureFixed()
Constructs a ColorFeatureFixed.


ColorFeatureFixed

public ColorFeatureFixed(java.lang.String name,
                         java.awt.Color color)
Constructs a ColorFeatureFixed.

Parameters:
name - the color of the feature
color - the user relevant name of the feature
Method Detail

getColor

public final java.awt.Color getColor(java.lang.Object object)
Returns a color for the object as defined irrespective of object by setColor.

Specified by:
getColor in interface ColorFeature
Specified by:
getColor in class ColorFeatureConcrete
Parameters:
object - Ignored; normally, the object the object to get a color from.

setColor

public final void setColor(java.awt.Color color)
Sets the color of this feature.

Parameters:
color - the color this feature should always return

clone

public java.lang.Object clone()
Clones this feature.

Overrides:
clone in class java.lang.Object


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.