edu.kzoo.grid.display
Class DefaultDisplayFactory

java.lang.Object
  |
  +--edu.kzoo.grid.display.DefaultDisplayFactory

public class DefaultDisplayFactory
extends java.lang.Object

Grid Display Package:
The DefaultDisplayFactory class contains methods that provide a suitable default display for a given class.

Version:
Mar 10, 2005
Author:
Alyce Brady

Constructor Summary
DefaultDisplayFactory()
           
 
Method Summary
static void addDirectory(java.lang.String directory)
          Adds the specified directory to the list of directories in which to look for image files.
static void addSuffix(java.lang.String suffix)
          Adds the specified suffix to the list of image suffixes to look for.
static GridObjectDisplay getDefaultDisplay()
          Returns a DefaultDisplay object.
static GridObjectDisplay getDefaultDisplay(java.lang.Class cls)
          Returns a default display specific to the given class if there is one.
static GridObjectDisplay getDefaultDisplay(java.lang.String className)
          Returns a default display specific to the given class if there is one.
protected static GridObjectDisplay getDisplayClass(java.lang.String fullClassName, java.lang.String fullDispClassName)
          Instantiates a display class named fullDisplayClassName, if such a class exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDisplayFactory

public DefaultDisplayFactory()
Method Detail

addDirectory

public static void addDirectory(java.lang.String directory)
Adds the specified directory to the list of directories in which to look for image files.

Parameters:
directory - name of directory in which to look for image files, including separator that precedes a filename (e.g., directory + imagefile should be a valid name for a file in the specified directory)

addSuffix

public static void addSuffix(java.lang.String suffix)
Adds the specified suffix to the list of image suffixes to look for.

Parameters:
suffix - image suffix (e.g., "tiff")

getDefaultDisplay

public static GridObjectDisplay getDefaultDisplay()
Returns a DefaultDisplay object.


getDefaultDisplay

public static GridObjectDisplay getDefaultDisplay(java.lang.Class cls)
Returns a default display specific to the given class if there is one. In the following detailed description of which display object is returned, assume that ClassName is the base class name passed in as a parameter and package is the name of the package in which that class resides. The returned display is:

getDefaultDisplay

public static GridObjectDisplay getDefaultDisplay(java.lang.String className)
Returns a default display specific to the given class if there is one. In the following detailed description of which display object is returned, assume that ClassName is the base class name passed in as a parameter and package is the name of the package in which that class resides. The returned display is:

getDisplayClass

protected static GridObjectDisplay getDisplayClass(java.lang.String fullClassName,
                                                   java.lang.String fullDispClassName)
                                            throws java.lang.ClassNotFoundException,
                                                   java.lang.IllegalAccessException,
                                                   java.lang.InstantiationException
Instantiates a display class named fullDisplayClassName, if such a class exists.

Parameters:
fullClassName - the name of the class being displayed
fullDispClassName - the name of the display class to create
Returns:
an object of the specified display class
Throws:
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException