All Packages Class Hierarchy This Package Previous Next Index
Class kpalin.alabra.AppForm
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----kpalin.alabra.AppForm
- public class AppForm
- extends Frame
Here we create a window for application and prepare data for the game.
This is the highest class specificly for application so here we have to
handle file management and menu stuf.
- Author:
- Kimmo Palin
-
chessGame
- This is the real gamething.
-
frameMenu
- Menubar for the window.
-
saveGame
- An object controlling saving and loading of the game.
-
AppForm(String, String, ChessSettings)
- Creates new application window.
-
exitApp(int)
- This is only method that can kill the application
-
loadGame()
- Loads a saved file.
-
pause()
- Pause if iconified.
-
readImages(String)
- Here we start reading the Images.
-
resetGame()
- Reseting the game
-
saveGame()
- Saves this game with old name or asks a new one if this is a first save.
-
saveGameAs()
- Asks user a name of a file where to save this game.
-
unpause()
- Unpause if de-iconified.
frameMenu
private ChessAppMB frameMenu
- Menubar for the window. Just in case taken here if we hapen to need it
sometimes somewhere.
chessGame
private ChessPlay chessGame
- This is the real gamething. From this on, applet and application are
all alike.
saveGame
private FileIO saveGame
- An object controlling saving and loading of the game.
AppForm
AppForm(String fname,
String gifdir,
ChessSettings set)
- Creates new application window.
- Parameters:
- fname - Name of the file to be loaded.
- gifdir - Name of the directory where we can find the gifs for pieces.
- tileWidth - Width (and height) of a tile on the chessboard.
loadGame
public void loadGame()
- Loads a saved file.
saveGame
public void saveGame()
- Saves this game with old name or asks a new one if this is a first save.
saveGameAs
public void saveGameAs()
- Asks user a name of a file where to save this game.
resetGame
void resetGame()
- Reseting the game
pause
void pause()
- Pause if iconified.
- See Also:
- ChessPlay, CtrlPanel
unpause
void unpause()
- Unpause if de-iconified.
- See Also:
- ChessPlay, CtrlPanel
exitApp
void exitApp(int code)
- This is only method that can kill the application
- Parameters:
- code - Exit code.
readImages
void readImages(String basedir)
- Here we start reading the Images. This code is specific to application
and can't be shared with applet.
- Parameters:
- basedir - Directory where the images should be found.
All Packages Class Hierarchy This Package Previous Next Index