| org.cougaar.planning.plugin.legacy.SimplePlugin org.cougaar.mlm.debug.ui.UIPlugin
UIPlugin | public class UIPlugin extends SimplePlugin implements UISubscriber(Code) | | This is an example of a User Interface Plugin.
It allows the user to specify the cluster from which
to obtain information, and the type of information to display:
log plan, expandable tasks, allocatable workflows,
assets (assigned to the cluster), and asset schedules (schedules
for assets allocated by the cluster).
The plan, tasks, and workflows are displayed as trees, and the
assets and scheduled assets are displayed as bar graphs.
The information displayed is monitored (if from a local cluster) for
additions, changes, and deletions, and the displays are updated.
This currently assumes there is only one plan ("Reality").
Future: When multiple plans are supported, the plans in each
cluster should be displayed, and the user should
select a plan for which to obtain information.
This extends GenericPluginAdapter which provides the plugin
state transition methods. It implements the
UserInterfacePluginServesComponent interface which has one method,
serveUserInterfaceComponent which gets a reference to the component,
used later to obtain cluster object factories and cluster collections.
|
execute | public void execute()(Code) | | Called when any cluster collection has changed. Check which
cluster collections have changed and notify the subscriber.
Synchronized to prevent execute from running before subscribe
"records" the subscriber and their subscription.
|
getPhysicalAssetNames | public Vector getPhysicalAssetNames()(Code) | | |
getPlan | Plan getPlan(String planName)(Code) | | Get named plan. Return the only plan for now.
|
rawSubscribe | void rawSubscribe(UISubscriber uiSubscriber, UnaryPredicate predicate)(Code) | | do the work of subscribe() above. It is up to the caller to
be careful of transaction issues.
|
setupSubscriptions | protected void setupSubscriptions()(Code) | | |
subscribe | void subscribe(UISubscriber uiSubscriber, UnaryPredicate predicate)(Code) | | Called to subscribe to a cluster collection specified by the predicate.
When the cluster collection has changed, the uiPlugin will notify the
subscriber. Thus, all uiPlugin threads call this method to subscribe
to collections of their choice, and the uiPlugin notifies each when
its subscription has changed.
Synchronized to prevent execute from running before subscribe
"records" the subscriber and their subscription.
Carefully opens a transaction and then calls the lowlevel routine
rawSubscribe.
|
subscriptionChanged | public synchronized void subscriptionChanged(IncrementalSubscription container)(Code) | | UISubscriber interface.
Notified when an asset is added, removed, or changed
and update our lists of all assets and cluster assets.
|
|
|