Project CASUAL
API for CASUAL
 All Classes Namespaces Functions Variables
Classes | Public Member Functions | Public Attributes | List of all members
CASUAL.iCASUALUI Interface Reference
Inheritance diagram for CASUAL.iCASUALUI:
CASCADEGUI.CASCADEGUI com.casual_dev.assistant_ui.casual_ui.AutomaticUI com.casual_dev.casual_demo_ui.minimal.AutomaticUI com.casual_dev.jodin.JOdinController com.casual_dev.zodui.CASUALZodMainUI GUI.CommandLine.CommandLineUI GUI.CommandLine.CommandLineUI GUI.development.CASUALGUIMain GUI.development.CASUALGUIMain GUI.testing.automatic GUI.testing.automatic

Classes

enum  MessageCategory
 

Public Member Functions

boolean isReady ()
 
void setReady (boolean ready)
 
boolean isDummyGUI ()
 
String displayMessage (CASUALMessageObject messageObject)
 
void dispose ()
 
void StartButtonActionPerformed ()
 
boolean setControlStatus (boolean status, int numberOfDevicesConnected, String mode)
 
void setCASPAC (Caspac caspac)
 
void setInformationScrollBorderText (String title)
 
void setProgressBar (int value)
 
void setProgressBarMax (int value)
 
void setScript (Script s)
 
void setStartButtonText (String text)
 
void setUserMainMessage (String text)
 
void setUserSubMessage (String text)
 
void setWindowBannerText (String text)
 
void setVisible (boolean b)
 
void setBlocksUnzipped (String value)
 
void sendString (String string)
 
void sendProgress (String data)
 

Public Attributes

final int INTERACTION_TIME_OUT = 0
 
final int INTERACTION_ACTION_REUIRED = 1
 
final int INTERACTION_USER_CANCEL_OPTION = 2
 
final int INTERACTION_USER_NOTIFICATION = 3
 
final int INTERACTION_SHOW_INFORMATION = 4
 
final int INTERACTION_SHOW_ERROR = 5
 
final int INTERACTION_SHOW_YES_NO = 6
 
final int INTERACTION_INPUT_DIALOG = 7
 
final int INTERACTION_COMMAND_NOTIFICATION = 8
 

Detailed Description

provides an interface for a main UI in CASUAL. Provides all User Interfaces and methods which provide a means of handling Message objects and UI. The intent is to abstract the CASUAL Messaging System using this class so a developer may implement their own GUI using any means they like. This class provides notifications which will halt the progress of the script and present information to the user. This allows the user to interact with CASUAL.

In order to change the Messaging API for CASUAL, there is a static reference which is located in CASUAL.resources.CASUALApp.properties the property name change required is Application.interactions. This should match the desired class which can handle CASUALMessageObjects

It is recommended that any class implementing iCASUALUI handle the following items at a minimum: 1. CASUALMessageObject.messageText 2. * CASUALMessageObject.title

The return value for any CASUAL Message Object aside from those which execute commmands or specifically state they return string results: 0- yes, ok, continue 1- no, cancel, stop

Author
Adam Outler adamo.nosp@m.utle.nosp@m.r@gma.nosp@m.il.c.nosp@m.om

Member Function Documentation

String CASUAL.iCASUALUI.displayMessage ( CASUALMessageObject  messageObject)

Takes a message object and displays to user. To properly implement this class the displayMessage should, at a minimum handle both CASUALMessageObject.title and CASUALMessageObject.messageText.

Parameters
messageObjectdefined by CASUAL
Returns
string value which must be interpereted

Implemented in CASCADEGUI.CASCADEGUI, GUI.development.CASUALGUIMain, GUI.development.CASUALGUIMain, com.casual_dev.CASCADEUIController, com.casual_dev.jodin.JOdinController, com.casual_dev.zodui.CASUALZodMainUI, GUI.CommandLine.CommandLineUI, GUI.CommandLine.CommandLineUI, com.casual_dev.assistant_ui.casual_ui.AutomaticUI, com.casual_dev.casual_demo_ui.minimal.AutomaticUI, GUI.testing.automatic, and GUI.testing.automatic.

void CASUAL.iCASUALUI.dispose ( )

disposes the current window. should be used to terminate application. This method can be used to call CASUALMain.Shutdown for proper shutdown. This should contain "Statics.GUI=null;" for faster shutdown. This method can contain System.exit at the end.

Implemented in GUI.development.CASUALGUIMain, GUI.development.CASUALGUIMain, com.casual_dev.jodin.JOdinController, com.casual_dev.zodui.CASUALZodMainUI, GUI.CommandLine.CommandLineUI, GUI.CommandLine.CommandLineUI, GUI.testing.automatic, GUI.testing.automatic, com.casual_dev.assistant_ui.casual_ui.AutomaticUI, and com.casual_dev.casual_demo_ui.minimal.AutomaticUI.

boolean CASUAL.iCASUALUI.isDummyGUI ( )

returns true if the UI is a dummy UI. Dummy UI is used for testing and for running CASPACs with a UI from the command line. This is useful for situations when you want to run an automated UI on a loop.

Returns
true if dummy ui.

Implemented in CASCADEGUI.CASCADEGUI, GUI.development.CASUALGUIMain, GUI.development.CASUALGUIMain, com.casual_dev.jodin.JOdinController, com.casual_dev.zodui.CASUALZodMainUI, GUI.CommandLine.CommandLineUI, GUI.CommandLine.CommandLineUI, com.casual_dev.assistant_ui.casual_ui.AutomaticUI, com.casual_dev.casual_demo_ui.minimal.AutomaticUI, GUI.testing.automatic, and GUI.testing.automatic.

