visad.collab
Class ControlMonitorEvent

java.lang.Object
  extended by visad.collab.MonitorEvent
      extended by visad.collab.ControlMonitorEvent
All Implemented Interfaces:
Serializable

public class ControlMonitorEvent
extends MonitorEvent

ControlMonitorEvent is the VisAD class for Control-related Events from display monitors. They are sourced by DisplayMonitor objects and received by MonitorCallback objects.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class visad.collab.MonitorEvent
CONTROL_CHANGED, CONTROL_INIT_REQUESTED, MAP_ADDED, MAP_CHANGED, MAP_REMOVED, MAPS_CLEARED, MESSAGE_SENT, REFERENCE_ADDED, REFERENCE_REMOVED, seqNum, type
 
Constructor Summary
ControlMonitorEvent(int type, Control ctl)
          Creates a ControlMonitorEvent for the specified Control.
ControlMonitorEvent(int type, int originator, Control ctl)
          Creates a ControlMonitorEvent for the specified Control.
 
Method Summary
 Object clone()
          Returns an exact clone of this object.
 boolean equals(Object o)
          Returns true if the specified object matches this object.
 Control getControl()
          Gets the Control to which this event refers.
static String getControlKey(Control ctl)
          Get the key used to uniquely identify this control.
 String getKey()
          Get the key used to uniquely identify this event.
 String toString()
          Returns a String representation of this object.
 
Methods inherited from class visad.collab.MonitorEvent
getOriginator, getSequenceNumber, getType, getTypeName, getTypeName, setOriginator
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ControlMonitorEvent

public ControlMonitorEvent(int type,
                           Control ctl)
                    throws VisADException
Creates a ControlMonitorEvent for the specified Control.

Parameters:
type - The event type (either MonitorEvent.CONTROL_INIT_REQUESTED or MonitorEvent.CONTROL_CHANGED.)
ctl - The Control.
Throws:
VisADException - When a bad type is specified.

ControlMonitorEvent

public ControlMonitorEvent(int type,
                           int originator,
                           Control ctl)
                    throws VisADException
Creates a ControlMonitorEvent for the specified Control.

Parameters:
type - The event type (either MonitorEvent.CONTROL_INIT_REQUESTED or MonitorEvent.CONTROL_CHANGED.)
originator - The ID of the connection from which this event came, relative to the receiver of the event.
ctl - The Control.
Throws:
VisADException - When a bad type is specified.
Method Detail

getControl

public Control getControl()
Gets the Control to which this event refers.


getControlKey

public static String getControlKey(Control ctl)
Get the key used to uniquely identify this control.

Returns:
The unique key.

getKey

public String getKey()
Get the key used to uniquely identify this event.

Specified by:
getKey in class MonitorEvent
Returns:
The unique key.

equals

public boolean equals(Object o)
Returns true if the specified object matches this object.

Overrides:
equals in class Object
Parameters:
o - The object to compare.

clone

public Object clone()
Returns an exact clone of this object.

Specified by:
clone in class MonitorEvent

toString

public String toString()
Returns a String representation of this object.

Overrides:
toString in class MonitorEvent