Package com.google.gwt.gen2.logging.shared

Examples of com.google.gwt.gen2.logging.shared.Level


    control.setWidget(0, 1, loggingMessage);
    Iterator<Level> levels = Log.levelIterator();
    final DropDownListBox<Level> levelList = new DropDownListBox<Level>();

    while (levels.hasNext()) {
      final Level level = levels.next();
      if (level != Level.ALL || level != Level.OFF) {
        levelList.addItem(level.getName(), level, "logging level "
            + level.getName().toLowerCase(), "use <b> "
            + level.getName().toLowerCase() + "</b> level");
      }
    }
    control.setWidget(0, 2, levelList);
    levelList.setValue(Level.INFO);
View Full Code Here


      add(new HTML("<h3>" + title + "</h3>"));

      final DropDownListBox<Level> levelList = new DropDownListBox<Level>("");
      Iterator<Level> levels = Log.levelIterator();
      while (levels.hasNext()) {
        final Level level = levels.next();
        levelList.addItem(level.getName(), level, "logging level "
            + level.getName().toLowerCase(), "handler level: <b> "
            + level.getName() + "</b>");
      }
      levelList.setValue(Level.OFF);
      handler.setLevel(Level.OFF);

      levelList.addValueChangeHandler(new ValueChangeHandler<Level>() {
View Full Code Here

    // Add button to change status
    {
      Button button = new Button("Set Resize Policy", new ClickHandler() {
        public void onClick(ClickEvent event) {
          AbstractScrollTable scrollTable = ScrollTableDemo.get().getScrollTable();
          switch (policyBox.getSelectedIndex()) {
            case 0:
              scrollTable.setColumnResizePolicy(ScrollTable.ColumnResizePolicy.DISABLED);
              break;
            case 1:
              scrollTable.setColumnResizePolicy(ScrollTable.ColumnResizePolicy.SINGLE_CELL);
              break;
            case 2:
              scrollTable.setColumnResizePolicy(ScrollTable.ColumnResizePolicy.MULTI_CELL);
              break;
          }
        }
      });
      form.addButton(button);
    }

    // Add button to reset column widths
    {
      Button button = new Button("Reset Column Widths", new ClickHandler() {
        public void onClick(ClickEvent event) {
          AbstractScrollTable scrollTable = ScrollTableDemo.get().getScrollTable();
          scrollTable.resetColumnWidths();
        }
      });
      form.addButton(button);
    }
View Full Code Here

    // Add button to change status
    {
      Button button = new Button("Set Scroll Policy", new ClickHandler() {
        public void onClick(ClickEvent event) {
          AbstractScrollTable scrollTable = ScrollTableDemo.get().getScrollTable();
          switch (scrollPolicyBox.getSelectedIndex()) {
            case 0:
              scrollTable.setScrollPolicy(ScrollTable.ScrollPolicy.BOTH);
              break;
            case 1:
              scrollTable.setScrollPolicy(ScrollTable.ScrollPolicy.HORIZONTAL);
              break;
            case 2:
              scrollTable.setScrollPolicy(ScrollTable.ScrollPolicy.DISABLED);
              break;
          }
        }
      });
      form.addButton(button);
View Full Code Here

    // Add button to change status
    {
      Button button = new Button("Set Resize Policy", new ClickHandler() {
        public void onClick(ClickEvent event) {
          AbstractScrollTable scrollTable = ScrollTableDemo.get().getScrollTable();
          switch (policyBox.getSelectedIndex()) {
            case 0:
              scrollTable.setResizePolicy(ScrollTable.ResizePolicy.UNCONSTRAINED);
              break;
            case 1:
              scrollTable.setResizePolicy(ScrollTable.ResizePolicy.FLOW);
              break;
            case 2:
              scrollTable.setResizePolicy(ScrollTable.ResizePolicy.FIXED_WIDTH);
              break;
            case 3:
              scrollTable.setResizePolicy(ScrollTable.ResizePolicy.FILL_WIDTH);
              break;
          }
        }
      });
      form.addButton(button);
View Full Code Here

    // Initialize the cell editor
    InlineCellEditor<String> editor = createCellEditor();

    // Create the edit info
    Grid grid = new Grid(1, 1);
    CellEditInfo cellEditInfo = new CellEditInfo(grid, 0, 0);

    // Create the callback
    TestCallback<String> callback = new TestCallback<String>(cellEditInfo);

    // Edit the cell
View Full Code Here

    // Initialize the cell editor
    InlineCellEditor<String> editor = createCellEditor();

    // Create the edit info
    Grid grid = new Grid(1, 1);
    CellEditInfo cellEditInfo = new CellEditInfo(grid, 0, 0);

    // Create the callback
    TestCallback<String> callback = new TestCallback<String>(cellEditInfo);

    // Edit the cell
View Full Code Here

  /**
   * Test the {@link CellEditInfo} inner class.
   */
  public void testCellEditInfo() {
    Grid grid = new Grid(1, 1);
    CellEditInfo info = new CellEditInfo(grid, 1, 2);
    assertEquals(grid, info.getTable());
    assertEquals(1, info.getRowIndex());
    assertEquals(2, info.getCellIndex());
  }
View Full Code Here

      return;
    }

    // Forward the request to the cell editor
    final RowType rowValue = getRowValue(row);
    CellEditInfo editInfo = new CellEditInfo(getDataTable(), row, column);
    cellEditor.editCell(editInfo, colDef.getCellValue(rowValue),
        new CellEditor.Callback() {
          public void onCancel(CellEditInfo cellEditInfo) {
          }
View Full Code Here

   * Test the column width info.
   */
  public void testCurrentColumnWidthInfo() {
    // getPercentageDifference
    {
      ColumnWidthInfo info = new ColumnWidthInfo(100, 300, 200, 150);

      // getters
      assertEquals(150, info.getCurrentWidth());
      assertEquals(100, info.getMinimumWidth());
      assertEquals(300, info.getMaximumWidth());
      assertEquals(200, info.getPreferredWidth());

      // percentage difference
      info.setNewWidth(150);
      assertEquals(-0.25, info.getPercentageDifference(), 0.001);

      // required width
      info.setRequiredWidth(40);
      assertEquals(40, info.getRequiredWidth());

      // new width
      info.setNewWidth(190);
      assertEquals(190, info.getNewWidth());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.gen2.logging.shared.Level

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.