ccs.http
Class ControlPanel

java.lang.Object
  extended by ccs.http.ControlPanel

public class ControlPanel
extends java.lang.Object

One problem with browser-fronted systems is that all too frequently, the user inadvertently closes the browser window, leaving the application in a "zombie" state where it is still loaded, using resources, and active, but there is no way to communicate with it.

The ControlPanel implements a minimal conventional GUI for apps which are mainly browser-fronted, allowing the user to get round this.


Constructor Summary
ControlPanel(PanelKillable pk, java.lang.String title, java.lang.String icon)
          Create a new Control Panel.
 
Method Summary
 void launch()
          Display control panel.
 void setSubsystem(java.lang.String subsysID)
          Set the current subsystem.
 void setTalkUrl(java.lang.String url)
          The the URL for the "talk to me" function.
 void setTitle(java.lang.String title)
          Set the title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlPanel

public ControlPanel(PanelKillable pk,
                    java.lang.String title,
                    java.lang.String icon)
Create a new Control Panel.

Parameters:
pk - Your app.
title - Your app's title. This is washed through MsgHelper.
icon - The filename of your app's icon. This is resolved relative to the ~checkpoint/furniture folder.
Method Detail

launch

public void launch()
Display control panel. Do this early, before attempting to launch the browser or connect to Checkpoint (Daemon). It lets the user know something is happening.


setSubsystem

public void setSubsystem(java.lang.String subsysID)
Set the current subsystem. Where there are multiple instances of the same app running, knowing which subsys is which can help to distinguish between them.


setTitle

public void setTitle(java.lang.String title)
Set the title. Where there are multiple instances of a same app running, and the app has a customisable title to help with this situation, you'll want to be able to use it / change it. In this situation, the custom title may not be available initially (eg. the app has to load it from its database); create the ControlPanel using a generic or temporary title, and set it properly later.

Parameters:
title - Your app's title. This is washed through MsgHelper.

setTalkUrl

public void setTalkUrl(java.lang.String url)
The the URL for the "talk to me" function. Set this if / when the app is ready to talk via a browser.

Parameters:
url - The URL to call.