i3mclient.discussion
Class Discussion

java.lang.Object
  |
  +--i3mclient.discussion.Discussion
All Implemented Interfaces:
EventListener, FormListener, MessageListener, SelectionListener, ServerMethodListener, ShellListener, SMLeaveDiscussionListener, SMSendMessageListener, org.eclipse.swt.internal.SWTEventListener, VerifyKeyListener

public class Discussion
extends Object
implements SelectionListener, FormListener, MessageListener, ShellListener, VerifyKeyListener, SMSendMessageListener, SMLeaveDiscussionListener

Logic for DiscussionGUI.

Author:
Dirk Plate
See Also:
DiscussionGUI

Constructor Summary
Discussion(long discussionIDSet)
          Constructor.
 
Method Summary
 void addDiscussionListener(DiscussionListener listener)
          Add a listener for discussion.
 long getDiscussionID()
          Returns current discussionID.
 void i3mServerException(I3MServerException exception)
          Called if a server exception is thrown.
 void init(Shell windowSet)
          Init rest.
 void itemModified(Widget widget, Widget item)
          Called when a form item changed.
 void leaveDiscussionDone(long discussionID)
          Called if leaveDiscussion was successfull.
 void messageReceived(MessageData message)
          Called if Polling receives a new message from Server.
 void removeDiscussionListener(DiscussionListener listener)
          Remove a listener for discussion.
 void sendMessageDone(MessageData message)
          Called if sendMessage was successfull.
 void shellActivated(ShellEvent arg0)
           
 void shellClosed(ShellEvent event)
           
 void shellDeactivated(ShellEvent arg0)
           
 void shellDeiconified(ShellEvent arg0)
           
 void shellIconified(ShellEvent arg0)
           
 void verifyKey(VerifyEvent event)
           
 void widgetDefaultSelected(SelectionEvent arg0)
           
 void widgetSelected(SelectionEvent event)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Discussion

public Discussion(long discussionIDSet)
Constructor.

Parameters:
discussionIDSet - The discussionID of this discussion
Method Detail

init

public void init(Shell windowSet)
Init rest. Enable listener in polling.

Parameters:
windowSet - The shell of this discussion

addDiscussionListener

public void addDiscussionListener(DiscussionListener listener)
Add a listener for discussion.

Parameters:
listener - The listener which will be called

removeDiscussionListener

public void removeDiscussionListener(DiscussionListener listener)
Remove a listener for discussion.

Parameters:
listener - The listener which will be no longer called

widgetSelected

public void widgetSelected(SelectionEvent event)
Specified by:
widgetSelected in interface SelectionListener

widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent arg0)
Specified by:
widgetDefaultSelected in interface SelectionListener

itemModified

public void itemModified(Widget widget,
                         Widget item)
Description copied from interface: FormListener
Called when a form item changed.

Specified by:
itemModified in interface FormListener
Parameters:
widget - The widget which was changed
item - The item of the widget which was changed

messageReceived

public void messageReceived(MessageData message)
Description copied from interface: MessageListener
Called if Polling receives a new message from Server.

Specified by:
messageReceived in interface MessageListener
Parameters:
message - The new received message

getDiscussionID

public long getDiscussionID()
Returns current discussionID.

Returns:
The discussionID of this discussion

shellActivated

public void shellActivated(ShellEvent arg0)
Specified by:
shellActivated in interface ShellListener

shellClosed

public void shellClosed(ShellEvent event)
Specified by:
shellClosed in interface ShellListener

shellDeactivated

public void shellDeactivated(ShellEvent arg0)
Specified by:
shellDeactivated in interface ShellListener

shellDeiconified

public void shellDeiconified(ShellEvent arg0)
Specified by:
shellDeiconified in interface ShellListener

shellIconified

public void shellIconified(ShellEvent arg0)
Specified by:
shellIconified in interface ShellListener

verifyKey

public void verifyKey(VerifyEvent event)
Specified by:
verifyKey in interface VerifyKeyListener

sendMessageDone

public void sendMessageDone(MessageData message)
Description copied from interface: SMSendMessageListener
Called if sendMessage was successfull.

Specified by:
sendMessageDone in interface SMSendMessageListener
Parameters:
message - The message which was sent

i3mServerException

public void i3mServerException(I3MServerException exception)
Description copied from interface: ServerMethodListener
Called if a server exception is thrown.

Specified by:
i3mServerException in interface ServerMethodListener
Parameters:
exception - The converted I3M-server exception

leaveDiscussionDone

public void leaveDiscussionDone(long discussionID)
Description copied from interface: SMLeaveDiscussionListener
Called if leaveDiscussion was successfull.

Specified by:
leaveDiscussionDone in interface SMLeaveDiscussionListener
Parameters:
discussionID - The discussionID of the conference or chat we left