boolean CASUAL.iCASUALUI.isReady ( )
void CASUAL.iCASUALUI.sendProgress ( String  data)
void CASUAL.iCASUALUI.sendString ( String  string)
void CASUAL.iCASUALUI.setBlocksUnzipped ( String  value)
void CASUAL.iCASUALUI.setCASPAC ( Caspac  caspac)
boolean CASUAL.iCASUALUI.setControlStatus ( boolean  status,
int  numberOfDevicesConnected,
String  mode 
)

sets controls status

Parameters
statuscommanded value
numberOfDevicesConnectedis the number of connected devices.
modestring value representing mode of checking for devices.
Returns
true if successful

Implemented in CASCADEGUI.CASCADEGUI, com.casual_dev.jodin.JOdinController, GUI.development.CASUALGUIMain, GUI.development.CASUALGUIMain, com.casual_dev.zodui.CASUALZodMainUI, GUI.CommandLine.CommandLineUI, GUI.CommandLine.CommandLineUI, GUI.testing.automatic, GUI.testing.automatic, com.casual_dev.assistant_ui.casual_ui.AutomaticUI, and com.casual_dev.casual_demo_ui.minimal.AutomaticUI.

void CASUAL.iCASUALUI.setInformationScrollBorderText ( String  title)
void CASUAL.iCASUALUI.setProgressBar ( int  value)
void CASUAL.iCASUALUI.setProgressBarMax ( int  value)
void CASUAL.iCASUALUI.setReady ( boolean  ready)
void CASUAL.iCASUALUI.setScript ( Script  s)
void CASUAL.iCASUALUI.setStartButtonText ( String  text)
void CASUAL.iCASUALUI.setUserMainMessage ( String  text)
void CASUAL.iCASUALUI.setUserSubMessage ( String  text)

sets the message label subtext. This message only provides detail to the user as to the process which is happening and may be used at any time to update sub-text in the UI.

Parameters
textlabel text

Implemented in CASCADEGUI.CASCADEGUI, com.casual_dev.jodin.JOdinController, com.casual_dev.zodui.CASUALZodMainUI, GUI.development.CASUALGUIMain, GUI.development.CASUALGUIMain, GUI.CommandLine.CommandLineUI, GUI.CommandLine.CommandLineUI, GUI.testing.automatic, GUI.testing.automatic, com.casual_dev.assistant_ui.casual_ui.AutomaticUI, and com.casual_dev.casual_demo_ui.minimal.AutomaticUI.

void CASUAL.iCASUALUI.setVisible ( boolean  b)
void CASUAL.iCASUALUI.setWindowBannerText ( String  text)
void CASUAL.iCASUALUI.StartButtonActionPerformed ( )

Member Data Documentation

final int CASUAL.iCASUALUI.INTERACTION_ACTION_REUIRED = 1

MessageType used by CASUALMessageObject and any class implementing this interface. Type 1 is a message object which mandates the user do something in order to advance the process. User is assinged a task and given two buttons "I did it" and "I didn't do it". returns 0 if user completed task. 1 if the user failed to do it.

final int CASUAL.iCASUALUI.INTERACTION_COMMAND_NOTIFICATION = 8

MessageType used by CASUALMessageObject and any class implementing this interface. A command notification will run a CASUAL command and return the results in the CASUALMessageObject.messageText variable. The results should be displayed to the user.

returns 0.

final int CASUAL.iCASUALUI.INTERACTION_INPUT_DIALOG = 7

MessageType used by CASUALMessageObject and any class implementing this interface. Requests input from the user in the form of text. The return from this type of dialog will be a string value representing user-entered text. returns 0.

final int CASUAL.iCASUALUI.INTERACTION_SHOW_ERROR = 5

MessageType used by CASUALMessageObject and any class implementing this interface. Type 5 is intended to halt the flow of operation and show an error notification. returns 0

final int CASUAL.iCASUALUI.INTERACTION_SHOW_INFORMATION = 4

MessageType used by CASUALMessageObject and any class implementing this interface. Type 4 is similar to type 3 in that it displays a notification and halts the flow, but a type 3 will change the user interaction type from notification to information style. returns 0.

final int CASUAL.iCASUALUI.INTERACTION_SHOW_YES_NO = 6

MessageType used by CASUALMessageObject and any class implementing this interface. Halts all script operations and shows the user a Yes/No diaLog. returns 0 if yes and 1 if no.

final int CASUAL.iCASUALUI.INTERACTION_TIME_OUT = 0

MessageType used by CASUALMessageObject and any class implementing this interface. Type 0 is a non-critical time-based message object which will time out and dismiss itself. returns 0

final int CASUAL.iCASUALUI.INTERACTION_USER_CANCEL_OPTION = 2

MessageType used by CASUALMessageObject and any class implementing this interface. Type 2 requests the user's permission to continue and gives the option to halt the active script returns 1 if user wishes to cancel

final int CASUAL.iCASUALUI.INTERACTION_USER_NOTIFICATION = 3

MessageType used by CASUALMessageObject and any class implementing this interface. Type 3 is a general purpose notification which displays information and halts the flow of the script until dismissed. returns 0.


The documentation for this interface was generated from the following file: