|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.action.ContributionItem org.eclipse.ui.actions.CompoundContributionItem org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuContributionItem
public abstract class AbstractRosterMenuContributionItem
A contribution that dynamically constructs a menu for the currently connected rosters.
This class may be subclassed in order to create a AbstractRosterMenuHandler
for
handling selection of a given IRosterEntry
from the menu.
Field Summary | |
---|---|
protected static org.eclipse.jface.action.IContributionItem[] |
NO_CONTRIBUTIONS
|
Constructor Summary | |
---|---|
AbstractRosterMenuContributionItem()
|
|
AbstractRosterMenuContributionItem(java.lang.String id)
|
Method Summary | |
---|---|
protected boolean |
addEntry(IRosterEntry entry)
Determines whether given entry should be added for IContribution. |
protected org.eclipse.ui.menus.CommandContributionItem |
createCommandContributionItemForEntry(java.lang.String commandId,
IRosterEntry rosterEntry)
Create a command contribution item for the given entry with the given commandId. |
protected org.eclipse.jface.action.IContributionItem[] |
createContributionItemsForEntry(IRosterEntry entry)
Create contribution items for a given roster entry. |
protected org.eclipse.jface.action.IContributionItem[] |
createContributionItemsForGroup(IRosterGroup group)
Create contribution items for a given roster. |
protected org.eclipse.jface.action.IContributionItem[] |
createContributionItemsForPresenceContainer(IPresenceContainerAdapter presenceContainerAdapter)
Create contribution items for a given presence container adapter. |
protected org.eclipse.jface.action.IContributionItem[] |
createContributionItemsForRoster(IRoster roster)
Create contribution items for a given roster. |
protected org.eclipse.jface.action.MenuManager |
createMenuManagerForGroup(IRosterGroup group)
Create a MenuManager for the given IRosterGroup . |
protected org.eclipse.jface.action.MenuManager |
createMenuManagerForRoster(IRoster roster)
Create a MenuManager for the given IRosterGroup . |
protected org.eclipse.jface.action.MenuManager |
createMenuManagerForTop()
Create a MenuManager for the top level menu. |
protected abstract AbstractRosterMenuHandler |
createRosterEntryHandler(IRosterEntry rosterEntry)
Create a AbstractRosterMenuHandler for a given IRosterEntry instance. |
void |
dispose()
|
protected org.eclipse.jface.action.IContributionItem[] |
getContributionItems()
|
protected java.util.List |
getPresenceContainerAdapters()
|
protected org.eclipse.jface.resource.ImageDescriptor |
getRosterEntryImageDescriptor(IRosterEntry entry)
|
protected org.eclipse.jface.resource.ImageDescriptor |
getTopMenuImageDescriptor()
|
void |
setTopMenuImageDescriptor(org.eclipse.jface.resource.ImageDescriptor image)
|
protected void |
setTopMenuName(java.lang.String name)
|
Methods inherited from class org.eclipse.ui.actions.CompoundContributionItem |
---|
fill, isDirty, isDynamic, setParent |
Methods inherited from class org.eclipse.jface.action.ContributionItem |
---|
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.eclipse.jface.action.IContributionItem[] NO_CONTRIBUTIONS
Constructor Detail |
---|
public AbstractRosterMenuContributionItem()
public AbstractRosterMenuContributionItem(java.lang.String id)
Method Detail |
---|
protected void setTopMenuName(java.lang.String name)
public void setTopMenuImageDescriptor(org.eclipse.jface.resource.ImageDescriptor image)
protected org.eclipse.jface.resource.ImageDescriptor getTopMenuImageDescriptor()
protected org.eclipse.jface.action.IContributionItem[] createContributionItemsForRoster(IRoster roster)
roster
- the roster to create contribution items for. Must not be null
.
null
.protected org.eclipse.jface.action.IContributionItem[] createContributionItemsForGroup(IRosterGroup group)
group
- the IRosterGroup to create contribution items for. Must not be null
.
null
.protected org.eclipse.jface.action.MenuManager createMenuManagerForGroup(IRosterGroup group)
IRosterGroup
.
group
- the IRosterGroup to create the menu manager for. Will not be null
.
null
.protected org.eclipse.jface.action.IContributionItem[] createContributionItemsForPresenceContainer(IPresenceContainerAdapter presenceContainerAdapter)
presenceContainerAdapter
- the IPresenceContainerAdapter to create contribution items for. Must not be null
.
null
.protected org.eclipse.jface.action.MenuManager createMenuManagerForRoster(IRoster roster)
IRosterGroup
.
roster
- the IRosterGroup to create the menu manager for. Will not be null
.
null
.protected abstract AbstractRosterMenuHandler createRosterEntryHandler(IRosterEntry rosterEntry)
AbstractRosterMenuHandler
for a given IRosterEntry instance. Implementers of this method
should construct and return a new AbstractRosterMenuHandler
. When a menu selection is made for
a given IRosterEntry
menu item, the associated AbstractRosterMenuHandler
instance will have its
AbstractRosterMenuHandler.execute(org.eclipse.core.commands.ExecutionEvent)
method will
be called. This way, subclasses may define arbitrary behavior for the dynamic menu item
selection.
rosterEntry
- the IRosterEntry
for the AbstractRosterMenuHandler
. Will not be null
.
AbstractRosterMenuHandler
instance. Must not be null
.protected boolean addEntry(IRosterEntry entry)
true
if the given IRosterEntry.getPresence()
IPresence.Type is
AVAILABLE, and IPresence.Mode is AVAILABLE. Subclasses may override as appropriate
to customize the behavior of this contribution item.
entry
- the IRosterEntry to check. Must not be null
.
true
if the given IRosterEntry should be added, false
otherwise.protected org.eclipse.jface.action.IContributionItem[] createContributionItemsForEntry(IRosterEntry entry)
entry
- the IRosterEntry to create contribution items for. Must not be null
.
null
.protected org.eclipse.jface.resource.ImageDescriptor getRosterEntryImageDescriptor(IRosterEntry entry)
protected org.eclipse.ui.menus.CommandContributionItem createCommandContributionItemForEntry(java.lang.String commandId, IRosterEntry rosterEntry)
commandId
- the commandId for the new CommandContributionItem. Must not be null
.rosterEntry
- the IRosterEntry for the new CommandContributionItem. Must not be null
.
null
.public void dispose()
dispose
in interface org.eclipse.jface.action.IContributionItem
dispose
in class org.eclipse.ui.actions.CompoundContributionItem
protected java.util.List getPresenceContainerAdapters()
protected org.eclipse.jface.action.IContributionItem[] getContributionItems()
getContributionItems
in class org.eclipse.ui.actions.CompoundContributionItem
protected org.eclipse.jface.action.MenuManager createMenuManagerForTop()
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |