i3mclient.discussion
Class DiscussionGUI

java.lang.Object
  |
  +--i3mclient.discussion.DiscussionGUI
All Implemented Interfaces:
DiscussionListener, DisposeListener, EventListener, ModifyListener, SelectionListener, ShapeBoardListener, org.eclipse.swt.internal.SWTEventListener

public class DiscussionGUI
extends Object
implements ModifyListener, DiscussionListener, SelectionListener, ShapeBoardListener, DisposeListener

The discussion window.

Author:
Dirk Plate
See Also:
Discussion

Constructor Summary
DiscussionGUI(Display parentWindow, long discussionID)
          Constructor.
 
Method Summary
 void addFormListener(FormListener listener)
          Add a listener to formlistenerlist.
 Discussion getDiscussion()
          Returns a reference of the discussion.
 UserList getDiscussionMemberList()
          Return the discussionMemberList
 String getSelectedText()
          Must return the selected text (workaround).
 ShapeBoard getShapeBoard()
          Returns a reference to shapeboard.
 Shell getWindow()
          Returns the shell.
 void historyElementAdded(HistoryElement historyElement)
          Called if a new line was added to history.
 void messageSendSuccessfully()
          Called if sending of a message was successfull.
 void modifyText(ModifyEvent event)
           
 void removeFormListener(FormListener listener)
          Remove a listener to formlistenerlist.
 void resizeHistory(int newHeight)
          Resize history.
 void resizeShapeBoard(int newWidth)
          Resize shapeboard.
 void shapeBoardChanged(Vector shapes)
          Called when shape board changed.
 void widgetDefaultSelected(SelectionEvent arg0)
           
 void widgetDisposed(DisposeEvent arg0)
           
 void widgetSelected(SelectionEvent event)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscussionGUI

public DiscussionGUI(Display parentWindow,
                     long discussionID)
Constructor.

Parameters:
parentWindow - The parent window of this discussion
discussionID - The discussionID of this discussion
Method Detail

addFormListener

public void addFormListener(FormListener listener)
Add a listener to formlistenerlist.

Parameters:
listener - The listener which will be called

removeFormListener

public void removeFormListener(FormListener listener)
Remove a listener to formlistenerlist.

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

historyElementAdded

public void historyElementAdded(HistoryElement historyElement)
Description copied from interface: DiscussionListener
Called if a new line was added to history.

Specified by:
historyElementAdded in interface DiscussionListener
Parameters:
historyElement - The new element in history

messageSendSuccessfully

public void messageSendSuccessfully()
Description copied from interface: DiscussionListener
Called if sending of a message was successfull.

Specified by:
messageSendSuccessfully in interface DiscussionListener

modifyText

public void modifyText(ModifyEvent event)
Specified by:
modifyText in interface ModifyListener

getDiscussion

public Discussion getDiscussion()
Returns a reference of the discussion.

Returns:
The discussion which belongs to this discussionGUI

getShapeBoard

public ShapeBoard getShapeBoard()
Returns a reference to shapeboard.

Returns:
The shapeboard which belongs to this discussion

getWindow

public Shell getWindow()
Returns the shell.

Returns:
The shell of this discussion

resizeShapeBoard

public void resizeShapeBoard(int newWidth)
Resize shapeboard.

Parameters:
newWidth - The new size of the shapeboard

resizeHistory

public void resizeHistory(int newHeight)
Resize history.

Parameters:
newHeight - The new height of the history

widgetSelected

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

widgetDefaultSelected

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

shapeBoardChanged

public void shapeBoardChanged(Vector shapes)
Description copied from interface: ShapeBoardListener
Called when shape board changed.

Specified by:
shapeBoardChanged in interface ShapeBoardListener
Parameters:
shapes - The new shapes on the shapeboard

widgetDisposed

public void widgetDisposed(DisposeEvent arg0)
Specified by:
widgetDisposed in interface DisposeListener

getDiscussionMemberList

public UserList getDiscussionMemberList()
Return the discussionMemberList

Returns:
The discussion member list of this discussion

getSelectedText

public String getSelectedText()
Description copied from interface: DiscussionListener
Must return the selected text (workaround).

Specified by:
getSelectedText in interface DiscussionListener
Returns:
The text which current selected in history