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

Examples of com.google.gwt.user.client.ui.ListBox


    final FlexTable flexTable = new FlexTable();
    verticalPanelInner.add(flexTable);
    flexTable.setCellSpacing(5);
    flexTable.setCellPadding(5);

    final ListBox listBox = new ListBox();
    listBox.addItem(c.Nothing(),"0");
    listBox.addItem(c.Error(),"1");
    listBox.addItem(c.Warning(),"2");
    listBox.addItem(c.Output(),"3");
    listBox.addItem(c.Detail(),"4");   
    listBox.addItem(c.Debug(),"5"); // give up extra space between 4 and 9 for coding convenience here.

    listBox.setVisibleItemCount(1);
//    flexTable.setWidget(0, 1, listBox);
    listBox.addChangeListener(new ChangeListener() {
      public void onChange(final Widget sender) {
        GenClient.setVerbosity(Integer.parseInt( listBox.getValue( listBox.getSelectedIndex() )));
        GenClient.showOutput("verbosity now: " + GenClient.getVerbosity() );       
        icingShadow.setVerbosityToDebug(GenClient.isVerbosityDebug());
        GenClient.showOutput("visibilityStatusArea: " + GenClient.isVerbosityDebug());
      }
    });
    listBox.setSelectedIndex(GenClient.getVerbosity());
    flexTable.setWidget(optionVerbosityIdx, 1, listBox);
   
   
    final Label verbosityLabel = new Label(c.Verbosity());
    flexTable.setWidget(optionVerbosityIdx, 0, verbosityLabel);
View Full Code Here


        textBoxComplPoor.setText(CRV_AQUA_COMPL_POOR);
        textBoxComplPoor.setWidth("3em");
        final Label per0100Label = new Label("[0,100%]");
        pcTable.setWidget(rowIdxPcComple, 3, per0100Label);

        listBoxObs = new ListBox();
        pcTable.setWidget(rowIdxPcObserv, 1, listBoxObs);
        pcTable.getFlexCellFormatter().setColSpan(rowIdxPcObserv, 1, 2);

        listBoxObs.addItem(c.Standard());
        listBoxObs.addItem(c.Standard_no());
View Full Code Here

    Grid grid = new Grid(2, 4);

    VerticalPanel vp = new VerticalPanel();
    grid.setHTML(0, 0, "<b>Opacity</b>");
    // The drop down lists for setting the style
    final ListBox opacityBox = new ListBox();
    for (int i = 100; i > 0; i -= 10) {
      opacityBox.addItem(i + "%");
    }
    opacityBox.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        String val = opacityBox.getItemText(opacityBox.getSelectedIndex());
        opacity = Double.parseDouble(val.replace("%", "")) / 100.0;
      }
    });
    grid.setWidget(1, 0, opacityBox);

    grid.setHTML(0, 1, "<b>Weight</b>");
    final ListBox weightBox = new ListBox();
    weightBox.addItem("1 pixel");
    weightBox.addItem("2 pixels");
    weightBox.addItem("3 pixels");
    weightBox.addItem("5 pixels");
    weightBox.addItem("10 pixels");
    weightBox.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        String val = weightBox.getItemText(weightBox.getSelectedIndex());
        val = val.replace(" pixel", "");
        val = val.replace("s", "");
        weight = Integer.parseInt(val);
      }
    });
    grid.setWidget(1, 1, weightBox);

    grid.setHTML(0, 2, "<b>Color</b>");
    final ListBox colorBox = new ListBox();
    colorBox.addItem("#FF0000 red");
    colorBox.addItem("#FFFF00 yellow");
    colorBox.addItem("#00FF00 green");
    colorBox.addItem("#00FFFF cyan");
    colorBox.addItem("#0000FF blue");
    colorBox.addItem("#FF00FF violet");
    colorBox.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        color = colorBox.getItemText(colorBox.getSelectedIndex()).substring(0,
            7);
      }
    });
    grid.setWidget(1, 2, colorBox);
View Full Code Here

  public OverlayDemo() {

    VerticalPanel vertPanel = new VerticalPanel();
    vertPanel.setStyleName("hm-panel");

    actionListBox = new ListBox();
    for (OverlayDemos od : OverlayDemos.values()) {
      actionListBox.addItem(od.valueOf());
    }
    actionListBox.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
View Full Code Here

    vertPanel.setStyleName("hm-panel");

    map = new MapWidget(ATLANTA, 13);
    vertPanel.add(map);

    actionListBox = new ListBox();
    actionListBox.addItem(TEST_DEFAULT);
    actionListBox.addItem(TEST_IMAGE);
    actionListBox.addItem(TEST_NO_CLICK);
    actionListBox.addItem(TEST_TABS);
    actionListBox.addItem(TEST_MAX_CONTENT);
View Full Code Here

   * @return a ListBox populated with the ListenerActions values
   */
  private HorizontalPanel createListenerListBox() {
    HorizontalPanel h = new HorizontalPanel();

    final ListBox listenerBox = new ListBox();
    for (HandlerActions a : HandlerActions.values()) {
      listenerBox.addItem(a.valueOf());
    }
    h.add(listenerBox);

    Button b = new Button("Add Handler");
    b.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        int selectedIndex = listenerBox.getSelectedIndex();
        HandlerActions a = HandlerActions.values()[selectedIndex];
        addListenerToMarker(a);
      }

    });
View Full Code Here

      richText.addClickHandler(handler);
    }
  }

  private ListBox createColorList(String caption) {
    ListBox lb = new ListBox();
    lb.addChangeHandler(handler);
    lb.setVisibleItemCount(1);

    lb.addItem(caption);
    lb.addItem(strings.white(), "white");
    lb.addItem(strings.black(), "black");
    lb.addItem(strings.red(), "red");
    lb.addItem(strings.green(), "green");
    lb.addItem(strings.yellow(), "yellow");
    lb.addItem(strings.blue(), "blue");
    return lb;
  }
View Full Code Here

    lb.addItem(strings.blue(), "blue");
    return lb;
  }

  private ListBox createFontList() {
    ListBox lb = new ListBox();
    lb.addChangeHandler(handler);
    lb.setVisibleItemCount(1);

    lb.addItem(strings.font(), "");
    lb.addItem(strings.normal(), "");
    lb.addItem("Times New Roman", "Times New Roman");
    lb.addItem("Arial", "Arial");
    lb.addItem("Courier New", "Courier New");
    lb.addItem("Georgia", "Georgia");
    lb.addItem("Trebuchet", "Trebuchet");
    lb.addItem("Verdana", "Verdana");
    return lb;
  }
View Full Code Here

    lb.addItem("Verdana", "Verdana");
    return lb;
  }

  private ListBox createFontSizes() {
    ListBox lb = new ListBox();
    lb.addChangeHandler(handler);
    lb.setVisibleItemCount(1);

    lb.addItem(strings.size());
    lb.addItem(strings.xxsmall());
    lb.addItem(strings.xsmall());
    lb.addItem(strings.small());
    lb.addItem(strings.medium());
    lb.addItem(strings.large());
    lb.addItem(strings.xlarge());
    lb.addItem(strings.xxlarge());
    return lb;
  }
View Full Code Here

  public CustomControlDemo() {

    VerticalPanel vertPanel = new VerticalPanel();
    vertPanel.setStyleName("hm-panel");

    actionListBox = new ListBox();
    for (ControlDemos cd : ControlDemos.values()) {
      actionListBox.addItem(cd.valueOf());
    }

    actionListBox.addChangeHandler(new ChangeHandler() {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.ListBox

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.