Search in sources :

Example 1 with IValueFieldContextMenu

use of org.eclipse.scout.rt.client.ui.action.menu.root.IValueFieldContextMenu in project scout.rt by eclipse.

the class AbstractValueField method initConfig.

@Override
protected void initConfig() {
    super.initConfig();
    m_listeningSlaves = new EventListenerList();
    setAutoAddDefaultMenus(getConfiguredAutoAddDefaultMenus());
    // 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) {
        menus.addOrdered(ConfigurationUtility.newInnerInstance(this, menuClazz));
    }
    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
    IValueFieldContextMenu contextMenu = createContextMenu(menus);
    contextMenu.setContainerInternal(this);
    setContextMenu(contextMenu);
    setStatusMenuMappings(createStatusMenuMappings());
}
Also used : IMenu(org.eclipse.scout.rt.client.ui.action.menu.IMenu) IValueFieldContextMenu(org.eclipse.scout.rt.client.ui.action.menu.root.IValueFieldContextMenu) EventListenerList(org.eclipse.scout.rt.platform.util.EventListenerList) OrderedCollection(org.eclipse.scout.rt.platform.util.collection.OrderedCollection) ProcessingException(org.eclipse.scout.rt.platform.exception.ProcessingException) IOException(java.io.IOException) VetoException(org.eclipse.scout.rt.platform.exception.VetoException)

Aggregations

IOException (java.io.IOException)1 IMenu (org.eclipse.scout.rt.client.ui.action.menu.IMenu)1 IValueFieldContextMenu (org.eclipse.scout.rt.client.ui.action.menu.root.IValueFieldContextMenu)1 ProcessingException (org.eclipse.scout.rt.platform.exception.ProcessingException)1 VetoException (org.eclipse.scout.rt.platform.exception.VetoException)1 EventListenerList (org.eclipse.scout.rt.platform.util.EventListenerList)1 OrderedCollection (org.eclipse.scout.rt.platform.util.collection.OrderedCollection)1