org.jgroups.demos
Class Draw

java.lang.Object
  extended byorg.jgroups.demos.Draw
All Implemented Interfaces:
java.awt.event.ActionListener, ChannelListener, java.util.EventListener

public class Draw
extends java.lang.Object
implements java.awt.event.ActionListener, ChannelListener

Shared whiteboard, each new instance joins the same group. Each instance chooses a random color, mouse moves are broadcast to all group members, which then apply them to their canvas

Author:
Bela Ban, Oct 17 2001

Constructor Summary
Draw(java.lang.String props, boolean debug, boolean cummulative, boolean no_channel, boolean jmx)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void channelClosed(Channel channel)
           
 void channelConnected(Channel channel)
           
 void channelDisconnected(Channel channel)
           
 void channelReconnected(Address addr)
           
 void channelShunned()
           
 void clearPanel()
           
 java.lang.String getGroupName()
           
 void go()
           
static void main(java.lang.String[] args)
           
 void mainLoop()
           
 void sendClearPanelMsg()
           
 void setGroupName(java.lang.String groupname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Draw

public Draw(java.lang.String props,
            boolean debug,
            boolean cummulative,
            boolean no_channel,
            boolean jmx)
     throws java.lang.Exception
Method Detail

getGroupName

public java.lang.String getGroupName()

setGroupName

public void setGroupName(java.lang.String groupname)

main

public static void main(java.lang.String[] args)

go

public void go()
        throws java.lang.Exception
Throws:
java.lang.Exception

mainLoop

public void mainLoop()

clearPanel

public void clearPanel()

sendClearPanelMsg

public void sendClearPanelMsg()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

channelConnected

public void channelConnected(Channel channel)
Specified by:
channelConnected in interface ChannelListener

channelDisconnected

public void channelDisconnected(Channel channel)
Specified by:
channelDisconnected in interface ChannelListener

channelClosed

public void channelClosed(Channel channel)
Specified by:
channelClosed in interface ChannelListener

channelShunned

public void channelShunned()
Specified by:
channelShunned in interface ChannelListener

channelReconnected

public void channelReconnected(Address addr)
Specified by:
channelReconnected in interface ChannelListener


Copyright ? 1998-2005 Bela Ban. All Rights Reserved.