org.eclipse.amp.axf.view
Class SWTAsyncModelListener

java.lang.Object
  extended by org.eclipse.amp.axf.core.AbstractLifecycleListener
      extended by org.eclipse.amp.axf.view.SWTThreadModelListener
          extended by org.eclipse.amp.axf.view.SWTAsyncModelListener
All Implemented Interfaces:
ILifeCycleListener, IStateListener
Direct Known Subclasses:
EditPartListener, StatusLineView

public abstract class SWTAsyncModelListener
extends SWTThreadModelListener

The listener interface for receiving SWTAsyncModel events. The class that is interested in processing a SWTAsyncModel event implements this interface, and the object created with that class is registered with a component using the component's addSWTAsyncModelListener method. When the SWTAsyncModel event occurs, that object's appropriate method is invoked.

See Also:
SWTAsyncModelEvent

Constructor Summary
SWTAsyncModelListener(org.eclipse.swt.widgets.Control widget, java.lang.String name)
          Instantiates a new sWT async model listener.
SWTAsyncModelListener(org.eclipse.swt.widgets.Control widget, java.lang.String name, long updatePeriod)
          Instantiates a new sWT async model listener.
 
Method Summary
 void beginPainting()
          Begin painting.
 void endPainting()
          End painting.
 void forceModelNotify(IModel model)
          Force model notify.
 boolean isWaitForUpdate()
          Checks if is wait for paint.
 void setWaitForUpdate(boolean waitForPaint)
          Sets the wait for paint.
 void stateChange(java.lang.Object key, java.lang.Object observed)
          Notifies that the model has had some kind of state or observation status change.
 
Methods inherited from class org.eclipse.amp.axf.view.SWTThreadModelListener
getWidget, setWidget, update
 
Methods inherited from class org.eclipse.amp.axf.core.AbstractLifecycleListener
getListener, getName, observationEnd, observationEnding, observeCreate, observeInitialize, observeStart, observeStop, observeUpdate, observing, setName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SWTAsyncModelListener

public SWTAsyncModelListener(org.eclipse.swt.widgets.Control widget,
                             java.lang.String name)
Instantiates a new sWT async model listener.

Parameters:
widget - the widget
name - the name

SWTAsyncModelListener

public SWTAsyncModelListener(org.eclipse.swt.widgets.Control widget,
                             java.lang.String name,
                             long updatePeriod)
Instantiates a new sWT async model listener.

Parameters:
widget - the widget
name - the name
updatePeriod - the update period
Method Detail

stateChange

public void stateChange(java.lang.Object key,
                        java.lang.Object observed)
Description copied from interface: IStateListener
Notifies that the model has had some kind of state or observation status change.

Specified by:
stateChange in interface IStateListener
Overrides:
stateChange in class AbstractLifecycleListener
Parameters:
key -
observed -
See Also:
AbstractLifecycleListener.stateChange(java.lang.Object, java.lang.Object)

forceModelNotify

public void forceModelNotify(IModel model)
Force model notify.

Parameters:
model - the model

beginPainting

public void beginPainting()
Begin painting.


endPainting

public void endPainting()
End painting.


setWaitForUpdate

public void setWaitForUpdate(boolean waitForPaint)
Sets the wait for paint.

Parameters:
waitForPaint - the new wait for paint

isWaitForUpdate

public boolean isWaitForUpdate()
Checks if is wait for paint.

Returns:
true, if is wait for paint