本文整理汇总了Java中org.eclipse.jface.action.ActionContributionItem.fill方法的典型用法代码示例。如果您正苦于以下问题:Java ActionContributionItem.fill方法的具体用法?Java ActionContributionItem.fill怎么用?Java ActionContributionItem.fill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.ActionContributionItem
的用法示例。
在下文中一共展示了ActionContributionItem.fill方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSubActionMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected Menu getSubActionMenu(final Control parent) {
if (subActionMenu != null) {
return subActionMenu;
}
subActionMenu = new Menu(parent);
for (final Iterator<IAction> it = subActions.iterator(); it.hasNext();) {
final IAction subAction = it.next();
final ActionContributionItem aci = new ActionContributionItem(subAction);
aci.fill(subActionMenu, -1);
final MenuItem menuItem = subActionMenu.getItem(subActionMenu.getItemCount() - 1);
menuItem.addSelectionListener(menuItemSelectionListener);
}
return subActionMenu;
}
示例2: getMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
/**
* Refresh the menu field.
*
* @see IMenuCreator#getMenu(Control)
*/
@Override
public Menu getMenu(Control parent) {
// Dispose of the old menu
if (menu != null) {
menu.dispose();
}
// Put all the actions into a new menu
menu = new Menu(parent);
for (Action action : addActions) {
ActionContributionItem item = new ActionContributionItem(action);
item.fill(menu, -1);
}
return menu;
}
示例3: getMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
/**
* <p>
* Returns the Menu generated by this DropdownAction
* </p>
*
* @param parent
* <p>
* The parent Control instance
* </p>
* @return
* <p>
* The menu generated by this DropdownAction
* </p>
*/
@Override
public Menu getMenu(Control parent) {
// Dispose of the old menu
if (menu != null) {
menu.dispose();
}
// Put all the actions into a new menu
menu = new Menu(parent);
for (Action action : childActions) {
ActionContributionItem item = new ActionContributionItem(action);
item.fill(menu, -1);
}
return menu;
}
示例4: getMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
public Menu getMenu(Control parent) {
if (menu != null) {
menu.dispose();
}
menu = new Menu(parent);
for (Iterator<Context> i = contexts.iterator(); i.hasNext(); ) {
Context context = (Context)i.next();
if (context.isVisible()) {
Action action = createContextAction(context);
ActionContributionItem item= new ActionContributionItem(action);
item.fill(menu, -1);
}
}
return menu;
}
示例5: getMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
@Override
public Menu getMenu(Control parent) {
Menu menu=new Menu(parent);
ActionContributionItem gridViewMenuitem=new ActionContributionItem(actionFactory.getAction(GridViewAction.class.getName()));
ActionContributionItem formattedViewMenuItem=new ActionContributionItem(actionFactory.getAction(FormattedViewAction.class.getName()));
ActionContributionItem unformattedViewMenuItem=new ActionContributionItem(actionFactory.getAction(UnformattedViewAction.class.getName()));
gridViewMenuitem.fill(menu, 0);
formattedViewMenuItem.fill(menu,1);
unformattedViewMenuItem.fill(menu,2);
return menu;
}
示例6: createButtonsForButtonBar
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
@Override
protected void createButtonsForButtonBar(Composite parent) {
// create buttons
((GridLayout) parent.getLayout()).numColumns++;// for layout
ActionContributionItem licenceContrib = new ActionContributionItem(new LicenseAction());
licenceContrib.fill(parent);
Button okBtn = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}
示例7: getMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
@Override
public Menu getMenu(Control parent) {
if(menu != null && !menu.isDisposed()) {
menu.dispose();
}
menu = new Menu(parent);
int i = 0;
for(ActionContributionItem item : items) {
item.fill(menu, i);
i++;
}
return menu;
}
示例8: getMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
public Menu getMenu(Control parent) {
if (fMenu == null) {
fMenu= new Menu(parent);
OpenTypeWizardAction[] actions= getActionFromDescriptors();
for (int i= 0; i < actions.length; i++) {
OpenTypeWizardAction curr= actions[i];
curr.setShell(fWizardShell);
ActionContributionItem item= new ActionContributionItem(curr);
item.fill(fMenu, -1);
}
}
return fMenu;
}
示例9: addActionToMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected void addActionToMenu(Menu parent, Action action) {
final ActionContributionItem item = new ActionContributionItem(action);
item.fill(parent, -1);
}
示例10: CopiableLabel
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
public CopiableLabel(final org.eclipse.swt.widgets.Composite parent, final int style) {
super(parent, style);
final Clipboard clipboard = new Clipboard(parent.getDisplay());
final Menu menu = new Menu(this);
final Action copyAction = new CopyLabelAction(this, clipboard);
copyAction.setText(Messages.getString("CopiableLabel.CopyActionText")); //$NON-NLS-1$
copyAction.setToolTipText(Messages.getString("CopiableLabel.CopyActionTooltip")); //$NON-NLS-1$
final ActionContributionItem contrib = new ActionContributionItem(copyAction);
contrib.fill(menu, -1);
setMenu(menu);
}
示例11: addActionToMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
private void addActionToMenu(Menu parent, Action action) {
ActionContributionItem item= new ActionContributionItem(action);
item.fill(parent, -1);
}
示例12: addActionToMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected void addActionToMenu( Menu parent, Action action){
ActionContributionItem item = new ActionContributionItem(action);
item.fill(parent, -1);
}
示例13: addActionToMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected void addActionToMenu(Menu parent, IAction action) {
ActionContributionItem item = new ActionContributionItem(action);
item.fill(parent, -1);
}
示例14: addSessionToMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
private void addSessionToMenu(Menu menu2, String name) {
Action action = new SaveSessionAction(name);
ActionContributionItem item = new ActionContributionItem(action);
item.fill(menu2, -1);
}
示例15: addSessionToMenu
import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
private void addSessionToMenu(Menu menu2, EditingSession session) {
Action action = new OpenSessionAction(session);
ActionContributionItem item = new ActionContributionItem(action);
item.fill(menu2, -1);
}