uchicago.src.sim.gui
Class Display

java.lang.Object
  extended by uchicago.src.sim.gui.Display
All Implemented Interfaces:
Displayable
Direct Known Subclasses:
TextDisplay

public abstract class Display
extends java.lang.Object
implements Displayable

Abstract class upon which custom displays can be built.

Version:
$Revision: 1.6 $ $Date: 2004/11/03 19:50:59 $
Author:
Nick Collier

Field Summary
protected  int height
           
protected  boolean view
           
protected  int width
           
 
Fields inherited from interface uchicago.src.sim.gui.Displayable
TOGGLE_LINKS, TOGGLE_NODES, TOGGLE_UPDATE_LAYOUT, TOGGLE_VIEW, TOGGLE_WRAP
 
Constructor Summary
Display(int width, int height)
          Constructs a Display with the specified width and height.
 
Method Summary
abstract  void drawDisplay(SimGraphics g)
          Does the actual drawing using the SimGraphics parameter.
 java.util.ArrayList getDisplayableInfo()
          Gets a list of the DisplayInfo object associated with this Display.
 java.awt.Dimension getSize()
          Gets the size of this Display.
 void reSize(int width, int height)
          Resizes the display to this new pixel width and pixel height.
 void viewEventPerformed(ViewEvent evt)
          Invoked when a viewEvent for this display is fired by the DisplaySurface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

protected boolean view

height

protected int height

width

protected int width
Constructor Detail

Display

public Display(int width,
               int height)
Constructs a Display with the specified width and height.

Parameters:
width - the width of the display
height - the height of the display
Method Detail

getSize

public java.awt.Dimension getSize()
Gets the size of this Display.

Specified by:
getSize in interface Displayable

drawDisplay

public abstract void drawDisplay(SimGraphics g)
Does the actual drawing using the SimGraphics parameter.

Specified by:
drawDisplay in interface Displayable
Parameters:
g - the graphics context with which to draw

getDisplayableInfo

public java.util.ArrayList getDisplayableInfo()
Gets a list of the DisplayInfo object associated with this Display.

Specified by:
getDisplayableInfo in interface Displayable
See Also:
DisplayInfo

viewEventPerformed

public void viewEventPerformed(ViewEvent evt)
Invoked when a viewEvent for this display is fired by the DisplaySurface.

Specified by:
viewEventPerformed in interface Displayable

reSize

public void reSize(int width,
                   int height)
Resizes the display to this new pixel width and pixel height.