|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.Main
Class Main is the bootstrap for JSwat when launched from the command line or via a shortcut. It creates a Session and an instance of a UIAdapter, which is responsible for providing the user interface. This class has several methods for managing the open Sessions, such as creating new ones and terminating old ones.
Field Summary | |
protected static java.lang.Class |
adapterClass
The class of the UIAdapter to be used when creating new Sessions. |
protected static java.util.Vector |
openSessions
List of the open Sessions. |
protected static JSwat |
swat
Reference to single instance of JSwat. |
Constructor Summary | |
Main()
|
Method Summary | |
static void |
endSession(Session session)
Terminate the given Session. |
static boolean |
init(java.io.InputStream appis)
Performs basic program initialization. |
static void |
main(java.lang.String[] args)
Main method for JSwat program. |
protected static void |
migrateOldFiles(java.io.File dir)
Migrate the old JSwat files from the user's home directory to the given directory. |
static Session |
newSession()
Create a new Session and user interface. |
static void |
setUIAdapter(java.lang.Class adapter)
Sets the concrete implementatioin class of UIAdapter to be used when creating new Sessions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.lang.Class adapterClass
protected static java.util.Vector openSessions
protected static JSwat swat
Constructor Detail |
public Main()
Method Detail |
public static void endSession(Session session)
session
- Session to be ended.public static boolean init(java.io.InputStream appis)
JSwat
class, loads the application preferences, and
migrates the old settings files to the new location.appis
- JSwat preferences file as a stream. This method
reads the application preferences from this
stream and merges them with the preferences in
the user's home directory.public static void main(java.lang.String[] args)
System.exit()
.args
- list of command-line arguments.protected static void migrateOldFiles(java.io.File dir)
dir
- new jswat files directory (created if necessary).public static Session newSession()
public static void setUIAdapter(java.lang.Class adapter)
adpater
- class of UIAdapter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |