org.eclipse.ecf.presence.ui
Class MultiRosterView
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.ecf.presence.ui.MultiRosterView
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, IMultiRosterViewPart, 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 MultiRosterView
- extends org.eclipse.ui.part.ViewPart
- implements IMultiRosterViewPart
View class for displaying multiple rosters in a tree viewer. This view part
implements IMultiRosterViewPart
and provides the ability to display
multiple rosters in a single tree viewer. This class may be subclassed as
desired to add or customize behavior.
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
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.IViewPart |
getViewSite, init, init, saveState |
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_EXPAND_LEVEL
protected static final int DEFAULT_EXPAND_LEVEL
- See Also:
- Constant Field Values
treeViewer
protected org.eclipse.jface.viewers.TreeViewer treeViewer
rosterAccounts
protected java.util.List rosterAccounts
MultiRosterView
public MultiRosterView()
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
setupTreeViewer
protected void setupTreeViewer(org.eclipse.swt.widgets.Composite parent)
createChatRoomCommandListener
protected IChatRoomCommandListener createChatRoomCommandListener()
createChatRoomViewCloseListener
protected IChatRoomViewCloseListener createChatRoomViewCloseListener(ID connectedID)
joinChatRoom
protected void joinChatRoom(IContainer container,
IChatRoomInfo roomInfo,
java.lang.String password)
throws ECFException
- For the given container, join the chat room specified by roomInfo. NOTE:
this is to be considered provisional 'Gunner' API and may not be
available in subsequent versions of this class.
- Parameters:
container
- the IContainer instance that exposes the chat room. Must not
be null
. Also must be the same container
associated with one of the accounts managed by this
MultiRosterView.roomInfo
- chat room information that will be used to join. Must not be
null
.password
- a password associated with chat room access. May be
null
.
- Throws:
ECFException
- if the given container is not connected, or if the given
container is not managed by this MultiRosterView, or if
ChatRoomManagerView
cannot be initialized.
changePasswordForAccount
protected void changePasswordForAccount(MultiRosterAccount account)
disconnectAccounts
protected void disconnectAccounts(MultiRosterAccount[] accounts)
dispose
public void dispose()
- Specified by:
dispose
in interface org.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in class org.eclipse.ui.part.WorkbenchPart
containerPresent
protected boolean containerPresent(IContainer container)
addRosterAccount
protected boolean addRosterAccount(MultiRosterAccount account)
rosterAccountDisconnected
protected void rosterAccountDisconnected(MultiRosterAccount disconnectedAccount)
removeRosterAccount
protected void removeRosterAccount(MultiRosterAccount account)
setFocus
public void setFocus()
- Specified by:
setFocus
in interface org.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in class org.eclipse.ui.part.WorkbenchPart
refreshTreeViewer
protected void refreshTreeViewer(java.lang.Object val,
boolean labels)
addEntryToTreeViewer
protected void addEntryToTreeViewer(IRosterEntry entry)
removeEntryFromTreeViewer
protected void removeEntryFromTreeViewer(IRosterEntry entry)
removeEntryFromTreeViewer
protected void removeEntryFromTreeViewer(ID entryID)
addContainer
public boolean addContainer(IContainer container)
- Description copied from interface:
IMultiRosterViewPart
- Add container to the roster view. The container provided should adapter
to the IPresenceContainerAdapter. If it does not, then false will be
returned. Note that this method should only be called by the user interface
thread, and not by some other thread.
- Specified by:
addContainer
in interface IMultiRosterViewPart
- Parameters:
container
- The container provided should adapter to the
IPresenceContainerAdapter. If it does not (because container is already
present in this view part), then false will be
returned.
- Returns:
true
if the given container can be added to this roster view.
false
if not. If the container has already been added to
this view part, then will return false
.