use of org.eclipse.scout.rt.client.ui.action.menu.root.internal.FormFieldContextMenu in project scout.rt by eclipse.
the class AbstractGroupBox method initMenus.
private void initMenus() {
List<Class<? extends IMenu>> declaredMenus = getDeclaredMenus();
List<IMenu> contributedMenus = m_contributionHolder.getContributionsByClass(IMenu.class);
OrderedCollection<IMenu> menus = new OrderedCollection<IMenu>();
for (Class<? extends IMenu> menuClazz : declaredMenus) {
menus.addOrdered(ConfigurationUtility.newInnerInstance(this, menuClazz));
}
menus.addAllOrdered(contributedMenus);
injectMenusInternal(menus);
new MoveActionNodesHandler<IMenu>(menus).moveModelObjects();
// set container on menus
IFormFieldContextMenu contextMenu = new FormFieldContextMenu<IGroupBox>(this, menus.getOrderedList());
contextMenu.setContainerInternal(this);
setContextMenu(contextMenu);
}
use of org.eclipse.scout.rt.client.ui.action.menu.root.internal.FormFieldContextMenu in project scout.rt by eclipse.
the class AbstractButton method initConfig.
@Override
protected void initConfig() {
super.initConfig();
setSystemType(getConfiguredSystemType());
setDisplayStyleInternal(getConfiguredDisplayStyle());
setProcessButton(getConfiguredProcessButton());
setDefaultButton(getConfiguredDefaultButton());
setIconId(getConfiguredIconId());
setKeyStroke(getConfiguredKeyStroke());
setKeyStrokeScopeClass(getConfiguredKeyStrokeScopeClass());
setPreventDoubleClick(getConfiguredPreventDoubleClick());
// menus
List<Class<? extends IMenu>> declaredMenus = getDeclaredMenus();
List<IMenu> contributedMenus = m_contributionHolder.getContributionsByClass(IMenu.class);
OrderedCollection<IMenu> menus = new OrderedCollection<IMenu>();
for (Class<? extends IMenu> menuClazz : declaredMenus) {
IMenu menu;
menu = ConfigurationUtility.newInnerInstance(this, menuClazz);
menus.addOrdered(menu);
}
menus.addAllOrdered(contributedMenus);
injectMenusInternal(menus);
new MoveActionNodesHandler<IMenu>(menus).moveModelObjects();
IContextMenu contextMenu = new FormFieldContextMenu<IButton>(this, menus.getOrderedList());
contextMenu.setContainerInternal(this);
setContextMenu(contextMenu);
}
use of org.eclipse.scout.rt.client.ui.action.menu.root.internal.FormFieldContextMenu in project scout.rt by eclipse.
the class AbstractTabBox method initMenus.
private void initMenus() {
List<Class<? extends IMenu>> declaredMenus = getDeclaredMenus();
List<IMenu> contributedMenus = m_contributionHolder.getContributionsByClass(IMenu.class);
OrderedCollection<IMenu> menus = new OrderedCollection<IMenu>();
for (Class<? extends IMenu> menuClazz : declaredMenus) {
try {
menus.addOrdered(ConfigurationUtility.newInnerInstance(this, menuClazz));
} catch (Exception e) {
BEANS.get(ExceptionHandler.class).handle(new ProcessingException("error creating instance of class '" + menuClazz.getName() + "'.", e));
}
}
menus.addAllOrdered(contributedMenus);
try {
injectMenusInternal(menus);
} catch (Exception e) {
LOG.error("error occured while dynamically contributing menus.", e);
}
new MoveActionNodesHandler<IMenu>(menus).moveModelObjects();
// set container on menus
IFormFieldContextMenu contextMenu = new FormFieldContextMenu<ITabBox>(this, menus.getOrderedList());
contextMenu.setContainerInternal(this);
setContextMenu(contextMenu);
}
Aggregations