|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CDasherInterfaceBase
dasher.net.NetDasher
public class NetDasher
Implementation of DasherInterfaceBase designed for use as part of a server supplying a remote interface to Dasher, typically by a web front-end.
For specification details of the front end, see the information relating to JSDasher at www.smowton.net/chris (found under Dasher Project).
As this implementation of Dasher is designed to be instantiated once for each connection, it includes hooks for some repetitive work to be externalised; specifically, it expects both a CAlphIO and CColourIO to have been ready-constructed by its host.
| Field Summary | |
|---|---|
protected CAlphIO |
m_alphIO
Reference to the AlphIO object handed in by the host |
protected CColourIO |
m_ColourIO
Reference to the ColourIO object handed in by the host |
protected NetInput |
m_CoordInput
Reference to the NetInput device which is feeding Dasher co-ordinates. |
protected DasherEditListener |
m_Host
Reference to our host |
protected java.lang.String |
userDataLocation
User data location; this is where Dasher should look for training texts. |
| Fields inherited from class dasher.CDasherInterfaceBase |
|---|
g_Logger, m_Alphabet, m_AlphIO, m_bConnectLock, m_bGlobalLock, m_bShutdownLock, m_Colours, m_DasherModel, m_DasherScreen, m_DasherView, m_EventHandler, m_Input, m_InputFilter, m_oModuleManager, m_SettingsStore, m_UserLog, strCurrentContext, strTrainfileBuffer |
| Constructor Summary | |
|---|---|
NetDasher(DasherEditListener host,
CAlphIO alphIO,
CColourIO colIO)
Creates a new NetDasher which passes events out to a given host, and which gets its alphabets and colour schemes from given sources. |
|
| Method Summary | |
|---|---|
void |
CreateSettingsStore()
Should create a SettingsStore object of some sort and store a reference to it in m_SettingsStore. |
CAlphIO |
doAlphIO(java.util.ArrayList<java.lang.String> vFiles)
Supplies the AlphIO object which was supplied to our constructor as a source of alphabet information. |
CColourIO |
doColourIO(java.util.ArrayList<java.lang.String> vFiles)
Supplies the ColourIO object which was supplied to our constructor as a source of colour scheme information. |
void |
ExternalEventHandler(CEvent event)
Called for every dispatched event after all components have received it and *after* InterfaceEventHandler. |
int |
GetFileSize(java.lang.String strFileName)
Should return the size of a given file, or 0 if the file does not exist or cannot be accessed. |
void |
Redraw(boolean bChanged)
Abstract method which will be called whenever a screen redraw is required. |
void |
ScanAlphabetFiles(java.util.Collection<java.lang.String> vFileList)
Stub; not required in this version of Dasher since our host is responsible for constructing a CAlphIO |
void |
ScanColourFiles(java.util.Collection<java.lang.String> vFileList)
Stub; not required in this version of Dasher since our host is responsible for constructing a CColourIO |
void |
setCoordinates(int x,
int y)
Informs the helper NetInput class that when next asked, it should supply these co-ordinates. |
void |
SetupPaths()
Should setup the system and user locations; called early in the startup sequence. |
void |
SetupUI()
Should perform any UI building which is required. |
void |
setUserLoc(java.lang.String loc)
Sets the location where Dasher should search for training texts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected NetInput m_CoordInput
protected DasherEditListener m_Host
protected java.lang.String userDataLocation
protected CAlphIO m_alphIO
protected CColourIO m_ColourIO
| Constructor Detail |
|---|
public NetDasher(DasherEditListener host,
CAlphIO alphIO,
CColourIO colIO)
This constructor will call CreateSettingsStore and register an instance of NetInput as our input device; however Realize still has to be called before it is ready to be used.
See the superclass documentation for more detail on the Interface's role.
host - Host to whom we should pass EditEventsalphIO - AlphIO object to read alphabets fromcolIO - ColourIO object to read colour schemes from| Method Detail |
|---|
public void setCoordinates(int x,
int y)
x - Mouse x co-ordinatey - Mouse y co-ordinatepublic void CreateSettingsStore()
CDasherInterfaceBaseThis is an abstract method because most implementations will want to extend the default SettingsStore to provide the possibility of persistent settings.
CreateSettingsStore in class CDasherInterfaceBasepublic CAlphIO doAlphIO(java.util.ArrayList<java.lang.String> vFiles)
doAlphIO in class CDasherInterfaceBasevFiles - List of files to be parsed
public CColourIO doColourIO(java.util.ArrayList<java.lang.String> vFiles)
doColourIO in class CDasherInterfaceBasevFiles - List of files to be parsed
public void ExternalEventHandler(CEvent event)
CDasherInterfaceBaseBy default this ignores all events; the intent is for implementations to override it if they want to either a) Pass events out to UI components which the core doesn't know about, or b) Transcribe our internal events into some other event-dispatching scheme such as Win32's message dispatching scheme.
ExternalEventHandler in class CDasherInterfaceBaseevent - Event being signalledpublic int GetFileSize(java.lang.String strFileName)
CDasherInterfaceBase
GetFileSize in class CDasherInterfaceBasestrFileName - File to be read
public void Redraw(boolean bChanged)
CDasherInterfaceBase
Redraw in class CDasherInterfaceBasebChanged - True if the model has changed since the last framepublic void ScanAlphabetFiles(java.util.Collection<java.lang.String> vFileList)
ScanAlphabetFiles in class CDasherInterfaceBasevFileList - List to fill with filenames to process.public void ScanColourFiles(java.util.Collection<java.lang.String> vFileList)
ScanColourFiles in class CDasherInterfaceBasevFileList - List to fill with filenames to process.public void SetupPaths()
CDasherInterfaceBaseThese correspond to the string parameters SP_SYSTEM_LOC and SP_USER_LOC respectively.
SetupPaths in class CDasherInterfaceBasepublic void setUserLoc(java.lang.String loc)
loc - New data locationpublic void SetupUI()
CDasherInterfaceBase
SetupUI in class CDasherInterfaceBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||