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

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


   
    for (int i = 0; i < demos.size(); i++) {
      lb.addItem(((SimpleCanvasDemo) demos.get(i)).getName());
    }
   
    lb.addChangeListener(new ChangeListener() {
      public void onChange(Widget listBox) {
        int choice = ((ListBox) listBox).getSelectedIndex();
        swapDemo(demos.get(choice));
      }
    });
View Full Code Here


        "<h2>A very boring demo showing the speed difference of using bulk loading tables.</h2>"));
    panel.add(new Label("Number of rows"));
    final TextBox rows = new TextBox();
    panel.add(rows);
    rows.setText(numRows + "");
    rows.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        numRows = Integer.parseInt(rows.getText().trim());
      }
    });

    panel.add(new Label("Number of columns"));
    final TextBox columns = new TextBox();
    panel.add(columns);
    columns.addChangeListener(new ChangeListener() {

      public void onChange(Widget sender) {
        numColumns = Integer.parseInt(columns.getText());
      }
    });
View Full Code Here

    // Setup the slider bars
    mainSliderBar.setStepSize(5.0);
    mainSliderBar.setCurrentValue(50.0);
    mainSliderBar.setNumTicks(10);
    mainSliderBar.setNumLabels(5);
    mainSliderBar.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        curBox.setText(mainSliderBar.getCurrentValue() + "");
      }
    });
    exampleBar1.setStepSize(0.1);
View Full Code Here

      Iterator levels = Log.levelIterator();
      while (levels.hasNext()) {
        Level l = (Level) levels.next();
        box.addItem(l.getName());
      }
      box.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          int index = box.getSelectedIndex();
          String level = box.getItemText(index);
          Log.info("Setting " + name + " to level " + level, Log.CATEGORY);
          handler.setLevel(Log.parseLevel(level));
View Full Code Here

  private Widget createForm() {
    FlexTable panel = new FlexTable();
   
    int row = 0;

    ChangeListener cl = null;
   
    cl = new ChangeListener () {
      public void onChange(Widget sender) {
        formChanged();
      }
    };
View Full Code Here

   
    box = new SuggestBox(oracle);
    box.setWidth("250px");
    hp0.add(box);
   
    box.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        search();
      }
    });
   
View Full Code Here

   
    if ( ! readOnly ) {
      // capture changes in the field to update the corresponding metadata
      // property for the mapping:
      final TextBoxBase tbb = tb;
      tb.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          String value = tbb.getText().trim();
          Map<String, String> md = mapping.getMetadata();
          if ( md == null ) {
            mapping.setMetadata(new HashMap<String, String>());
View Full Code Here

    }

   
   
   
    ChangeListener cl = null;
   
    if ( editing ) {
      cl = new ChangeListener () {
        public void onChange(Widget sender) {
          formChanged();
        }
      };
     
      CellPanel buttons = createButtons();
      panel.getFlexCellFormatter().setColSpan(row, 0, 2);
      panel.setWidget(row, 0, buttons);
      panel.getFlexCellFormatter().setAlignment(row, 0,
          HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
      );
      row++;
    }
   

    AttrDef[] attrDefs = attrGroup.getAttrDefs();
    for ( AttrDef attr : attrDefs ) {
     
      if ( attr.isInternal() ) {
        continue;
      }
     
      Widget widget;
     
      // TODO: need to handle dynamic refresh of options? (Main.refreshOptions)
      final List<Option> options = attr.getOptions();
     
      final String optionsVocabulary = attr.getOptionsVocabulary();
     
      // not listBoxes if we are just viewing
     
      // Bofore, the following section was conditioned by:
//      if ( editing && options.size() > 0 ) {
      // and now by:
      if ( editing && (optionsVocabulary != null || options.size() > 0) ) {
       
        if ( Orr.getMetadataBaseInfo().getResourceTypeUri().equals(attr.getUri()) ) {
          // the special case for the "resourceType"
         
          // #183: Don't ask user whether the submitted ontology is a mapping
          boolean includeIsMapCheck = false;
         
          widget = resourceTypeWidget = new ResourceTypeWidget(attr, editing, includeIsMapCheck,
            new ChangeListener () {
              public void onChange(Widget sender) {
                  formChanged();
              }
            }
          );
View Full Code Here

   
    addChangeListener(cl);
   
    int nl = 1;    /// attr.getNumberOfLines() is ignored
    textBox = OrrUtil.createTextBoxBase(nl, textWidth, cl);
    textBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        _onChange();
      }
    });
View Full Code Here

    listBox.setVisibleItemCount(Math.min(options.size(), 12));
    // make sure no item is selected so we get a change event on the first item (needed for firefox at least):
    // (see issue #139: Can't select AGU as authority abbreviation)
    listBox.setSelectedIndex(-1);

    listBox.addChangeListener(new ChangeListener () {
      public void onChange(Widget sender) {
        String value = listBox.getValue(listBox.getSelectedIndex());
        textBox.setText(value);
       
        Option option = options.get(listBox.getSelectedIndex());
View Full Code Here

TOP

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

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.