edu.brook.ascape.view
Class CounterView

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

public class CounterView
extends CanvasView

A simple view that displays the number of scape iterations.

Since:
1.0
Version:
1.0
See Also:
Serialized Form

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
CounterView()
           
 
Method Summary
 java.lang.String getName()
          Returns a name for the view as defined by set name.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size, 130 x 50.
 void onUpdate()
          On update, write the current period to the buffer, in black if running, in gray if paused.
 void setName(java.lang.String name)
          Sets the name of this view.
 java.lang.String toString()
          Returns a short description of this view.
 
Methods inherited from class edu.brook.ascape.view.CanvasView
addNotify, addScape, build, finalize, getDrawEveryNUpdates, getGraphicsRecorder, getScape, getViewFrame, initializeBuffer, onIterate, onSetup, onStart, onStop, paint, removeScape, scapeUpdated, setDrawEveryNUpdates, setGraphicsRecorder, setViewFrame, 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
 

Constructor Detail

CounterView

public CounterView()
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size, 130 x 50.
Overrides:
getPreferredSize in class CanvasView

onUpdate

public void onUpdate()
On update, write the current period to the buffer, in black if running, in gray if paused.
Overrides:
onUpdate in class CanvasView

getName

public java.lang.String getName()
Returns a name for the view as defined by set name.
Overrides:
getName in class CanvasView

setName

public void setName(java.lang.String name)
Sets the name of this view.
Parameters:
name - a user relevant name for this view
Overrides:
setName in class CanvasView

toString

public java.lang.String toString()
Returns a short description of this view. Sames as name unless overridden.
Overrides:
toString in class CanvasView

(c) 1998-2000 The Brookings Insitution
Webpage