org.javagroups.demos
Class Draw

java.lang.Object
  extended byorg.javagroups.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 no_channel)
           
 
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()
           
 void go()
           
static void main(java.lang.String[] args)
           
 void mainLoop()
           
 void sendClearPanelMsg()
           
 
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 no_channel)
     throws java.lang.Exception
Method Detail

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 © 2001,2002 www.javagroups.com . All Rights Reserved.