org.fuin.jmsmvc4swing.base
Class ControllerResultBusyAdapter<T extends javax.swing.JComponent>

java.lang.Object
  extended by org.fuin.jmsmvc4swing.base.ControllerResultBusyAdapter<T>
Type Parameters:
T - The type of the UI to be locked.
All Implemented Interfaces:
BusyConfigurable, ControllerResultListener

public class ControllerResultBusyAdapter<T extends javax.swing.JComponent>
extends java.lang.Object
implements ControllerResultListener, BusyConfigurable

Maps the received controller events to a JBusyComponent. The UI will be locked when started() is called and unlocked when failed(Exception) or succeded() is called. The Adapter can be configured with the configure(Cancelable, boolean) method to show a progress bar and a "cancel" control.


Constructor Summary
ControllerResultBusyAdapter(org.divxdede.swing.busy.JBusyComponent<T> busyComponent)
          Constcructor with the UI to be locked.
 
Method Summary
 void configure(Cancelable cancelable, boolean determinate)
          Changes the underlying busy model.
 void failed(java.lang.Exception ex)
          Work was interrupted by an exception.
 void progress(ProgressInfo progressInfo)
          Controller signals progress.
 void started()
          Controller started working.
 void succeded()
          Controller finished work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerResultBusyAdapter

public ControllerResultBusyAdapter(org.divxdede.swing.busy.JBusyComponent<T> busyComponent)
Constcructor with the UI to be locked.

Parameters:
busyComponent - Component to be locked.
Method Detail

configure

public final void configure(Cancelable cancelable,
                            boolean determinate)
Changes the underlying busy model.

Specified by:
configure in interface BusyConfigurable
Parameters:
cancelable - The instance to be cancelled if the "cancel" UI control is pressed.
determinate - If a progress bar should be visible TRUE else FALSE.

started

public final void started()
Controller started working.

Specified by:
started in interface ControllerResultListener

progress

public final void progress(ProgressInfo progressInfo)
Controller signals progress.

Specified by:
progress in interface ControllerResultListener
Parameters:
progressInfo - Progress informations.

failed

public final void failed(java.lang.Exception ex)
Work was interrupted by an exception.

Specified by:
failed in interface ControllerResultListener
Parameters:
ex - Cause.

succeded

public final void succeded()
Controller finished work.

Specified by:
succeded in interface ControllerResultListener


Copyright © 2009 Future Invent Informationsmanagement GmbH. All Rights Reserved.