org.eclipse.ecf.ui.views
Class ChatRoomView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.ecf.ui.views.ChatRoomView
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, IChatRoomInvitationListener, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
public class ChatRoomView
- extends org.eclipse.ui.part.ViewPart
- implements IChatRoomInvitationListener
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Method Summary |
protected void |
addParticipant(IUser p)
|
protected void |
appendText(ChatLine text)
|
protected void |
cleanUp()
|
protected void |
clearInput()
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
|
void |
dispose()
|
protected java.lang.String |
getCurrentDate(java.lang.String format)
|
protected java.lang.String |
getDateTime()
|
protected java.lang.String |
getMessageString(ID fromID,
java.lang.String text)
|
IChatRoomInfo |
getRoomInfo()
|
protected void |
handleEnter()
|
void |
handleInvitationReceived(ID roomID,
ID from,
java.lang.String subject,
java.lang.String body)
Handle notification of a received invitation to join chat room. |
void |
handleJoin(IUser user)
|
protected void |
handleKeyPressed(org.eclipse.swt.events.KeyEvent evt)
|
protected void |
handleKeyReleased(org.eclipse.swt.events.KeyEvent evt)
|
void |
handleLeave(IUser user)
|
void |
handleMessage(ID fromID,
java.lang.String messageBody)
|
void |
handlePresence(ID fromID,
IPresence presence)
|
protected void |
handleTextInput(java.lang.String text)
|
void |
handleUpdated(IUser user)
|
void |
initialize(IChatRoomViewCloseListener parent,
java.lang.String secondaryID,
IChatRoomContainer container,
IChatRoomInfo info,
IChatRoomMessageSender sender)
|
protected boolean |
isLocalUser(ID id)
|
protected void |
makeActions()
|
protected void |
outputClear()
|
protected void |
outputCopy()
|
protected void |
outputPaste()
|
protected void |
outputSelectAll()
|
protected void |
removeAllParticipants()
|
protected void |
removeLocalUser()
|
protected void |
removeParticipant(IUser p)
|
protected void |
setEnabled(boolean enabled)
|
void |
setFocus()
|
Methods inherited from class org.eclipse.ui.part.ViewPart |
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
VIEW_ID
public static final java.lang.String VIEW_ID
- See Also:
- Constant Field Values
DEFAULT_ME_COLOR
protected static final java.lang.String DEFAULT_ME_COLOR
- See Also:
- Constant Field Values
DEFAULT_OTHER_COLOR
protected static final java.lang.String DEFAULT_OTHER_COLOR
- See Also:
- Constant Field Values
DEFAULT_SYSTEM_COLOR
protected static final java.lang.String DEFAULT_SYSTEM_COLOR
- See Also:
- Constant Field Values
DEFAULT_DATE_COLOR
protected static final java.lang.String DEFAULT_DATE_COLOR
- See Also:
- Constant Field Values
VIEW_PREFIX
protected static final java.lang.String VIEW_PREFIX
- See Also:
- Constant Field Values
DEFAULT_TIME_FORMAT
protected static final java.lang.String DEFAULT_TIME_FORMAT
- See Also:
- Constant Field Values
DEFAULT_DATE_FORMAT
protected static final java.lang.String DEFAULT_DATE_FORMAT
- See Also:
- Constant Field Values
DEFAULT_INPUT_HEIGHT
protected static final int DEFAULT_INPUT_HEIGHT
- See Also:
- Constant Field Values
DEFAULT_INPUT_SEPARATOR
protected static final int DEFAULT_INPUT_SEPARATOR
- See Also:
- Constant Field Values
ChatRoomView
public ChatRoomView()
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in class org.eclipse.ui.part.WorkbenchPart
setEnabled
protected void setEnabled(boolean enabled)
clearInput
protected void clearInput()
handleTextInput
protected void handleTextInput(java.lang.String text)
handleEnter
protected void handleEnter()
handleKeyPressed
protected void handleKeyPressed(org.eclipse.swt.events.KeyEvent evt)
handleKeyReleased
protected void handleKeyReleased(org.eclipse.swt.events.KeyEvent evt)
setFocus
public void setFocus()
- Specified by:
setFocus
in interface org.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in class org.eclipse.ui.part.WorkbenchPart
getRoomInfo
public IChatRoomInfo getRoomInfo()
initialize
public void initialize(IChatRoomViewCloseListener parent,
java.lang.String secondaryID,
IChatRoomContainer container,
IChatRoomInfo info,
IChatRoomMessageSender sender)
dispose
public void dispose()
- Specified by:
dispose
in interface org.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in class org.eclipse.ui.part.WorkbenchPart
getMessageString
protected java.lang.String getMessageString(ID fromID,
java.lang.String text)
handleMessage
public void handleMessage(ID fromID,
java.lang.String messageBody)
getCurrentDate
protected java.lang.String getCurrentDate(java.lang.String format)
getDateTime
protected java.lang.String getDateTime()
addParticipant
protected void addParticipant(IUser p)
isLocalUser
protected boolean isLocalUser(ID id)
cleanUp
protected void cleanUp()
removeLocalUser
protected void removeLocalUser()
removeParticipant
protected void removeParticipant(IUser p)
removeAllParticipants
protected void removeAllParticipants()
handlePresence
public void handlePresence(ID fromID,
IPresence presence)
handleInvitationReceived
public void handleInvitationReceived(ID roomID,
ID from,
java.lang.String subject,
java.lang.String body)
- Description copied from interface:
IChatRoomInvitationListener
- Handle notification of a received invitation to join chat room. This
method will be called by some thread when an invitiation is received by
this user account to join a chat room
- Specified by:
handleInvitationReceived
in interface IChatRoomInvitationListener
- Parameters:
roomID
- the room id associated with the invitation. Will not be
null
.from
- the id of the sender. Will not be null
.subject
- a subject for the invitation. May be null
.body
- a message body for the invitation. May be null
.
appendText
protected void appendText(ChatLine text)
outputClear
protected void outputClear()
outputCopy
protected void outputCopy()
outputPaste
protected void outputPaste()
handleJoin
public void handleJoin(IUser user)
handleLeave
public void handleLeave(IUser user)
handleUpdated
public void handleUpdated(IUser user)
outputSelectAll
protected void outputSelectAll()
makeActions
protected void makeActions()