edu.brook.ascape.view
Class SimplexView

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--edu.brook.ascape.view.CanvasView
                    |
                    +--edu.brook.ascape.view.SimplexView

public class SimplexView
extends CanvasView

A scape view that represents some aspect of agent state in a simplex diagram.

Since:
1.5
Version:
1.5
See Also:
Serialized Form

Inner Class Summary
 class SimplexView.ConcreteSimplexFeature
           
 
Field Summary
 SimplexView.ConcreteSimplexFeature centroid
           
 float centroidTradeoff
           
 boolean displayCentroid
           
protected static int gap
           
 SimplexFeature simplexFeature
           
 SimplexView.ConcreteSimplexFeature z1
           
 SimplexView.ConcreteSimplexFeature z2
           
 SimplexView.ConcreteSimplexFeature z3
           
 
Fields inherited from class edu.brook.ascape.view.CanvasView
awaitingUpdate, bufferedGraphics, bufferedImage, currentUpdate, drawEveryNUpdates, frame, name, recorder, recordNext, scape
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
SimplexView()
          Constructs an overhead two-dimensional view.
SimplexView(java.lang.String name, float centroidTradeOff)
          Constructs an overhead two-dimensional view.
 
Method Summary
 void addNotify()
          Override addNotify to build buffer.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this view, which is the size of the lattice times this views cellSize.
 SimplexFeature getSimplexFeature()
          Returns the color feature this object is using to interpret the object's color.
 int getXPosition(SimplexFeature f, Agent a)
           
 int getYPosition(SimplexFeature f, Agent a)
           
 void onUpdate()
          On notification of a scape update, draws the actual overhead view.
 void setCentroidTradeoff(float t)
           
 void setSimplexFeature(SimplexFeature simplexFeature)
          Sets the color feature this object uses to interpret the object's color.
 
Methods inherited from class edu.brook.ascape.view.CanvasView
addScape, build, finalize, getDrawEveryNUpdates, getGraphicsRecorder, getName, getScape, getViewFrame, initializeBuffer, onIterate, onSetup, onStart, onStop, paint, removeScape, scapeUpdated, setDrawEveryNUpdates, setGraphicsRecorder, setName, setViewFrame, toString, update, updated
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

simplexFeature

public SimplexFeature simplexFeature

displayCentroid

public boolean displayCentroid

centroidTradeoff

public float centroidTradeoff

centroid

public SimplexView.ConcreteSimplexFeature centroid

z1

public SimplexView.ConcreteSimplexFeature z1

z2

public SimplexView.ConcreteSimplexFeature z2

z3

public SimplexView.ConcreteSimplexFeature z3

gap

protected static int gap
Constructor Detail

SimplexView

public SimplexView()
Constructs an overhead two-dimensional view.

SimplexView

public SimplexView(java.lang.String name,
                   float centroidTradeOff)
Constructs an overhead two-dimensional view.
Parameters:
name - a user relevant name for this view
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of this view, which is the size of the lattice times this views cellSize.
Overrides:
getPreferredSize in class CanvasView

setCentroidTradeoff

public void setCentroidTradeoff(float t)

addNotify

public void addNotify()
Override addNotify to build buffer.
Overrides:
addNotify in class CanvasView

getXPosition

public int getXPosition(SimplexFeature f,
                        Agent a)

getYPosition

public int getYPosition(SimplexFeature f,
                        Agent a)

onUpdate

public void onUpdate()
On notification of a scape update, draws the actual overhead view.
Parameters:
scapeEvent - a scape event update, usually unspecified
Overrides:
onUpdate in class CanvasView

getSimplexFeature

public SimplexFeature getSimplexFeature()
Returns the color feature this object is using to interpret the object's color.

setSimplexFeature

public void setSimplexFeature(SimplexFeature simplexFeature)
Sets the color feature this object uses to interpret the object's color.
Parameters:
colorFeature - the feature to use for coloring

(c) 1998-2000 The Brookings Insitution
Webpage