ilog.views.swing
Class IlvThreadedActivityMonitorProperty

java.lang.Object
  extended by ilog.views.IlvNamedProperty
      extended by ilog.views.swing.IlvThreadedActivityMonitorProperty
All Implemented Interfaces:
IlvPersistentObject, Serializable

public class IlvThreadedActivityMonitorProperty
extends IlvNamedProperty

This class defines a named property that is used to store the monitored threaded activities in an IlvManager containing map data. Example of use:

 final IlvThreadedActivityMonitor mon = IlvThreadedActivityMonitorProperty.GetThreadedActivityMonitor(view.getManager());
 // Create a bean displaying the threaded activities
 IlvThreadedActivityMonitorPanel swingPanel=new IlvThreadedActivityMonitorPanel(mon);
 statusPanel.add(swingPanel, BorderLayout.LINE_END);
 ...
 Thread t=new Thread(new Runnable() {
   public void run() {
            Object activityID= ...;
                                                ...
             mon.updateActivityProgress(activityID,10,"10% done");
                                                ...
             mon.unregisterThreadedActivity(activityID);// or set progress to 100.
   }
 });

Since:
JViews 7.5
See Also:
Serialized Form

Field Summary
static String NAME
          The name of the property.
 
Constructor Summary
IlvThreadedActivityMonitorProperty(IlvThreadedActivityMonitor monitor)
          Creates a new IlvThreadedActivityMonitorProperty object with the specified activity monitor.
 
Method Summary
 IlvNamedProperty copy()
          Copies the property.
 IlvThreadedActivityMonitor getActivityMonitor()
          Returns the activity monitor of this property.
static IlvThreadedActivityMonitor GetThreadedActivityMonitor(IlvManager manager)
          Returns the activity monitor of a manager (creates one if necessary).
 boolean isPersistent()
          Returns true if the property can be saved.
 void write(IlvOutputStream stream)
          Writes the property to an IlvOutputStream.
 
Methods inherited from class ilog.views.IlvNamedProperty
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
The name of the property.

See Also:
Constant Field Values
Constructor Detail

IlvThreadedActivityMonitorProperty

public IlvThreadedActivityMonitorProperty(IlvThreadedActivityMonitor monitor)
Creates a new IlvThreadedActivityMonitorProperty object with the specified activity monitor.

Parameters:
monitor - activity monitor.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the property to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvNamedProperty
Parameters:
stream - The output stream.
Throws:
IOException - if an I/O exception occurs.

copy

public IlvNamedProperty copy()
Copies the property.

Specified by:
copy in class IlvNamedProperty
Returns:
a new IlvThreadedActivityMonitorProperty

isPersistent

public boolean isPersistent()
Returns true if the property can be saved.

Specified by:
isPersistent in class IlvNamedProperty
Returns:
true.

getActivityMonitor

public IlvThreadedActivityMonitor getActivityMonitor()
Returns the activity monitor of this property.

Returns:
the activity monitor of this property.

GetThreadedActivityMonitor

public static IlvThreadedActivityMonitor GetThreadedActivityMonitor(IlvManager manager)
Returns the activity monitor of a manager (creates one if necessary).

Parameters:
manager - The manager.
Returns:
the activity monitor of this manager.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.