JMACS

org.jmacs
Interface IControlsGui


public interface IControlsGui

control panel GUI, for controlling a given device. Implementations should also implement IResultHandler if they wish to access the results of commands submitted, and IExceptionHandler, any exception thrown. A public constructor is required, optionally taking an argument of type Object, corr'ding to the constants passed to the IDi.AbstractFactory.createDi method invoked when deploying the device.

Version:
$Id: IControlsGui.java 2768 2008-02-09 15:24:41Z 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 Exception
invoked by listener set by setActionListener.

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

JMACS

jmacs.org