|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CDasherInterfaceBase
dasher.applet.JDasher
public class JDasher
Simple implementation of CDasherInterfaceBase providing minimal facilities to support an Applet version of Dasher.
| Field Summary | |
|---|---|
private JDasherHost |
m_Host
Host to notify of events and request redraws. |
private JMouseInput |
m_MouseInput
Our mouse input |
| Fields inherited from class dasher.CDasherInterfaceBase |
|---|
g_Logger, m_Alphabet, m_AlphIO, m_bConnectLock, m_bGlobalLock, m_bShutdownLock, m_ColourIO, m_Colours, m_DasherModel, m_DasherScreen, m_DasherView, m_EventHandler, m_Input, m_InputFilter, m_oModuleManager, m_SettingsStore, m_UserLog, strCurrentContext, strTrainfileBuffer |
| Constructor Summary | |
|---|---|
JDasher(JDasherHost host)
Creates a new JDasher. |
|
| Method Summary | |
|---|---|
void |
CreateSettingsStore()
Attempts to create a JSettings object; if a StoreUnavailableException is produced in the course of this, we fall back and produce a standard CSettingsStore. |
void |
ExternalEventHandler(CEvent Event)
External event handler; simply passes the event to our host, typically a JDasherApplet. |
int |
GetFileSize(java.lang.String strFileName)
Attempts to retrieve a ResourceStream for a given file by retrieving it from our JAR file, and returns its available property which should indicate the file size. |
java.io.InputStream |
getResourceStream(java.lang.String filename)
Attempts to retrieve a resource stream representing a given file by using the getResourceAsStream method. |
void |
Redraw(boolean bChanged)
Orders our host to redraw. |
void |
ScanAlphabetFiles(java.util.Collection<java.lang.String> vFileList)
Populates a given Collection with a list of available alphabet files. |
void |
ScanColourFiles(java.util.Collection<java.lang.String> vFileList)
Populates a given Collection with a list of available colour files. |
void |
SetupPaths()
Sets our system path to "system.rc/". |
void |
SetupUI()
Stub |
int |
TrainFile(java.lang.String Filename,
int iTotalBytes,
int iOffset)
Attempts to retrieve a stream pointing to a given file in this Applet's JAR file and recalls TrainStream on this stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private JMouseInput m_MouseInput
private JDasherHost m_Host
| Constructor Detail |
|---|
public JDasher(JDasherHost host)
host - Host to report events and request mouse events
and redraws.| Method Detail |
|---|
public void ExternalEventHandler(CEvent Event)
ExternalEventHandler in class CDasherInterfaceBaseEvent - Event to handlepublic void CreateSettingsStore()
If a SettingsStore already exists, we ignore the call.
CreateSettingsStore in class CDasherInterfaceBase
public int TrainFile(java.lang.String Filename,
int iTotalBytes,
int iOffset)
If we can't retrieve said stream for some reason, 0 is returned.
TrainFile in class CDasherInterfaceBaseFilename - File to retrieveiTotalBytes - Bytes to readiOffset - Offset to start reading
public int GetFileSize(java.lang.String strFileName)
In the event of failure of any sort, we return zero.
GetFileSize in class CDasherInterfaceBasestrFileName - File whose size we wish to retrieve
public void ScanAlphabetFiles(java.util.Collection<java.lang.String> vFileList)
Due to the difficulty in enumerating the contents of a JAR file, at present this is hard coded to report a certain set.
Ideally this should be upgraded to report the true list of available files, potentially by reading some master XML file.
ScanAlphabetFiles in class CDasherInterfaceBasevFileList - Collection to fill with a list of available alphabet files.public void ScanColourFiles(java.util.Collection<java.lang.String> vFileList)
Due to the difficulty in enumerating the contents of a JAR file, at present this is hard coded to report a certain set.
Ideally this should be upgraded to report the true list of available files, potentially by reading some master XML file.
ScanColourFiles in class CDasherInterfaceBasevFileList - Collection to fill with a list of available colour files.public java.io.InputStream getResourceStream(java.lang.String filename)
getResourceStream in class CDasherInterfaceBasefilename - File to be opened
public void SetupPaths()
SetupPaths in class CDasherInterfaceBasepublic void SetupUI()
SetupUI in class CDasherInterfaceBasepublic void Redraw(boolean bChanged)
Redraw in class CDasherInterfaceBasebChanged - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||