Package org.eclipse.wb.internal.core.model.menu

Examples of org.eclipse.wb.internal.core.model.menu.IMenuPopupInfo


    container.refresh();
    ComponentInfo button = (ComponentInfo) container.getWidgets().get(0);
    MenuInfo menu = button.getChildren(MenuInfo.class).get(0);
    assertFalse(menu.isSubMenu());
    // IMenuPopupInfo
    IMenuPopupInfo popupObject = MenuObjectInfoUtils.getMenuPopupInfo(menu);
    assertSame(menu, popupObject.getModel());
    // presentation
    {
      // use icon as "popup" image
      {
        Image image = popupObject.getImage();
        assertSame(menu.getDescription().getIcon(), image);
      }
      // some reasonable bounds
      {
        Rectangle bounds = popupObject.getBounds();
        assertThat(bounds.width).isEqualTo(16);
        assertThat(bounds.height).isEqualTo(16);
      }
    }
    // access
    {
      IMenuInfo menuObject = popupObject.getMenu();
      assertSame(MenuObjectInfoUtils.getMenuInfo(menu), menuObject);
      assertSame(menuObject, menuObject.getModel());
    }
    assertNotNull(popupObject.getPolicy());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.model.menu.IMenuPopupInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.