Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.ListBox.ensureDebugId()


    final ListBox dropBox = new ListBox(false);
    String[] listTypes = constants.cwListBoxCategories();
    for (int i = 0; i < listTypes.length; i++) {
      dropBox.addItem(listTypes[i]);
    }
    dropBox.ensureDebugId("cwListBox-dropBox");
    VerticalPanel dropBoxPanel = new VerticalPanel();
    dropBoxPanel.setSpacing(4);
    dropBoxPanel.add(new HTML(constants.cwListBoxSelectCategory()));
    dropBoxPanel.add(dropBox);
    hPanel.add(dropBoxPanel);
View Full Code Here


    dropBoxPanel.add(dropBox);
    hPanel.add(dropBoxPanel);

    // Add a list box with multiple selection enabled
    final ListBox multiBox = new ListBox(true);
    multiBox.ensureDebugId("cwListBox-multiBox");
    multiBox.setWidth("11em");
    multiBox.setVisibleItemCount(10);
    VerticalPanel multiBoxPanel = new VerticalPanel();
    multiBoxPanel.setSpacing(4);
    multiBoxPanel.add(new HTML(constants.cwListBoxSelectAll()));
View Full Code Here

    // Add a handler to handle drop box events
    dropBox.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        showCategory(multiBox, dropBox.getSelectedIndex());
        multiBox.ensureDebugId("cwListBox-multiBox");
      }
    });

    // Show default category
    showCategory(multiBox, 0);
View Full Code Here

      }
    });

    // Show default category
    showCategory(multiBox, 0);
    multiBox.ensureDebugId("cwListBox-multiBox");

    // Return the panel
    return hPanel;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.