Examples of HTML


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

    heightWidthBox.addItem("width");
    heightWidthText.setWidth("50px");
    heightWidthText.setText("40%");

    HorizontalPanel styleHolder = new HorizontalPanel();
    styleHolder.add(new HTML("Set table "));
    styleHolder.add(heightWidthBox);
    styleHolder.add(new HTML(" to "));
    styleHolder.add(heightWidthText);
    styleHolder.add(heightWidthButton);

    VerticalPanel panel = new VerticalPanel();
    panel.add(toggleButtonGrid);
    panel.add(new HTML(
        "<BR><B>Change the overall height/width of the table:</B>"));
    panel.add(styleHolder);
    return panel;
  }
View Full Code Here

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

    grid = new Grid(4, 3);

    // Row Index 1
    HorizontalPanel panel1 = new HorizontalPanel();
    panel1.add(moveRowUpButton);
    panel1.add(new HTML("&nbsp;"));
    panel1.add(moveRowDownButton);
    panel1.add(new HTML("&nbsp;"));
    panel1.add(reverseRowsButton);
    rowIndexBox1.setWidth("50px");
    rowIndexBox1.setText("3");
    grid.setHTML(0, 0, "<B>Row 1:</B>");
    grid.setWidget(0, 1, rowIndexBox1);
    grid.setWidget(0, 2, panel1);

    // Row Index 2
    HorizontalPanel panel2 = new HorizontalPanel();
    panel2.add(swapRowsButton);
    rowIndexBox2.setWidth("50px");
    rowIndexBox2.setText("4");
    grid.setHTML(1, 0, "<B>Row 2:</B>");
    grid.setWidget(1, 1, rowIndexBox2);
    grid.setWidget(1, 2, panel2);

    // Column Index
    HorizontalPanel panel3 = new HorizontalPanel();
    panel3.add(sortColumnButton);
    panel3.add(new HTML("&nbsp;"));
    panel3.add(makeSortableButton);
    panel3.add(new HTML("&nbsp;"));
    panel3.add(makeUnsortableButton);
    columnIndexBox.setWidth("50px");
    columnIndexBox.setText("3");
    grid.setHTML(2, 0, "<B>Column:</B>");
    grid.setWidget(2, 1, columnIndexBox);
View Full Code Here

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

    controlButton = createToggleButton();

    MyStackPanel wrapper = new MyStackPanel();
    FlowPanel navBar = new FlowPanel();
    navBar.setSize("200px", "100%");
    final HTML title = new HTML("School Directory");

    HorizontalPanel panel = new HorizontalPanel();
    panel.setWidth("100%");

    panel.setCellHorizontalAlignment(controlButton,
View Full Code Here

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

    p.add(zoomingTree(), "zooming tree");
    return p;
  }

  public void report(String s) {
    RootPanel.get().add(new HTML(s));
  }
View Full Code Here

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

   */
  public void onModuleLoad() {
    StyleInjector.injectStylesheet(Resources.INSTANCE.css().getText(),
        Resources.INSTANCE);
    RootPanel.get().add(
        new HTML(
            "<h1>This, a picture of my mom and daughter, it should take some time to load the first time. It should load like lighting the second time to show the value of immutable resources.</h1>"));
  }
