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

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


        notesPanel.clear();

        service.getNotes(new AsyncCallback<ArrayList<Note>>() {
            public void onFailure(Throwable throwable) {
                notesPanel.add(new HTML("No notes stored so far."));
                Window.alert("Could not retrieve notes: " + throwable.getMessage());
            }

            public void onSuccess(ArrayList<Note> notesList) {
                for (int i = 0; i < notesList.size(); i++) {
                    final Note note = (Note) notesList.get(i);

                    final HorizontalPanel noteEntry = new HorizontalPanel();
                    noteEntry.setStyleName("noteEntry");

                    final HTML noteTitle = new HTML(note.getTitle());
                    noteTitle.setStyleName("noteTitle");

                    final HTML noteText = new HTML(note.getText());
                    noteText.setStyleName("noteText");

                    final Button delButton = new Button("Delete");
                    delButton.setStyleName("noteControls");
                    delButton.addClickHandler(new ClickHandler() {

                        public void onClick(ClickEvent event) {
                            deleteNote(note.getPath());
                        }
                    });
                    noteEntry.add(noteTitle);
                    noteEntry.add(noteText);
                    noteEntry.add(delButton);

                    notesPanel.add(noteEntry);
                }

                if (notesList.size() == 0) {
                    notesPanel.add(new HTML("No notes stored so far."));
                }
            }
        });
    }
View Full Code Here


    PagingOptions pagingOptions = new PagingOptions(getPagingScrollTable());

    // Add the table to the page
    RootPanel.get().add(scrollTable);
    RootPanel.get().add(pagingOptions);
    RootPanel.get().add(new HTML("<BR>"));
    RootPanel.get().add(createTabPanel());
  }
View Full Code Here

    // Color cell editor
    RadioCellEditor<Serializable> colorEditor = new RadioCellEditor<Serializable>() {
      /**
       * An element used to string the HTML portion of the color.
       */
      private HTML html = new HTML();

      @Override
      protected void setValue(Object value) {
        html.setHTML(value.toString());
        super.setValue(html.getText());
      }
    };
    colorEditor.setLabel("Select a color:");
    for (int i = 0; i < DataSourceData.colors.length; i++) {
      String color = DataSourceData.colors[i];
View Full Code Here

    // Redraw the scroll table
    scrollTable.redraw();
   
    // Add the components to the page
    RootPanel.get().add(scrollTable);
    RootPanel.get().add(new HTML("<BR>"));
    RootPanel.get().add(createTabPanel());
  }
View Full Code Here

    // Create the current page box
    createCurPageBox();

    // Create the page count label
    numPagesLabel = new HTML();

    // Create the loading image
    loadingImage = new Image("scrollTableLoading.gif");
    loadingImage.setVisible(false);

    // Create the error label
    errorLabel = new HTML();
    errorLabel.setStylePrimaryName("errorMessage");

    // Add the widgets to the panel
    hPanel.add(createSpacer());
    hPanel.add(firstImage);
View Full Code Here

   * Create a widget that can be used to add space.
   *
   * @return a spacer widget
   */
  protected Widget createSpacer() {
    return new HTML("&nbsp;&nbsp;");
  }
View Full Code Here

            Label postT = new Label(post.getPostTitle());
            postT.addStyleDependentName("title");
            postSide.add(postT);

            Label postS = new HTML(post.getPostString());
            postSide.add(postS);

            mainP.add(authorSide);
            mainP.add(postSide);
View Full Code Here

    mainViewer = new YouTubeViewer("k56DbGDBsNk");
    mainViewer.setStyleName("YouTubeViewer");
    mainViewer.setWidth("443px");
    mainViewer.setHeight("369px");
    RootPanel.get().add(mainViewer);
    RootPanel.get().add(new HTML("<BR><BR>"));

    // Align options in a grid
    Grid grid = new Grid(5, 3);

    // Set video ID option
View Full Code Here

    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

    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

TOP

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

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.