JUICe

com.lafros.juice.app
Interface AppContext


public interface AppContext

app context, as passed to IApp.init(AppContext). This provides the app with access to its environment, as supplied by the JUICe application framework.

Version:
$Id: AppContext.java 2751 2008-02-09 10:35:49Z rob $
Author:
Rob Dickens

Method Summary
 String[] getArgs()
          in the case of an applet, those named arg0, arg1, etc.
 Exe getCancelExe()
          the built-in Exe for interrupting the command (ICmd.IDisj) currently running in the background.
 Container getContentPane()
          corresponds to the getContentPane() of JFrame and JApplet.
 Exe.Tog getEnableSoundEffectsExe()
          enables audible feedback if execution of any ICmd throws an exception.
 JMenuBar getMenuBar()
          corresponds to the getJMenuBar() of JFrame and JApplet, except that here the JMenuBar is created for you.
 Exe.Tog getMuteExe()
          See TheAlertsController.setMuted(boolean).
 AbstractButton[] getPlafButtons()
          for changing the platform look-and-feel.
 AbstractButton[] getPlafMenuItems()
          for changing the platform look-and-feel.
 Exe getQuitExe()
          the built-in Exe for exiting the application.
 Container getRoot()
          the root JFrame or JApplet (depending on whether the app is run as an application or an applet).
 JRootPane getRootPane()
          corresponds to the getRootPane() of JFrame and JApplet.
 Exe getTestBeepExe()
          See TheAlertsController.beep().
 Exe.Tog getUseSystemBeepExe()
          See TheAlertsController.setUseSystemBeep(boolean).
 boolean isApplet()
          indicates whether the app is running as an application or applet.
 void setConfirmQuitReason(String text)
          sets the opening text of the prompt displayed by the quit Exe.
 void setMsgLine(MsgLine msgLine)
          displays messages from JUICe Cmds.
 

Method Detail

getArgs

String[] getArgs()
in the case of an applet, those named arg0, arg1, etc.

Returns:
an empty array if there aren't any

getMenuBar

JMenuBar getMenuBar()
corresponds to the getJMenuBar() of JFrame and JApplet, except that here the JMenuBar is created for you.


getCancelExe

Exe getCancelExe()
the built-in Exe for interrupting the command (ICmd.IDisj) currently running in the background.


getQuitExe

Exe getQuitExe()
the built-in Exe for exiting the application. Note that this does nothing in the case of an applet.


getRootPane

JRootPane getRootPane()
corresponds to the getRootPane() of JFrame and JApplet.


getContentPane

Container getContentPane()
corresponds to the getContentPane() of JFrame and JApplet.


getRoot

Container getRoot()
the root JFrame or JApplet (depending on whether the app is run as an application or an applet).


setConfirmQuitReason

void setConfirmQuitReason(String text)
sets the opening text of the prompt displayed by the quit Exe. By default (or if null is supplied), the user is not prompted.

Parameters:
text - e.g. "Still Connected!"

getPlafButtons

AbstractButton[] getPlafButtons()
for changing the platform look-and-feel.


getPlafMenuItems

AbstractButton[] getPlafMenuItems()
for changing the platform look-and-feel.


isApplet

boolean isApplet()
indicates whether the app is running as an application or applet.


getMuteExe

Exe.Tog getMuteExe()
See TheAlertsController.setMuted(boolean).


getTestBeepExe

Exe getTestBeepExe()
See TheAlertsController.beep().


getUseSystemBeepExe

Exe.Tog getUseSystemBeepExe()
See TheAlertsController.setUseSystemBeep(boolean).


getEnableSoundEffectsExe

Exe.Tog getEnableSoundEffectsExe()
enables audible feedback if execution of any ICmd throws an exception.


setMsgLine

void setMsgLine(MsgLine msgLine)
displays messages from JUICe Cmds.


JUICe

Copyright © 2001-2008 Latterfrosken Software Development Limited. All Rights Reserved.