View Full Code Here

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

        mainProgressBar.setMaxProgress(new Float(maxBox.getText()).floatValue());
      }
    }));

    // Show or hide the text
    final HTML textVisibleLabel = new HTML("visible");
    grid.setWidget(3, 1, textVisibleLabel);
    grid.setHTML(3, 2, "Show or hide the text in the progress bar.");
    grid.setWidget(3, 0, new Button("Toggle Text", new ClickListener() {
      public void onClick(Widget sender) {
        if (mainProgressBar.isTextVisible()) {
          textVisibleLabel.setHTML("hidden");
          mainProgressBar.setTextVisible(false);
        } else {
          textVisibleLabel.setHTML("visible");
          mainProgressBar.setTextVisible(true);
        }
      }
    }));

    // Add the default text option
    final HTML defaultTextLabel = new HTML("custom");
    grid.setWidget(4, 1, defaultTextLabel);
    grid.setHTML(4, 2, "Override the format of the text with a custom"
        + "format.");
    grid.setWidget(4, 0, new Button("Toggle Custom Text", new ClickListener() {
      public void onClick(Widget sender) {
        if (useCustomText) {
          defaultTextLabel.setHTML("default");
          useCustomText = false;
          mainProgressBar.setProgress(mainProgressBar.getProgress());
        } else {
          defaultTextLabel.setHTML("custom");
          useCustomText = true;
          mainProgressBar.setProgress(mainProgressBar.getProgress());
        }
      }
    }));

    // Add static resize timer methods
    final HTML resizeCheckLabel = new HTML("enabled");
    grid.setWidget(5, 1, resizeCheckLabel);
    grid.setHTML(5, 2, "When resize checking is enabled, a Timer will "
        + "periodically check if the Widget's dimensions have changed.  If "
        + "they change, the widget will be redrawn.");
    grid.setWidget(5, 0, new Button("Toggle Resize Checking",
        new ClickListener() {
          public void onClick(Widget sender) {
            if (ResizableWidgetCollection.get().isResizeCheckingEnabled()) {
              ResizableWidgetCollection.get().setResizeCheckingEnabled(false);
              resizeCheckLabel.setHTML("disabled");

            } else {
              ResizableWidgetCollection.get().setResizeCheckingEnabled(true);
              resizeCheckLabel.setHTML("enabled");
            }
          }
        }));

    // Create a form to set width of element
    final TextBox widthBox = new TextBox();
    widthBox.setText("50%");
    grid.setWidget(6, 1, widthBox);
    grid.setHTML(6, 2, "Set the width of the widget.  Use this to see how "
        + "resize checking detects the new dimensions and redraws the widget.");
    grid.setWidget(6, 0, new Button("Set Width", new ClickListener() {
      public void onClick(Widget sender) {
        mainProgressBar.setWidth(widthBox.getText());
      }
    }));

    // Add all components to the page
    RootPanel.get().add(mainProgressBar);
    RootPanel.get().add(new HTML("<BR>"));
    RootPanel.get().add(grid);
    RootPanel.get().add(new HTML("<BR>Additional Progress Bars:<BR>"));
    RootPanel.get().add(exampleBar1);
    RootPanel.get().add(new HTML("<BR>"));
    RootPanel.get().add(exampleBar2);

    // Simulate progress over time
    simulateProgress();
  }
