com.huguesjohnson.hapsby
Class Hapsby

java.lang.Object
  extended by com.huguesjohnson.hapsby.Hapsby

public final class Hapsby
extends java.lang.Object

Main class for the Hapsby application.

Author:
Hugues Johnson

Constructor Summary
Hapsby()
          Initializes the main window and application.
 
Method Summary
 void actionHandler(java.awt.event.ActionEvent e)
          Receives actions from the main window and forwards them to executeCommand(String command).
 void executeCommand(java.lang.String command)
          Processes action commands received from the UI.
 void listSelectionHandler(javax.swing.event.ListSelectionEvent e)
          listSelectionHandler is invoked when a new property is selected in the main window.
static void main(java.lang.String[] args)
          Entry point for Hapsby application.
 void unloadWindow()
          Executed when the windowClosing event is received from the main window.
 void updateProgress(java.lang.String message)
          Sends status messages to the main window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hapsby

public Hapsby()
Initializes the main window and application. The following actions are taken at startup:
  1. Splash screen displayed.
  2. Error stream redirected to ${user.dir}\Hapsby.err.log.
  3. Settings are loaded from Hapsby.ini.
  4. Save game definitions are loaded from ${user.dir}\hsd.
  5. Open save game wizard pages are pre-initialized.
  6. Main window is initialized and displayed.
  7. Splash screen closed.

Method Detail

unloadWindow

public final void unloadWindow()
Executed when the windowClosing event is received from the main window. The following actions are taken:
  1. Most recent save game property change saved.
  2. Currently open save game closed.
  3. Settings are saved to ${user.dir}\Hapsby.ini.
  4. Error log closed, deleted if empty.
  5. Main window closed.
  6. System.exit(0) called.


updateProgress

public void updateProgress(java.lang.String message)
Sends status messages to the main window.

Parameters:
message - The message to display in the statusbar of the main window.

actionHandler

public final void actionHandler(java.awt.event.ActionEvent e)
Receives actions from the main window and forwards them to executeCommand(String command).

Parameters:
e - ActionEvent sent from the main window.

listSelectionHandler

public final void listSelectionHandler(javax.swing.event.ListSelectionEvent e)
listSelectionHandler is invoked when a new property is selected in the main window. The last edited property is saved and the main window is updated with the selected property.

Parameters:
e - ListSelectionEvent received from the main window.

executeCommand

public final void executeCommand(java.lang.String command)
Processes action commands received from the UI.

Parameters:
command - One of the commands defined in HapsbyActionCommands.
See Also:
HapsbyActionCommands

main

public static void main(java.lang.String[] args)
Entry point for Hapsby application.

Parameters:
args - Command line arguments ignored.


Copyright © 2000-2009 Hugues Johnson