world
Class WinEnv

java.lang.Object
  |
  +--world.WinEnv

public class WinEnv
extends java.lang.Object

A WinEnv contains windowing and panel code.


Nested Class Summary
private  class WinEnv.SimPanel
          Our main panel class simply contains a white panel that always requests to have the focus
 
Field Summary
private  javax.swing.JPanel buttons
           
private  javax.swing.JFrame frame
           
private  WinEnv.SimPanel panel
           
(package private)  World theWorld
           
 
Constructor Summary
WinEnv(World world)
          Create our window and buttons and registers the world.
 
Method Summary
private  javax.swing.JPanel createButtons()
          Creates all the buttons and puts them in a panel.
 java.awt.Dimension getPanelSize()
          Gets the size of the main panel
 void redraw()
          Redraws the entire main content panel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frame

private javax.swing.JFrame frame

panel

private WinEnv.SimPanel panel

buttons

private javax.swing.JPanel buttons

theWorld

World theWorld
Constructor Detail

WinEnv

public WinEnv(World world)
Create our window and buttons and registers the world.

Parameters:
world - the World that this WinEnv is used for
Method Detail

getPanelSize

public java.awt.Dimension getPanelSize()
Gets the size of the main panel

Returns:
the size of the work panel

redraw

public void redraw()
Redraws the entire main content panel


createButtons

private javax.swing.JPanel createButtons()
Creates all the buttons and puts them in a panel. Buttons events are handled by the world

Returns:
the panel with buttons created