edu.iastate.metnet.birdseyeview.pathwayview
Class Compartment

java.lang.Object
  extended by edu.iastate.metnet.birdseyeview.pathwayview.Compartment

public class Compartment
extends java.lang.Object

The Compartment Class encapsulates the functionality of one cellular compartment component in the pathway view. It holds a panel that displays the compartment's color.

Author:
Matt Studham Created March 28, 2006

Constructor Summary
Compartment(java.awt.Color c, java.lang.String n)
          Constructor.
 
Method Summary
 java.awt.Component getComponent()
          This method causes the genes to be packaged and displayed, and then returns the finished image panel.
static java.lang.String getName()
          This method returns the name of the compartment.
static void main(java.lang.String[] args)
          This method tests the Compartment class.
 void setPanel(java.awt.Rectangle r)
          This method sets the dimensions of the panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Compartment

public Compartment(java.awt.Color c,
                   java.lang.String n)
Constructor.

Parameters:
c - Color of this compartment
n - Name of this compartment
Method Detail

getComponent

public java.awt.Component getComponent()
This method causes the genes to be packaged and displayed, and then returns the finished image panel.

Returns:
Component

getName

public static java.lang.String getName()
This method returns the name of the compartment.

Returns:
String

setPanel

public void setPanel(java.awt.Rectangle r)
This method sets the dimensions of the panel.

Parameters:
r - Rectangle defining size and location of the panel

main

public static void main(java.lang.String[] args)
This method tests the Compartment class.

Parameters:
args -