JHotDraw 7rev733

org.jhotdraw.gui
Class ActivityManager

java.lang.Object
  extended by org.jhotdraw.gui.ActivityManager

public class ActivityManager
extends java.lang.Object

The activity manager keeps track of all active ActivityModel objects.


Design Patterns

Framework
The interfaces and classes listed below define a framework for progress management.
Contract: ActivityManager, ActivityModel, JActivityWindow, JActivityIndicator.

Version:
1.0 2011-09-07 Created.
Author:
Werner Randelshofer

Constructor Summary
ActivityManager()
           
 
Method Summary
 void add(ActivityModel pm)
          Adds a progress model to the manager.
 void addActivityManagerListener(ActivityManagerListener l)
          Adds a listener to the progress manager.
 java.util.ArrayList<ActivityModel> getActivityModels()
           
static ActivityManager getInstance()
           
protected static void invokeAndWait(java.lang.Runnable r)
          Invokes a runnable on the EDT and wait until it is finished.
 void remove(ActivityModel pm)
          Removes a progress model from the manager.
 void removeActivityManagerListener(ActivityManagerListener l)
          Removes a listener from the progress manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityManager

public ActivityManager()
Method Detail

getInstance

public static ActivityManager getInstance()

addActivityManagerListener

public void addActivityManagerListener(ActivityManagerListener l)
Adds a listener to the progress manager.


removeActivityManagerListener

public void removeActivityManagerListener(ActivityManagerListener l)
Removes a listener from the progress manager.


add

public void add(ActivityModel pm)
Adds a progress model to the manager. This method is thread safe.


remove

public void remove(ActivityModel pm)
Removes a progress model from the manager. This method is thread safe.


getActivityModels

public java.util.ArrayList<ActivityModel> getActivityModels()

invokeAndWait

protected static void invokeAndWait(java.lang.Runnable r)
Invokes a runnable on the EDT and wait until it is finished. FIXME - Maybe move this into a utility class?


Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.