edu.iastate.metnet.birdseyeview.cellview
Class CellularLocation

java.lang.Object
  extended by edu.iastate.metnet.birdseyeview.cellview.CellularLocation

public class CellularLocation
extends java.lang.Object

The CellularLocation Class holds information on a cellular location (i.e. compartment) that is pertinent for the cell view display. A singular location in the view may represent multiple locations in the database.

Author:
Matt Studham Created May 23, 2005

Constructor Summary
CellularLocation(java.util.ArrayList c, java.util.ArrayList n, java.lang.Integer pc)
          Constructor.
 
Method Summary
 void addAnotation(Annotation ann)
          add a annotation into the list
 java.util.ArrayList getCodes()
          Returns the codes.
 java.util.ArrayList getNames()
          Returns the names.
 java.awt.Point getPoint()
          This method returns the next vacant point.
 int getpointNumber()
          This method return the number of genes that the cellular location can display
 java.lang.Integer getPrimaryCode()
          This method returns the primary code for this location.
 boolean hasAnnotation(Annotation ann)
           
 boolean hasCode(java.lang.Integer c)
          This method indicates if this location is represented by the given code.
 boolean hasName(java.lang.String n)
          This method indicates if this location is represented by the given name.
 void resetPoints()
          This method resets the vacant points list to make all the points vacant.
 void setPoints(java.util.ArrayList p)
          This method sets the list of points for this location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellularLocation

public CellularLocation(java.util.ArrayList c,
                        java.util.ArrayList n,
                        java.lang.Integer pc)
Constructor. Used when there is a list of db locations for this one location.

Parameters:
c - List of Integer codes
n - List of String names
pc - Integer code
Method Detail

hasCode

public boolean hasCode(java.lang.Integer c)
This method indicates if this location is represented by the given code.

Parameters:
c - Integer code
Returns:
boolean

hasName

public boolean hasName(java.lang.String n)
This method indicates if this location is represented by the given name.

Parameters:
n - String name
Returns:
boolean

getPrimaryCode

public java.lang.Integer getPrimaryCode()
This method returns the primary code for this location.

Returns:
Integer

setPoints

public void setPoints(java.util.ArrayList p)
This method sets the list of points for this location. The vacant points list is also set to start off as a copy of the points list.

Parameters:
p - ArrayList of Point objects

resetPoints

public void resetPoints()
This method resets the vacant points list to make all the points vacant.


getPoint

public java.awt.Point getPoint()
This method returns the next vacant point. That point is removed from the vacant list. If there are no vacant points, null is returned.

Returns:
Point The next vacant point (may be null)

getpointNumber

public int getpointNumber()
This method return the number of genes that the cellular location can display

Returns:
size

getCodes

public java.util.ArrayList getCodes()
Returns the codes.

Returns:
ArrayList

getNames

public java.util.ArrayList getNames()
Returns the names.

Returns:
ArrayList

addAnotation

public void addAnotation(Annotation ann)
add a annotation into the list

Parameters:
ann -

hasAnnotation

public boolean hasAnnotation(Annotation ann)