org.jgroups.demos

Class Draw

Implemented Interfaces:
ActionListener, ChannelListener

public class Draw
extends java.lang.Object
implements 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(String props, boolean debug, boolean cummulative, boolean no_channel, boolean jmx)

Method Summary

void
actionPerformed(ActionEvent e)
void
channelClosed(Channel channel)
void
channelConnected(Channel channel)
void
channelDisconnected(Channel channel)
void
channelReconnected(Address addr)
void
channelShunned()
void
clearPanel()
String
getGroupName()
void
go()
static void
main(String[] args)
void
mainLoop()
void
sendClearPanelMsg()
void
setGroupName(String groupname)

Constructor Details

Draw

public Draw(String props,
            boolean debug,
            boolean cummulative,
            boolean no_channel,
            boolean jmx)
            throws Exception

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)

channelClosed

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

channelConnected

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

channelDisconnected

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

channelReconnected

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

channelShunned

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

clearPanel

public void clearPanel()

getGroupName

public String getGroupName()

go

public void go()
            throws Exception

main

public static void main(String[] args)

mainLoop

public void mainLoop()

sendClearPanelMsg

public void sendClearPanelMsg()

setGroupName

public void setGroupName(String groupname)

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.