Search in sources :

Example 1 with MenuItemSeparator

use of com.google.gwt.user.client.ui.MenuItemSeparator in project rstudio by rstudio.

the class BaseMenuBar method insertSeparator.

@Override
public MenuItemSeparator insertSeparator(MenuItemSeparator separator, int beforeIndex) throws IndexOutOfBoundsException {
    MenuItemSeparator value = super.insertSeparator(separator, beforeIndex);
    separators_.add(value);
    return value;
}
Also used : MenuItemSeparator(com.google.gwt.user.client.ui.MenuItemSeparator)

Example 2 with MenuItemSeparator

use of com.google.gwt.user.client.ui.MenuItemSeparator in project gwt-test-utils by gwt-test-utils.

the class MenuBarTest method addSeparator.

@Test
public void addSeparator() {
    // Given
    MenuBar bar = new MenuBar();
    bar.addItem("test0", cmd);
    // When
    MenuItemSeparator separator = bar.addSeparator();
    bar.addItem("test1", cmd);
    // Then
    assertThat(bar.getSeparatorIndex(separator)).isEqualTo(1);
}
Also used : MenuBar(com.google.gwt.user.client.ui.MenuBar) MenuItemSeparator(com.google.gwt.user.client.ui.MenuItemSeparator) Test(org.junit.Test)

Aggregations

MenuItemSeparator (com.google.gwt.user.client.ui.MenuItemSeparator)2 MenuBar (com.google.gwt.user.client.ui.MenuBar)1 Test (org.junit.Test)1