Class Evolver

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--javax.swing.JApplet
                                |
                                +--Evolver
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable

public class Evolver
extends javax.swing.JApplet

The applet/application. Run with 'java Evolver'.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Inner classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
static java.awt.Color backgroundColor
           
(package private)  Behavior[] behavior
          The current generation.
(package private)  BehaviorDisplay[] behaviorDisplay
          Displays for the current generation.
(package private)  BehaviorViewer behaviorViewer
           
(package private)  javax.swing.JFrame behaviorViewerWindow
           
(package private)  int frameHeight
           
(package private)  int frameWidth
          Width of the thumbnails
(package private)  javax.swing.JPanel generationDisplay
          Panel showing the current generation.
(package private)  javax.swing.JFrame geneticConsoleWindow
           
(package private)  GeneticParameters geneticParameters
           
static Evolver instance
          A pointer to the global instance of this object.
(package private)  MorphViewer morphViewer
           
(package private)  javax.swing.JFrame morphViewerWindow
           
(package private)  int numBehaviors
          The number of behaviors in the generation.
(package private)  LED power
          Display LEDs
(package private)  LED status
          Display LEDs
(package private)  javax.swing.Timer statusBlink
          The timer that blinks the status light
(package private)  javax.swing.JTextArea textDisplay
          Display for text on the bottom.
(package private)  int waiting
           
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Evolver()
           
 
Method Summary
 void beginWaiting()
           
 void breed()
          Produces a new generation by breeding selected members of the current generation.
 void endWaiting()
           
static void main(java.lang.String[] s)
           
 void reset()
          Produce a new generation from scratch.
 void setMessageText(java.lang.String t)
           
 void setNumBehaviors(int numBehaviors)
          Changes the number of behaviors in a generation.
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paint, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, transferFocus, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

backgroundColor

public static final java.awt.Color backgroundColor

instance

public static Evolver instance
A pointer to the global instance of this object.

generationDisplay

javax.swing.JPanel generationDisplay
Panel showing the current generation.

behaviorDisplay

BehaviorDisplay[] behaviorDisplay
Displays for the current generation.

textDisplay

javax.swing.JTextArea textDisplay
Display for text on the bottom.

behavior

Behavior[] behavior
The current generation.

numBehaviors

int numBehaviors
The number of behaviors in the generation.

frameWidth

int frameWidth
Width of the thumbnails

frameHeight

int frameHeight

power

LED power
Display LEDs

status

LED status
Display LEDs

statusBlink

javax.swing.Timer statusBlink
The timer that blinks the status light

geneticConsoleWindow

javax.swing.JFrame geneticConsoleWindow

geneticParameters

GeneticParameters geneticParameters

behaviorViewerWindow

javax.swing.JFrame behaviorViewerWindow

behaviorViewer

BehaviorViewer behaviorViewer

morphViewerWindow

javax.swing.JFrame morphViewerWindow

morphViewer

MorphViewer morphViewer

waiting

int waiting
Constructor Detail

Evolver

public Evolver()
Method Detail

main

public static void main(java.lang.String[] s)

beginWaiting

public void beginWaiting()

endWaiting

public void endWaiting()

breed

public void breed()
Produces a new generation by breeding selected members of the current generation.

reset

public void reset()
Produce a new generation from scratch.

setMessageText

public void setMessageText(java.lang.String t)

setNumBehaviors

public void setNumBehaviors(int numBehaviors)
Changes the number of behaviors in a generation.