com.pegacat.vcf
Class Framework

java.lang.Object
  |
  +--com.pegacat.vcf.Framework

public class Framework
extends java.lang.Object

The Framework is the glue that links the various parts of the program together. The GUI elements call methods in the framework such as openConnection, the results of which are used to get the DataLayer going...


Field Summary
static boolean debug
           
 
Constructor Summary
Framework(Skin skin)
           
 
Method Summary
 void connect()
          Trigger the 'Connect to server' screen.
 boolean isConnected()
          Returns true if we are connected to either the web or an offline data source (a saved game file).
 void loadPlugins()
          This loads up all the available plugins (even if not used).
 void makeConnection(java.lang.String url, java.lang.String gameNo, java.lang.String userName, java.lang.String password, boolean useCache)
           
 void offline()
          Load game info offline from stored data
 void setOptions()
           
 void setSkin(Skin skin)
           
 void showHelp()
           
 void showVoyagerHelp()
           
 void shutdown()
          Stop the program and clean up.
 void workOffline(java.io.File gameDirectory)
          Loads a pre-saved game Directory with 'OVF' data ("Old Voyager Format" :-) )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

Framework

public Framework(Skin skin)
Method Detail

setSkin

public void setSkin(Skin skin)

shutdown

public void shutdown()
Stop the program and clean up. (Chains finally to VoyagerClient.shutdown()).

loadPlugins

public void loadPlugins()

This loads up all the available plugins (even if not used).

Plugins can either be free class files in the plugins directory, in which case they must have the form '*plugin.class' (e.g. 'StarMapPlugin.class'), or may be in a zip/jar file, in which case they must have the same base name as the zip/jar file (e.g. 'StarmMap.zip' contains (among other things) a 'StarMap.class' file which implements the Plugin interface...).

The reason for these limitations is that most plugins are assumed to consist of multiple class files (and possibly images etc.) - we don't want to test all of these to see if they are plugins.


makeConnection

public void makeConnection(java.lang.String url,
                           java.lang.String gameNo,
                           java.lang.String userName,
                           java.lang.String password,
                           boolean useCache)

workOffline

public void workOffline(java.io.File gameDirectory)
Loads a pre-saved game Directory with 'OVF' data ("Old Voyager Format" :-) )

connect

public void connect()
Trigger the 'Connect to server' screen.

offline

public void offline()
Load game info offline from stored data

isConnected

public boolean isConnected()
Returns true if we are connected to either the web or an offline data source (a saved game file).

setOptions

public void setOptions()

showHelp

public void showHelp()

showVoyagerHelp

public void showVoyagerHelp()