org.ascape.util.vis
Class ImageFeatureConcrete

java.lang.Object
  extended by org.ascape.util.vis.ImageFeatureConcrete
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HasName, ImageFeature
Direct Known Subclasses:
ImageFeatureFixed

public abstract class ImageFeatureConcrete
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable, ImageFeature

A Image feature returns a image based on the state of an object of known type provided to it. This class provides a concrete version of image feature for convenience in implementing subclasses. Used to provide an appropriate image for some feature or aspect of an object.

Since:
1.2.5
Version:
1.2.5
Author:
Miles Parker
See Also:
Serialized Form

Constructor Summary
ImageFeatureConcrete()
          Constructs a concrete instantiation of a image feature.
ImageFeatureConcrete(java.lang.String name)
          Constructs a concrete instantiation of a image feature with the supplied name.
 
Method Summary
static java.awt.Image createImage(java.lang.String string)
          Utility method to return an image resource as specified according to the rules of Class.getResource.
abstract  java.awt.Image getImage(java.lang.Object object)
          Returns a image for the object as defined in implementions of this class.
 java.lang.String getName()
          Returns a name for the object as defined by set name.
 void setName(java.lang.String name)
          Sets the name of this feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFeatureConcrete

public ImageFeatureConcrete()
Constructs a concrete instantiation of a image feature.


ImageFeatureConcrete

public ImageFeatureConcrete(java.lang.String name)
Constructs a concrete instantiation of a image feature with the supplied name.

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

getName

public java.lang.String getName()
Returns a name for the object as defined by set name.

Specified by:
getName in interface HasName

setName

public final void setName(java.lang.String name)
Sets the name of this feature.

Parameters:
name - a user relevant name for this feature

getImage

public abstract java.awt.Image getImage(java.lang.Object object)
Returns a image for the object as defined in implementions of this class.

Specified by:
getImage in interface ImageFeature
Parameters:
object - the object to get a image from.

createImage

public static java.awt.Image createImage(java.lang.String string)
Utility method to return an image resource as specified according to the rules of Class.getResource.

Parameters:
string - the resource reference of the image to load


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