visad
Class RemoteSlaveDisplayImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by visad.RemoteSlaveDisplayImpl
All Implemented Interfaces:
MouseListener, MouseMotionListener, Serializable, Remote, EventListener, RemoteSlaveDisplay

public class RemoteSlaveDisplayImpl
extends UnicastRemoteObject
implements RemoteSlaveDisplay, MouseListener, MouseMotionListener

RemoteSlaveDisplayImpl is an implementation of a slaved display that receives its images from a RemoteDisplay (via RMI).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteSlaveDisplayImpl(RemoteDisplay d)
          Construct a new slaved display linked to the given RemoteDisplay
 
Method Summary
 void addDisplayListener(DisplayListener l)
          Add a display listener to this slave display.
 JComponent getComponent()
          Get this slave display's component, for adding to a user interface
 BufferedImage getImage()
          Get this slave display's current image
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void removeDisplayListener(DisplayListener l)
          Remove a display listener from this slave display
 void sendImage(int[] pixels, int width, int height, int type)
          Update this slave display with the given RLE-encoded image pixels
 void sendMessage(String message)
          Send the given message to this slave display
 void unlink()
          Remove the link from this slaved display to its remote display
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteSlaveDisplayImpl

public RemoteSlaveDisplayImpl(RemoteDisplay d)
                       throws VisADException,
                              RemoteException
Construct a new slaved display linked to the given RemoteDisplay

Throws:
VisADException
RemoteException
Method Detail

unlink

public void unlink()
            throws VisADException,
                   RemoteException
Remove the link from this slaved display to its remote display

Throws:
VisADException
RemoteException

getComponent

public JComponent getComponent()
Get this slave display's component, for adding to a user interface


addDisplayListener

public void addDisplayListener(DisplayListener l)
Add a display listener to this slave display. The following display events are supported:


removeDisplayListener

public void removeDisplayListener(DisplayListener l)
Remove a display listener from this slave display


getImage

public BufferedImage getImage()
Get this slave display's current image


sendImage

public void sendImage(int[] pixels,
                      int width,
                      int height,
                      int type)
               throws RemoteException
Update this slave display with the given RLE-encoded image pixels

Specified by:
sendImage in interface RemoteSlaveDisplay
Throws:
RemoteException

sendMessage

public void sendMessage(String message)
                 throws RemoteException
Send the given message to this slave display

Specified by:
sendMessage in interface RemoteSlaveDisplay
Throws:
RemoteException

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener