JMACS

org.jmacs
Interface IControlsGui


public interface IControlsGui

control panel GUI, for controlling a given device. Implementations should also implement IResultHandler if they submit commands and wish to access their results. A public constructor is required, optionally taking an argument of type Object, corr'ding to the constants passed to the ISpi.newDiClient method invoked when deploying the device.

Version:
$Id: IControlsGui.java 641 2006-07-04 16:14:08Z rob $
Author:
Rob Dickens

Nested Class Summary
static interface IControlsGui.IContext
          passed to IControlGuis, allowing them to submit commands.
 
Method Summary
 void actionPerformed(ActionEvent ae, IControlsGui.IContext context)
          invoked by listener set by setActionListener.
 JComponent getComponent()
          returns the root JComponent of the GUI.
 IControlsGui[] setActionListener(ActionListener listener)
          called once, first.
 

Method Detail

setActionListener

IControlsGui[] setActionListener(ActionListener listener)
called once, first.

Parameters:
listener - invokes actionPerformed
Returns:
any nested instances, or else null. These will then be assigned their own ActionListeners.

getComponent

JComponent getComponent()
returns the root JComponent of the GUI. Might be called more than once.


actionPerformed

void actionPerformed(ActionEvent ae,
                     IControlsGui.IContext context)
                     throws Throwable
invoked by listener set by setActionListener.

Parameters:
context - use to submit commands
Throws:
Throwable - This will be caught, and the user notified.

JMACS

jmacs.org