org.jgroups.demos.wb

Class Whiteboard

public class Whiteboard extends Applet implements ActionListener, MessageListener, MembershipListener, ComponentListener, FocusListener

Shared whiteboard: members are represented by rectangles that contain their names and the OS/arch of the machine they are working on. The boxes can be moved by anyone and by clicking on them, messages can be sent to specific or all members. Whiteboard is both an application and an applet.

Author: Bela Ban

Field Summary
RpcDispatcherdisp
static Stringgroupname
Constructor Summary
Whiteboard()
Whiteboard(String properties)
Method Summary
voidactionPerformed(ActionEvent e)
voidaddNode(String lbl, Address addr, int xloc, int yloc)
voidblock()
voidcomponentHidden(ComponentEvent e)
voidcomponentMoved(ComponentEvent e)
voidcomponentResized(ComponentEvent e)
voidcomponentShown(ComponentEvent e)
voiddestroy()
voiddisplayMessage(String sender, String msg)
voidfocusGained(FocusEvent e)
voidfocusLost(FocusEvent e)
byte[]getState()
voidinit()
static voidmain(String[] args)
voidmoveNode(Node n)
voidreceive(Message m)
voidremoveNode(Object addr)
voidrepaint()
voidsetState(byte[] new_state)
voidsuspect(Address obj)
voidviewAccepted(View v)

Field Detail

disp

public RpcDispatcher disp

groupname

public static final String groupname

Constructor Detail

Whiteboard

public Whiteboard()

Whiteboard

public Whiteboard(String properties)

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)

addNode

public void addNode(String lbl, Address addr, int xloc, int yloc)

block

public void block()

componentHidden

public void componentHidden(ComponentEvent e)

componentMoved

public void componentMoved(ComponentEvent e)

componentResized

public void componentResized(ComponentEvent e)

componentShown

public void componentShown(ComponentEvent e)

destroy

public void destroy()

displayMessage

public void displayMessage(String sender, String msg)

focusGained

public void focusGained(FocusEvent e)

focusLost

public void focusLost(FocusEvent e)

getState

public byte[] getState()

init

public void init()

main

public static void main(String[] args)

moveNode

public void moveNode(Node n)

receive

public void receive(Message m)

removeNode

public void removeNode(Object addr)

repaint

public void repaint()

setState

public void setState(byte[] new_state)

suspect

public void suspect(Address obj)

viewAccepted

public void viewAccepted(View v)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.