jAsea
Class jAseaWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--jAsea.jAseaWindow
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, java.io.Serializable

public class jAseaWindow
extends java.awt.Frame
implements java.awt.event.ActionListener, java.awt.event.ItemListener

The main window of the application.

See Also:
Serialized Form

Field Summary
(package private) static java.lang.String CM_ABOUT
          The menu labels
(package private) static java.lang.String CM_ALLEVENT
          The menu labels
(package private) static java.lang.String CM_ALLTASK
          The menu labels
(package private) static java.lang.String CM_EVENT
          The menu labels
(package private) static java.lang.String CM_NPC
          The menu labels
(package private) static java.lang.String CM_OBJECT
          The menu labels
(package private) static java.lang.String CM_TASK
          The menu labels
(package private)  java.lang.String cmd
          The inputted command
(package private)  jAseaAllEventDebug jAAED
           
(package private)  jAseaAllTaskDebug jAATD
           
(package private)  jAseaEventDebug jAED
           
(package private)  jAseaNPCDebug jAND
           
(package private)  jAseaObjectDebug jAOD
          This allows the user to see the current status of a single object
(package private)  jAseaRun jar
          The runtime object
(package private)  jAseaTaskDebug jATD
           
(package private) static boolean UseDebug
          Whether or not to list the debug menu items
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) jAseaWindow(java.lang.String windowname, jAseaRun _jar)
          Constructor.
 
Method Summary
(package private)  java.lang.String _append(java.lang.String s)
          Parse a string of tags and text and append to the text area.
 void actionPerformed(java.awt.event.ActionEvent e)
          Perform an action when a text field or menu changes.
 void append(java.lang.String s)
           
 void closeup()
          Close up the window & exit Called by the WindowListener
 java.lang.String getCommand()
          Wait until a command is inputted.
(package private)  boolean is(java.lang.String a, java.lang.String b)
          Are two strings identical, ignoring case?
 void itemStateChanged(java.awt.event.ItemEvent e)
          Handle items that have changed state.
static void main(java.lang.String[] args)
          The main function.
(package private)  void pause()
          Change the input field to "press enter" and wait for the user to do so.
(package private) static void sleep(int i)
          Sleep for a certain number of seconds.
(package private)  void tick()
          If the user has any debug windows open, update them to the current state.
 void unlock()
          Allow the user to enter commands again.
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

cmd

java.lang.String cmd
The inputted command


jar

jAseaRun jar
The runtime object


CM_OBJECT

static final java.lang.String CM_OBJECT
The menu labels

See Also:
Constant Field Values

CM_EVENT

static final java.lang.String CM_EVENT
The menu labels

See Also:
Constant Field Values

CM_ALLEVENT

static final java.lang.String CM_ALLEVENT
The menu labels

See Also:
Constant Field Values

CM_TASK

static final java.lang.String CM_TASK
The menu labels

See Also:
Constant Field Values

CM_ALLTASK

static final java.lang.String CM_ALLTASK
The menu labels

See Also:
Constant Field Values

CM_NPC

static final java.lang.String CM_NPC
The menu labels

See Also:
Constant Field Values

CM_ABOUT

static final java.lang.String CM_ABOUT
The menu labels

See Also:
Constant Field Values

UseDebug

static final boolean UseDebug
Whether or not to list the debug menu items

See Also:
Constant Field Values

jAOD

jAseaObjectDebug jAOD
This allows the user to see the current status of a single object


jAAED

jAseaAllEventDebug jAAED

jAED

jAseaEventDebug jAED

jATD

jAseaTaskDebug jATD

jAATD

jAseaAllTaskDebug jAATD

jAND

jAseaNPCDebug jAND
Constructor Detail

jAseaWindow

jAseaWindow(java.lang.String windowname,
            jAseaRun _jar)
      throws java.io.IOException
Constructor.

Parameters:
windowname - the name of the window.
_jar - the game's runtime
Method Detail

closeup

public void closeup()
Close up the window & exit Called by the WindowListener


_append

java.lang.String _append(java.lang.String s)
Parse a string of tags and text and append to the text area. This method is not called directly. Instead, it is called by the append(String) method.

Parameters:
s - the string to parse

sleep

static void sleep(int i)
Sleep for a certain number of seconds.

Parameters:
i - the number of seconds to sleep

is

boolean is(java.lang.String a,
           java.lang.String b)
Are two strings identical, ignoring case?

Parameters:
a - the first string
b - the second string

append

public void append(java.lang.String s)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Perform an action when a text field or menu changes.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the event that action should be performed for

pause

void pause()
Change the input field to "press enter" and wait for the user to do so. Lock the input field until then.


unlock

public void unlock()
Allow the user to enter commands again.


getCommand

public java.lang.String getCommand()
Wait until a command is inputted.

Returns:
the command

main

public static void main(java.lang.String[] args)
The main function. This function is currently used just for testing this class.


itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Handle items that have changed state.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - the item event

tick

void tick()
If the user has any debug windows open, update them to the current state. Called after processing each turn by the main loop.