JMACS

org.jmacs
Interface IMonitorGui.IContext

Enclosing interface:
IMonitorGui

public static interface IMonitorGui.IContext

passed to monitor windows implementing IMonitorGui.IContextAware, allowing them to submit commands. Note that, in contrast to when using IControlsGui.IContext, another command MAY be submitted before the previous one has been executed. This is because, here, submissions are intended to be initiated programmatically--by a IMonitorGui.refresh(Object)--rather than interactively--by the user--and must be queued rather than being discarded if the previous command hasn't yet been executed. However, in some cases, it may be appropriate to replace a previously submitted command if this is still in the queue, in which case the id returned when that was submitted should be supplied with the new command.


Method Summary
 int submitCmd(Serializable cmd)
          submits cmd, placing it in a queue if a previous one has yet to complete.
 void submitCmd(Serializable cmd, int id)
          as submitCmd(Serializable) but replaces any queued command having the same id.
 

Method Detail

submitCmd

int submitCmd(Serializable cmd)
submits cmd, placing it in a queue if a previous one has yet to complete. Only to be called from the Swing dispatch thread. The result will be passed to resHandler.handleResult (by the dispatch thread).

Returns:
id may be supplied when executing a command in future, in case cmd might still be in the queue, and should be replaced with the new one

submitCmd

void submitCmd(Serializable cmd,
               int id)
as submitCmd(Serializable) but replaces any queued command having the same id.


JMACS

jmacs.org