|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.ksbase.ui.menus.KSBasEMenuContributionService
public class KSBasEMenuContributionService
A simple programmatic API to specify toolbar buttons to be used with the KIELER View Management.
Nested Class Summary | |
---|---|
static class |
KSBasEMenuContributionService.ButtonConfiguration
A container class for configurations for buttons. |
static class |
KSBasEMenuContributionService.LocationScheme
A location scheme enumeration allowing to determine the locations of KIVi menu contributions. |
Field Summary | |
---|---|
static KSBasEMenuContributionService |
INSTANCE
Singleton instance of this service. |
Constructor Summary | |
---|---|
KSBasEMenuContributionService()
|
Method Summary | |
---|---|
void |
addSeparator(String id,
KSBasEMenuContributionService.LocationScheme locationSchemeExpression,
Expression visibilityExpression,
String... activeEditors)
Add a separator button configuration. |
void |
addToolbarButton(ICombination responsibleCombination,
String id,
String label)
Add the simplest button configuration possible. |
void |
addToolbarButton(ICombination responsibleCombination,
String id,
String tooltip,
ImageDescriptor icon,
String... activeEditors)
Add a button configuration with only a few parameters. |
void |
addToolbarButton(ICombination responsibleCombination,
String id,
String label,
String tooltip,
ImageDescriptor icon,
int style,
KSBasEMenuContributionService.LocationScheme locationSchemeExpression,
Expression visibilityExpression,
KeySequence keySequence,
String shortcutContext,
String... activeEditors)
Add a button configuration with all possible parameters. |
KSBasEMenuContributionService.ButtonConfiguration |
getButtonConfiguration(String id)
Get a ButtonCnfiguration with the given ID. |
List<KSBasEMenuContributionService.ButtonConfiguration> |
getButtonConfigurations()
Get the list of registered ButtonConfigurations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final KSBasEMenuContributionService INSTANCE
Constructor Detail |
---|
public KSBasEMenuContributionService()
Method Detail |
---|
public void addToolbarButton(ICombination responsibleCombination, String id, String label, String tooltip, ImageDescriptor icon, int style, KSBasEMenuContributionService.LocationScheme locationSchemeExpression, Expression visibilityExpression, KeySequence keySequence, String shortcutContext, String... activeEditors)
responsibleCombination
- the KiVi Combination which is responsible for this button. the button will be made
invisible if the combination gets deactivatedid
- the ID that the button should get. Need to identify the button lateron with this
IDlabel
- an optional label for the button. May be null. Either the label or the icon should
be specified.tooltip
- a tooltip for the button, may be nullicon
- the icon for the button, may be null. Either the label or the icon should be
specified. An Image descriptor can be obtained by the plugin activator with the
plugin ID and the relative path of the icon within that plugin.style
- a SWT style constant, either SWT.PUSH, SWT.RADIO or SWT.CHECKlocationSchemeExpression
- a KSBasEMenuContributionService.LocationScheme
enumeration value indicating the locations the button is
to be attached tovisibilityExpression
- an eclipse core Expression that gets registered as visibility expression, may be
nullkeySequence
- a keySequence for binding a key combination to the command of this button, may be nullshortcutContext
- the context in which the shortcut defined by the keySequence should be active, may be
null and will default to org.eclipse.ui.contexts.windowactiveEditors
- Strings of editor IDs for which this button should be made visible only, parameter
to avoid using the visibilityExpression, may be leftpublic void addSeparator(String id, KSBasEMenuContributionService.LocationScheme locationSchemeExpression, Expression visibilityExpression, String... activeEditors)
id
- the ID that the separator should get. Need to identify the button lateron with this
IDlocationSchemeExpression
- a KSBasEMenuContributionService.LocationScheme
enumeration value indicating the locations the button is
to be attached tovisibilityExpression
- an eclipse core Expression that gets registered as visibility expression, may be
nullactiveEditors
- Strings of editor IDs for which this button should be made visible only, parameter
to avoid using the visibilityExpression, may be leftpublic void addToolbarButton(ICombination responsibleCombination, String id, String tooltip, ImageDescriptor icon, String... activeEditors)
responsibleCombination
- the KiVi Combination which is responsible for this button. the button will be made
invisible if the combination gets deactivatedid
- the ID that the button should get. Need to identify the button lateron with this
IDtooltip
- a tooltip for the button, may be nullicon
- the icon for the button, may be null. Either the label or the icon should be
specified. An Image descriptor can be obtained by the plugin activator with the
plugin ID and the relative path of the icon within that plugin.activeEditors
- Strings of editor IDs for which this button should be made visible only, parameter
to avoid using the visibilityExpression, may be leftpublic void addToolbarButton(ICombination responsibleCombination, String id, String label)
responsibleCombination
- the KiVi Combination which is responsible for this button. the button will be made
invisible if the combination gets deactivatedid
- the ID that the button should get. Need to identify the button lateron with this
IDlabel
- an optional label for the button. May be null. Either the label or the icon should
be specified.public List<KSBasEMenuContributionService.ButtonConfiguration> getButtonConfigurations()
public KSBasEMenuContributionService.ButtonConfiguration getButtonConfiguration(String id)
id
- given ID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |