edu.brook.ascape.view
Interface ComponentView

All Known Implementing Classes:
CanvasView, PanelView, ChartView

public abstract interface ComponentView
extends ScapeListener

A view which listens to (is an observer of) an agent scape. The view must be a sublclass of java.awt.component.

Since:
1.0
Version:
1.2.6

Method Summary
 void build()
          Prepare the component view, once the view's scape has been created.
 GraphicsRecorder getGraphicsRecorder()
          Returns a recorder that can be used to record the graphics of this view.
 Scape getScape()
          Returns the scape this listener is observing.
 java.awt.Dimension getSize()
           
 ViewFrameBridge getViewFrame()
          Return the view frame this component is being displayed within.
 void paint(java.awt.Graphics g)
           
 void setGraphicsRecorder(GraphicsRecorder recorder)
          Sets the recorder that can be used to record the graphics of this view.
 void setViewFrame(ViewFrameBridge frame)
          Sets the view frame this component is being displayed within.
 
Methods inherited from interface edu.brook.ascape.model.ScapeListener
addScape, removeScape, scapeUpdated
 
Methods inherited from interface edu.brook.ascape.util.HasName
getName
 

Method Detail

build

public void build()
Prepare the component view, once the view's scape has been created.

getScape

public Scape getScape()
Returns the scape this listener is observing.

getViewFrame

public ViewFrameBridge getViewFrame()
Return the view frame this component is being displayed within.

setViewFrame

public void setViewFrame(ViewFrameBridge frame)
Sets the view frame this component is being displayed within.

getGraphicsRecorder

public GraphicsRecorder getGraphicsRecorder()
Returns a recorder that can be used to record the graphics of this view. If null (default, and typical), there is no recorder for this view.

setGraphicsRecorder

public void setGraphicsRecorder(GraphicsRecorder recorder)
Sets the recorder that can be used to record the graphics of this view. If null, do not record.

paint

public void paint(java.awt.Graphics g)

getSize

public java.awt.Dimension getSize()

(c) 1998-2000 The Brookings Insitution
Webpage