Java源码示例:gwt.material.design.client.ui.MaterialDropDown

示例1
public void testStructure() {
    // given
    MaterialMenuBar menuBar = getWidget(false);

    // when / then
    final String ACTIVATOR = "dp-activator";
    MaterialLink link = new MaterialLink();
    MaterialDropDown dropDown = new MaterialDropDown();
    link.setActivates(ACTIVATOR);
    dropDown.setActivator(ACTIVATOR);
    menuBar.add(link);
    menuBar.add(dropDown);
    assertEquals(ACTIVATOR, link.getActivates());
    assertEquals(ACTIVATOR, dropDown.getActivator());
    assertEquals(link, menuBar.getWidget(0));
    assertEquals(dropDown, menuBar.getWidget(1));
}
 
示例2
public MaterialDropDown getDropdown() {
    return dropdown;
}