|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.collab.DisplayMonitorImpl
public class DisplayMonitorImpl
DisplayMonitorImpl is the Display
monitor
implementation.
DisplayMonitorImpl is not Serializable
and
should not be copied between JVMs.
Field Summary |
---|
Fields inherited from interface visad.collab.DisplayMonitor |
---|
UNKNOWN_LISTENER_ID |
Constructor Summary | |
---|---|
DisplayMonitorImpl(DisplayImpl dpy)
Creates a monitor for the specified Display . |
Method Summary | |
---|---|
void |
addListener(MonitorCallback listener,
int id)
Adds the specified listener to receive MonitorEvents
when the monitored Display's state changes. |
void |
addListener(RemoteDisplay rmtDpy,
int id)
Adds the specified remote display to receive MonitorEvents
when the monitored Display's state changes. |
void |
addRemoteListener(RemoteDisplay rd)
Initializes links so that MonitorEvents will be
exchanged with the specified remote Display . |
int |
checkID(int id)
Returns a suggestion for a unique listener identifier which is equal to or greater than the supplied ID. |
void |
controlChanged(ControlEvent evt)
Handles Control changes. |
void |
controlChanged(ScalarMapControlEvent evt)
Handles ScalarMap control changes. |
void |
destroy()
destroy this monitor |
void |
displayChanged(DisplayEvent evt)
Handles notification of objects being added to or removed from the Display . |
int |
getConnectionID(RemoteDisplay rmtDpy)
Return the ID associated with the specified RemoteDisplay. |
boolean |
hasEventQueued(Control ctl)
Returns true if there is a MonitorEvent
for the specified Control waiting to be delivered to
any listener. |
boolean |
hasEventQueued(int listenerID,
Control ctl)
Returns true if there is a MonitorEvent
for the specified Control waiting to be delivered to the
listener with the specified id. |
boolean |
isEmpty()
|
void |
mapChanged(ScalarMapEvent evt)
Handles ScalarMap data changes. |
void |
notifyListeners(MonitorEvent evt)
Forwards the MonitorEvent to all the listeners
associated with this DisplayMonitor . |
void |
receiveMessage(MessageEvent msg)
Handles MessageEvent forwarding. |
void |
removeListener(MonitorCallback l)
Stops forwarding MonitorEvent s to the specified listener. |
void |
setDisplaySync(DisplaySync sync)
Set the display synchronization object for this display |
String |
toString()
Returns the name of this DisplayMonitor . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DisplayMonitorImpl(DisplayImpl dpy)
Display
.
dpy
- The Display
to monitor.Method Detail |
---|
public void addListener(MonitorCallback listener, int id) throws RemoteException, VisADException
MonitorEvents
when the monitored Display's
state changes.
addListener
in interface DisplayMonitor
listener
- The listener to add.id
- The unique listener identifier.
VisADException
- If the listener Vector
is uninitialized.
RemoteException
- If there was an RMI-related problem.public void addListener(RemoteDisplay rmtDpy, int id) throws RemoteException, VisADException
MonitorEvents
when the monitored Display's
state changes.
addListener
in interface DisplayMonitor
rmtDpy
- The remote display to add.id
- The unique listener identifier.
VisADException
- If the listener Vector
is uninitialized.
RemoteException
- If there was an RMI-related problem.public void addRemoteListener(RemoteDisplay rd) throws RemoteException, RemoteVisADException
MonitorEvents
will be
exchanged with the specified remote Display
.
addRemoteListener
in interface DisplayMonitor
rd
- The remote Display
to synchronize.
RemoteException
- If there was an RMI-related problem.
RemoteVisADException
- If the inter-Display
links could not be made.public int checkID(int id)
checkID
in interface DisplayMonitor
id
- The identifier to check.public void controlChanged(ControlEvent evt)
Control
changes.ControlEvent
is not ignored, a
ControlMonitorEvent
will be sent to all listeners.
controlChanged
in interface ControlListener
evt
- The details of the Control
change.public void controlChanged(ScalarMapControlEvent evt)
controlChanged
in interface ScalarMapListener
evt
- The details of the ScalarMap
change.public void destroy()
destroy
in interface DisplayMonitor
public void displayChanged(DisplayEvent evt)
Display
.DisplayEvent
is not ignored, a
MapMonitorEvent
or ReferenceMonitorEvent
will be sent to all listeners.
displayChanged
in interface DisplayListener
evt
- The details of the Display
change.public int getConnectionID(RemoteDisplay rmtDpy)
getConnectionID
in interface DisplayMonitor
public boolean hasEventQueued(Control ctl)
MonitorEvent
for the specified Control
waiting to be delivered to
any listener.
hasEventQueued
in interface DisplayMonitor
ctl
- The Control
being found.public boolean hasEventQueued(int listenerID, Control ctl)
MonitorEvent
for the specified Control
waiting to be delivered to the
listener with the specified id.
hasEventQueued
in interface DisplayMonitor
listenerID
- The identifier for the listener.ctl
- The Control
being found.public boolean isEmpty()
isEmpty
in interface DisplayMonitor
public void mapChanged(ScalarMapEvent evt)
ScalarMapEvent
is not ignored, a
MapMonitorEvent
will be sent to all listeners.
mapChanged
in interface ScalarMapListener
evt
- The details of the ScalarMap
change.public void notifyListeners(MonitorEvent evt)
MonitorEvent
to all the listeners
associated with this DisplayMonitor
.
notifyListeners
in interface DisplayMonitor
evt
- The event to forward.public void receiveMessage(MessageEvent msg)
receiveMessage
in interface MessageListener
msg
- The message to forward.public void removeListener(MonitorCallback l)
MonitorEvent
s to the specified listener.
l
- Listener to remove.public void setDisplaySync(DisplaySync sync)
setDisplaySync
in interface DisplayMonitor
public String toString()
DisplayMonitor
.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |