edu.iastate.metnet.birdseyeview
Class AbstractView

java.lang.Object
  extended by edu.iastate.metnet.birdseyeview.AbstractView
Direct Known Subclasses:
CellView, GoView, PathwayView

public abstract class AbstractView
extends java.lang.Object

The AbstractView Class is a template for subclasses to implement specific Bird's Eye Views.

Author:
Matt Studham Created Jan 24, 2005

Field Summary
protected static java.lang.String algorithm
           
protected  java.util.ArrayList annotations
           
protected  BirdsEyeView birdsEyeView
           
protected  java.awt.Dimension size
           
protected  ViewInfo viewInfo
           
 
Constructor Summary
protected AbstractView(ViewInfo vi, BirdsEyeView bev, java.util.ArrayList anns, java.awt.Dimension s, java.lang.String alg)
          Constructor.
 
Method Summary
abstract  java.awt.Color getBackground()
          Subclasses must indicate their background color so the parent can blend in if the display area is bigger than the view.
abstract  java.awt.Component getComponent()
          Subclasses must return some sort of component to display as their view.
 java.awt.LayoutManager getLayout()
          This method returns a layout which centers the view in the parent.
 ViewInfo getViewInfo()
          This method returns the view info object for this view.
 void goDown()
          This method does nothing by default.
 void goUp()
          This method does nothing by default.
abstract  void loadConfiguration()
           
 void loadData(java.util.ArrayList newAnnotations)
          This method resets the annotation data and instructs subclasses to reload the data.
abstract  void reloadData()
          Subclasses must reload the annotation data and modify their displays accordingly.
abstract  void setlevelCapacity(int c)
           
 void toggleMapLabels(boolean booboo)
          This method does nothing by default.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

birdsEyeView

protected BirdsEyeView birdsEyeView

viewInfo

protected ViewInfo viewInfo

annotations

protected java.util.ArrayList annotations

size

protected java.awt.Dimension size

algorithm

protected static java.lang.String algorithm
Constructor Detail

AbstractView

protected AbstractView(ViewInfo vi,
                       BirdsEyeView bev,
                       java.util.ArrayList anns,
                       java.awt.Dimension s,
                       java.lang.String alg)
Constructor.

Parameters:
vi -
bev -
anns - ArrayList of Annotation objects
s - Size of view
alg - Treemaps
Method Detail

goUp

public void goUp()
This method does nothing by default. Subclasses must override to do something when the "up" button is pressed.


goDown

public void goDown()
This method does nothing by default. Subclasses must override to do something when the "down" button is pressed.


toggleMapLabels

public void toggleMapLabels(boolean booboo)
This method does nothing by default. Subclasses must override to do something when the "map labels" button is pressed.

Parameters:
booboo -

getLayout

public java.awt.LayoutManager getLayout()
This method returns a layout which centers the view in the parent. This is the default.

Returns:
LayoutManager

loadData

public void loadData(java.util.ArrayList newAnnotations)
This method resets the annotation data and instructs subclasses to reload the data.

Parameters:
newAnnotations - ArrayList of Annotation objects

loadConfiguration

public abstract void loadConfiguration()

getViewInfo

public ViewInfo getViewInfo()
This method returns the view info object for this view.

Returns:
ViewInfo

getComponent

public abstract java.awt.Component getComponent()
Subclasses must return some sort of component to display as their view.

Returns:
Component

getBackground

public abstract java.awt.Color getBackground()
Subclasses must indicate their background color so the parent can blend in if the display area is bigger than the view.

Returns:
Color

reloadData

public abstract void reloadData()
Subclasses must reload the annotation data and modify their displays accordingly.


setlevelCapacity

public abstract void setlevelCapacity(int c)