View Full Code Here

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

  Panel panel;

  public void onModuleLoad() {
    panel = new VerticalPanel();
    RootPanel.get().add(panel);
    panel.add(new HTML(
        "<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());
      }
    });
    columns.setText(numColumns + "");

    panel.add(new HTML(
        "<p/><p/><b>Clear Table now </b> (clearing will also happen if the buttons are clicked below)"));
    panel.add(new Button("Go", new ClickListener() {

      public void onClick(Widget sender) {
        clearTable();
      }

    }));

    panel.add(new HTML("<p/><p/><b> Use the traditional FlexTable API</b>"));
    Button flexTableAPI = new Button("Go", new ClickListener() {

      public void onClick(Widget sender) {
        clearTable();
        long milli = System.currentTimeMillis();
        FlexTable newTable = new FlexTable();
        usingFlexTableAPI(newTable);
        finishTable(newTable, milli);
      }
    });
    panel.add(flexTableAPI);

    panel.add(new HTML("<p/><p/><b> Use the traditional Grid API</b>"));
    Button gridAPI = new Button("Go", new ClickListener() {
      public void onClick(Widget sender) {
        clearTable();
        long milli = System.currentTimeMillis();
        Grid newTable = new Grid();
        usingGridAPI(newTable);
        finishTable(newTable, milli);
      }

    });
    panel.add(gridAPI);

    panel.add(new HTML("<p/><p/><b> Use Async BulkLoadedTable API</b>"));
    Button asyncAPI = new Button("Go", new ClickListener() {
      public void onClick(Widget sender) {
        clearTable();
        long milli = System.currentTimeMillis();
        FlexTable table = new FlexTable();
        usingBulkLoadedTableAPI(table, milli);
      }
    });

    panel.add(asyncAPI);

    panel.add(new HTML("<p/><p/><b> Use the PreloadedTable  API</b>"));
    Button pendingAPI = new Button("Go", new ClickListener() {

      public void onClick(Widget sender) {
        clearTable();
        long milli = System.currentTimeMillis();
View Full Code Here

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

   * @param width width of panel
   * @param pinnedToggle toggle for pinned state
   * @param contents contents to be displayed
   */
  public PinnedPanel(int width, final ToggleButton pinnedToggle, Widget contents) {
    this(width, pinnedToggle, contents, new HTML());
  }
View Full Code Here

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

    Grid grid = new Grid(9, 3);
    grid.setBorderWidth(1);
    grid.setCellPadding(3);

    // The type of text to display
    final HTML defaultTextLabel = new HTML("custom");

    // Set the current slider position
    curBox.setText("50.0");
    grid.setWidget(0, 1, curBox);
    grid.setHTML(0, 2, "The current value of the knob.");
    grid.setWidget(0, 0, new Button("Set Current Value", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setCurrentValue(new Float(curBox.getText()).floatValue());
      }
    }));

    // Set the minimum value
    final TextBox minBox = new TextBox();
    minBox.setText("0.0");
    grid.setWidget(1, 1, minBox);
    grid.setHTML(1, 2, "The lower bounds (minimum) of the range.");
    grid.setWidget(1, 0, new Button("Set Min Value", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setMinValue(new Float(minBox.getText()).floatValue());
      }
    }));

    // Set the maximum value
    final TextBox maxBox = new TextBox();
    maxBox.setText("100.0");
    grid.setWidget(2, 1, maxBox);
    grid.setHTML(2, 2, "The upper bounds (maximum) of the range.");
    grid.setWidget(2, 0, new Button("Set Max Value", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setMaxValue(new Float(maxBox.getText()).floatValue());
      }
    }));

    // Set the step size
    final TextBox stepSizeBox = new TextBox();
    stepSizeBox.setText("1.0");
    grid.setWidget(3, 1, stepSizeBox);
    grid.setHTML(3, 2, "The increments between each knob position.");
    grid.setWidget(3, 0, new Button("Set Step Size", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setStepSize(new Float(stepSizeBox.getText()).floatValue());
      }
    }));

    // Set the number of tick marks
    final TextBox numTicksBox = new TextBox();
    numTicksBox.setText("10");
    grid.setWidget(4, 1, numTicksBox);
    grid.setHTML(4, 2,
        "The vertical black lines along the range of value.  Note that the "
            + "number of ticks is actually one more than the number you "
            + "specify, so setting the number of ticks to one will display a "
            + "tick at each end of the slider.");
    grid.setWidget(4, 0, new Button("Set Num Ticks", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setNumTicks(new Integer(numTicksBox.getText()).intValue());
      }
    }));

    // Set the number of labels
    final TextBox numLabelsBox = new TextBox();
    numLabelsBox.setText("5");
    grid.setWidget(5, 1, numLabelsBox);
    grid.setHTML(5, 2, "The labels above the ticks.");
    grid.setWidget(5, 0, new Button("Set Num Labels", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setNumLabels(new Integer(numLabelsBox.getText()).intValue());
      }
    }));

    // Create a form to set width of element
    final TextBox widthBox = new TextBox();
    widthBox.setText("50%");
    grid.setWidget(6, 1, widthBox);
    grid.setHTML(6, 2, "Set the width of the slider.  Use this to see how "
        + "resize checking detects the new dimensions and redraws the widget.");
    grid.setWidget(6, 0, new Button("Set Width", new ClickListener() {
      public void onClick(Widget sender) {
        mainSliderBar.setWidth(widthBox.getText());
      }
    }));

    // Add the default text option
    grid.setWidget(7, 1, defaultTextLabel);
    grid.setHTML(7, 2, "Override the format of the labels with a custom"
        + "format.");
    grid.setWidget(7, 0, new Button("Toggle Custom Text", new ClickListener() {
      public void onClick(Widget sender) {
        if (useCustomText) {
          defaultTextLabel.setHTML("default");
          useCustomText = false;
          mainSliderBar.redraw();
        } else {
          defaultTextLabel.setHTML("custom");
          useCustomText = true;
          mainSliderBar.redraw();
        }
      }
    }));

    // Add static resize timer methods
    final HTML resizeCheckLabel = new HTML("enabled");
    grid.setWidget(8, 1, resizeCheckLabel);
    grid.setHTML(8, 2, "When resize checking is enabled, a Timer will "
        + "periodically check if the Widget's dimensions have changed.  If "
        + "they change, the widget will be redrawn.");
    grid.setWidget(8, 0, new Button("Toggle Resize Checking",
        new ClickListener() {
          public void onClick(Widget sender) {
            if (ResizableWidgetCollection.get().isResizeCheckingEnabled()) {
              ResizableWidgetCollection.get().setResizeCheckingEnabled(false);
              resizeCheckLabel.setHTML("disabled");

            } else {
              ResizableWidgetCollection.get().setResizeCheckingEnabled(true);
              resizeCheckLabel.setHTML("enabled");
            }
          }
        }));

    // Add elements to page
    RootPanel.get().add(mainSliderBar);
    RootPanel.get().add(new HTML("<BR>"));
    RootPanel.get().add(grid);
    RootPanel.get().add(new HTML("<BR>Additional SliderBars:<BR>"));
    RootPanel.get().add(exampleBar1);
    RootPanel.get().add(new HTML("<BR>"));
    RootPanel.get().add(exampleBar2);
  }
View Full Code Here

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

  public void onModuleLoad() {
    RootPanel.get().add(new FastTreeDemo().createDemo());
  }

  public void report(String s) {
    RootPanel.get().add(new HTML(s));
  }
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.