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

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


    } else if (type == TreeType.HTML) {
      TreeItem item = new TreeItem("<h1>html</h1>");
      parent.addItem(item);
      return item;
    } else if (type == TreeType.CHECKBOX) {
      return parent.addItem(new CheckBox("myBox"));
    } else {
      throw new RuntimeException("What?");
    }
  }
View Full Code Here


    HandlerConfig(final LogHandler handler) {
      this.setStyleName("handler-control");
      final String name = GWT.getTypeName(handler);
      int index = name.lastIndexOf(".") + 1;

      CheckBox enabled = new CheckBox("enabled");
      enabled.addClickListener(new MyHandlerClickListener(handler));

      this.setText(0, 0, name.substring(index));
      this.getFlexCellFormatter().setColSpan(0, 0, 2);
      this.setWidget(1, 0, enabled);
      this.setText(2, 0, "Current level");
View Full Code Here

      TreeItem item = new TreeItem();
      item.setHTML("<h1>html</h1>");
      parent.addItem(item);
      return item;
    } else if (type == TreeType.CHECKBOX) {
      return parent.addItem(new CheckBox("myBox"));
    } else {
      throw new RuntimeException("What?");
    }
  }
View Full Code Here

    eventBus.fireEvent(new AddTrafficCountRecordEvent());
  }   
 
  @UiHandler("toggleAllCheckboxes")
  void onClickToggleAllCheckboxes(ClickEvent e) {
    CheckBox master = (CheckBox) e.getSource();
    for (Iterator iterator = checkboxes.iterator(); iterator.hasNext();) {
      CheckBox cb = (CheckBox) iterator.next();
      cb.setValue(master.getValue());
    }
  }
View Full Code Here

  }

  private void deleteTrafficRecordCounts() {
    ArrayList<String> trafficRecordCountIds = new ArrayList<String>();
    for (Iterator iterator = checkboxes.iterator(); iterator.hasNext();) {
      CheckBox cb = (CheckBox) iterator.next();
      // boolean to see if it is checked
      if(cb.getValue())
      {
        trafficRecordCountIds.add(cb.getFormValue());
      }
    }

    // now delete based on the list of ids
    trafficCountRecordService.deleteTrafficCountRecords(trafficRecordCountIds,
View Full Code Here

      final TrafficCountRecord trafficCountRecord = trafficCountRecords.get(i);
     
      final String id = trafficCountRecord.getId();
     
      // setup the checkbox
      CheckBox cb = new CheckBox();
      cb.setFormValue(id); //store the id in the checkbox value
      checkboxes.add(cb); // keep track for selecting all|none to delete
      cb.setStyleName(style.checkbox());
     
      // extract the attributes
      String date = fmt.format(trafficCountRecord.getDate());
      String startTime = fmtHHMM.format(trafficCountRecord.getStartTime());
      String endTime = fmtHHMM.format(trafficCountRecord.getEndTime());
View Full Code Here

   
    Row(EntityInfo entity) {
      super();
      this.entity = entity;
     
      checkBox = new CheckBox();
     
//      Image infoImg = Main.images.metadata().createImage();
//      infoImg.addClickListener(new ClickListener() {
//        public void onClick(Widget sender) {
//          _pickedForInfo();        }
View Full Code Here

    bind();
  }

  @UiHandler("toggleAllCheckboxes")
  void onClickToggleAllCheckboxes(ClickEvent e) {
    CheckBox master = (CheckBox) e.getSource();
    GWT.log("toggleCheckboxes:" + master.getValue());
    for (Iterator iterator = checkboxes.iterator(); iterator.hasNext();) {
      CheckBox cb = (CheckBox) iterator.next();
      cb.setValue(master.getValue());
      GWT.log("cb: form value("+cb.getFormValue()+"), checked value("+cb.getValue()+")");
   
  }
View Full Code Here

    {
      deleteRoadDetails();
    } else {
      uncheckMasterCheckBox();
      for (Iterator iterator = checkboxes.iterator(); iterator.hasNext();) {
        CheckBox cb = (CheckBox) iterator.next();
        cb.setValue(false);
      }
    }
  } 
View Full Code Here

     * in the checkboxes array, but CheckBox cannot go over the wire,
     * so we need to transfer them into a String array here
     */
    ArrayList<String> roadDetailIds = new ArrayList<String>();
    for (Iterator iterator = checkboxes.iterator(); iterator.hasNext();) {
      CheckBox cb = (CheckBox) iterator.next();
      // boolean to see if it is checked
      if(cb.getValue())
      {
        roadDetailIds.add(cb.getFormValue());
      }
     
    }
    // now send the list into the async
    roadService.deleteRoadDetails(roadDetailIds, new AsyncCallback<Void>() {
View Full Code Here

TOP

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

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.