|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.kivi.menu.KiviMenuContributionService
public class KiviMenuContributionService
A simple programmatic API to specify toolbar buttons to be used with the KIELER View Management.
Nested Class Summary | |
---|---|
static class |
KiviMenuContributionService.ButtonConfiguration
A container class for configurations for buttons. |
Field Summary | |
---|---|
static KiviMenuContributionService |
INSTANCE
Singleton instance of this service. |
Constructor Summary | |
---|---|
KiviMenuContributionService()
|
Method Summary | |
---|---|
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,
Expression visibilityExpression,
String... activeEditors)
Add a button configuration with all possible parameters. |
KiviMenuContributionService.ButtonConfiguration |
getButtonConfiguration(String id)
Get a ButtonCnfiguration with the given ID. |
List<KiviMenuContributionService.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 KiviMenuContributionService INSTANCE
Constructor Detail |
---|
public KiviMenuContributionService()
Method Detail |
---|
public void addToolbarButton(ICombination responsibleCombination, String id, String label, String tooltip, ImageDescriptor icon, int style, Expression visibilityExpression, 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
- an SWT style constant, either SWT.PUSH, SWT.RADIO or SWT.CHECKvisibilityExpression
- 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<KiviMenuContributionService.ButtonConfiguration> getButtonConfigurations()
public KiviMenuContributionService.ButtonConfiguration getButtonConfiguration(String id)
id
- given ID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |