edu.gatech.cs2335.lemmings.gui
Class LApplication

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.gui.LApplication

public class LApplication
extends java.lang.Object

Class LApplication: This is the main application class. When instantiated, it will create a new window with nothing in it. The window's content pane is what we will be drawing in and every frame, we will call our own components' renderall method to render the stuff on screen.

 Revision History:
     v1.0 (Mar. 13, 2004) - Created the LApplication class
 

Version:
Version 1.0, Mar. 13, 2004
Author:
Vladimir Urazov

Field Summary
static boolean DEBUG
          Show lots of debug output?
static java.awt.Point DEFAULT_LOCATION
          The default location of the top-left corner of the application.
static java.awt.Dimension DEFAULT_SIZE
          The default size of the application window.
static java.lang.String DEFAULT_TITLE
          The default title of the application window.
static long FRAME_DELAY
          This is the delay between frames.
static int MAX_TARDINESS
          If we are lagging by this much, skip a frame.
static float MAXIMUM_FRAME_RATE
          The frame rate cap.
static long NO_GO_DELAY
          If we are not rendering, then check this many millis if we should go.
static boolean VERBOSE
          Show debug output?
 
Constructor Summary
LApplication(java.lang.String title, java.awt.Point location, java.awt.Dimension size)
          Creates a new LApplication instance.
 
Method Summary
 java.awt.GraphicsConfiguration getConfiguration()
          Returns the graphics configuration used by the application.
 LRootPane getRootPane()
          Returns the root pane used for this application.
 void repaint()
          Repaints everything that needs repainting.
 void setRootPane(LRootPane pane)
          Sets up the new root pane:
 void startRenderer()
          Starts the renderer loop.
 void stopRenderer()
          Stops the renderer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

public static final boolean VERBOSE
Show debug output?

See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG
Show lots of debug output?

See Also:
Constant Field Values

DEFAULT_TITLE

public static final java.lang.String DEFAULT_TITLE
The default title of the application window.

See Also:
Constant Field Values

DEFAULT_LOCATION

public static final java.awt.Point DEFAULT_LOCATION
The default location of the top-left corner of the application.


DEFAULT_SIZE

public static final java.awt.Dimension DEFAULT_SIZE
The default size of the application window.


MAXIMUM_FRAME_RATE

public static final float MAXIMUM_FRAME_RATE
The frame rate cap.

See Also:
Constant Field Values

FRAME_DELAY

public static final long FRAME_DELAY
This is the delay between frames.

See Also:
Constant Field Values

NO_GO_DELAY

public static final long NO_GO_DELAY
If we are not rendering, then check this many millis if we should go.

See Also:
Constant Field Values

MAX_TARDINESS

public static final int MAX_TARDINESS
If we are lagging by this much, skip a frame.

See Also:
Constant Field Values
Constructor Detail

LApplication

public LApplication(java.lang.String title,
                    java.awt.Point location,
                    java.awt.Dimension size)
Creates a new LApplication instance.

Parameters:
title - The title to give to the window. If null is passed in, a default vaue will be provided.
location - The location of the application window. If null is passed in, a default vaue will be provided.
size - The size of the application window. If null is passed in, a default vaue will be provided.
Method Detail

getConfiguration

public java.awt.GraphicsConfiguration getConfiguration()
Returns the graphics configuration used by the application.

Returns:
a GraphicsConfiguration value

getRootPane

public LRootPane getRootPane()
Returns the root pane used for this application.

Returns:
a LRootPane value

setRootPane

public void setRootPane(LRootPane pane)
Sets up the new root pane:

Parameters:
pane - a LRootPane value

repaint

public void repaint()
Repaints everything that needs repainting.


startRenderer

public void startRenderer()
Starts the renderer loop.


stopRenderer

public void stopRenderer()
Stops the renderer.