Project CASUAL
API for CASUAL
 All Classes Namespaces Functions Variables
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
com.casual_dev.zodui.CASUALZodMainUI Class Reference
Inheritance diagram for com.casual_dev.zodui.CASUALZodMainUI:
CASUAL.iCASUALUI

Public Member Functions

synchronized String createNewMessage (final MessagePanelContent msg)
 
synchronized void createNewZod (ZodPanelContent zpc)
 
ObservableList< Node > getChildren ()
 
boolean isReady ()
 
void setReady (boolean bln)
 
boolean isDummyGUI ()
 
String displayMessage (CASUALMessageObject cslm)
 
void dispose ()
 
void StartButtonActionPerformed ()
 
boolean setControlStatus (boolean status, int number, String mode)
 
boolean getControlStatus ()
 
void setCASPAC (Caspac caspac)
 
void setInformationScrollBorderText (String string)
 
void setProgressBar (int i)
 
void setProgressBarMax (int i)
 
void setScript (Script script)
 
void setStartButtonText (String string)
 
void setWindowBannerText (String string)
 
void setVisible (boolean bln)
 
void deviceConnected (String string)
 
void deviceDisconnected ()
 
void deviceMultipleConnected (int i)
 
void setBlocksUnzipped (String string)
 
void sendString (final String string)
 
void sendProgress (final String string)
 
ZodDownloader getDownloader ()
 
void setDownloader (ZodDownloader download)
 
void updateFrontPageProperties (Properties p)
 
void displayStatusOnFrontPage (boolean ready)
 
void setUserMainMessage (String string)
 
void setUserSubMessage (String string)
 
- Public Member Functions inherited from CASUAL.iCASUALUI
void sendString (String string)
 
void sendProgress (String data)
 

Static Public Member Functions

static ZodPanelContent getZodPanelContent ()
 

Public Attributes

ZodPanelController panel
 
- Public Attributes inherited from CASUAL.iCASUALUI
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
 

Static Public Attributes

static boolean testmode = false
 
static ZodPanelContent content = new ZodPanelContent()
 
static AtomicBoolean CASUALready = new AtomicBoolean(true)
 

Detailed Description

Provides input and output from the main User Interface

Author
adamoutler

Member Function Documentation

synchronized String com.casual_dev.zodui.CASUALZodMainUI.createNewMessage ( final MessagePanelContent  msg)

creates a new message for display

Parameters
msga messagePanelContent object is required
Returns
0, 1, 2 or text depending on what the user pressed.
synchronized void com.casual_dev.zodui.CASUALZodMainUI.createNewZod ( ZodPanelContent  zpc)

Creates a new Zod Panel from Zod Panel Content.

Parameters
zpccontent used to create new panel.

anonymous inner class to ensure there is no way to access this except here.

String com.casual_dev.zodui.CASUALZodMainUI.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

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.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.

Implements CASUAL.iCASUALUI.

ObservableList<Node> com.casual_dev.zodui.CASUALZodMainUI.getChildren ( )

returns a list of nodes representing the children of the panel

Returns
list of nodes
ZodDownloader com.casual_dev.zodui.CASUALZodMainUI.getDownloader ( )
Returns
the downloader
static ZodPanelContent com.casual_dev.zodui.CASUALZodMainUI.getZodPanelContent ( )
static

returns the current ZodPanelContent

Returns
content
boolean com.casual_dev.zodui.CASUALZodMainUI.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.

Implements CASUAL.iCASUALUI.

boolean com.casual_dev.zodui.CASUALZodMainUI.isReady ( )

returns true if the UI is ready.

Returns
true if ui is ready

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setBlocksUnzipped ( String  value)

used during unzip as a progress indicator

Parameters
valuenumber of blocks unzipped.

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setCASPAC ( Caspac  caspac)

Sets a reference to the current CASPAC so information can be displayed

Parameters
caspaccaspac to reference

Implements CASUAL.iCASUALUI.

boolean com.casual_dev.zodui.CASUALZodMainUI.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

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setDownloader ( ZodDownloader  download)
Parameters
downloadthe downloader to set
void com.casual_dev.zodui.CASUALZodMainUI.setInformationScrollBorderText ( String  title)

Sets the current status of the window.

Parameters
titlecurrent status

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setProgressBar ( int  value)

sets the progress bar value.

Parameters
valuevalue for progress bar

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setProgressBarMax ( int  value)

sets max value for progress bar

Parameters
valuemaximum

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setReady ( boolean  ready)

provides a setter for UI. Normally unused, but this is for test purposes.

Parameters
readyGUI has all parts established and is ready for operations.

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setScript ( Script  s)

Sets the active script for the window

Parameters
sscript which is now active

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setStartButtonText ( String  text)

sets "do it!" button text

Parameters
texttext for main execution button

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setUserMainMessage ( String  text)

This message provides a topical overview of what is happening to the user. It should be used sparingly... eg.. pushing files, flashing devices...

Parameters
texttitle to set

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.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

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setVisible ( boolean  b)

sets the window visibility

Parameters
btrue if visibility is commanded

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.setWindowBannerText ( String  text)

sets window banner image

Parameters
iconimage to display
texttext if image cannot be displayed sets the main window banner text if an image is not used
texttext to display as banner

Implements CASUAL.iCASUALUI.

void com.casual_dev.zodui.CASUALZodMainUI.StartButtonActionPerformed ( )

the start button was pressed.

Implements CASUAL.iCASUALUI.

Member Data Documentation

ZodPanelContent com.casual_dev.zodui.CASUALZodMainUI.content = new ZodPanelContent()
static

Content used in in ZodPanel.

ZodPanelController com.casual_dev.zodui.CASUALZodMainUI.panel

The panel content currently displayed

boolean com.casual_dev.zodui.CASUALZodMainUI.testmode = false
static

true if running in testing mode. //todo: delete this later This is from debugging.


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