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

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


     */
    private class PostDisplay extends Composite {

        public PostDisplay(ForumPost post) {

            HorizontalPanel mainP = new HorizontalPanel();

            FlowPanel authorSide = new FlowPanel();
            authorSide.setStylePrimaryName("AuthorSide");
            VerticalPanel postSide = new VerticalPanel();
            postSide.setStylePrimaryName("PostSide");

            authorSide.add(new Label("Author: "));
            UserLink author = new UserLink(post.getAuthor());
            authorSide.add(author);

            Label date = new Label(df.format(post.getDate()));
            date.addStyleDependentName("Date");
            authorSide.add(date);

            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);

            initWidget(mainP);
            mainP.setStylePrimaryName("ForumPost");
        }
View Full Code Here


        textArea = new RichTextArea();

        textArea.setSize("35em", "15em");
        RichTextToolbar toolbar = new RichTextToolbar(textArea);

        HorizontalPanel hp = new HorizontalPanel();
        hp.add(new Label("Title:"));
        hp.add(titleBox);
        mainP.add(hp);

        mainP.add(toolbar);
        mainP.add(textArea);
View Full Code Here

    private HorizontalPanel nav;

    public ForumControlPanel(ForumTopic topic, PostsList result,
            int start, int maxperpage) {
        HorizontalPanel mainP = new HorizontalPanel();

        nav = new HorizontalPanel();
        nav.setStylePrimaryName("ForumControl");
        mainP.add(nav);

        initWidget(mainP);
        setControls(topic, start, maxperpage, result.getTotalCount());
    }
View Full Code Here

    heightWidthBox.addItem("height");
    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>"));
View Full Code Here

  @Override
  protected Widget onInitialize() {
    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);
    grid.setWidget(2, 2, panel3);
View Full Code Here

    DOM.setAttribute(prevMonth.getElement(), "title", "Previous Month");
    DOM.setAttribute(prevYear.getElement(), "title", "Previous Year");
    DOM.setAttribute(nextMonth.getElement(), "title", "Next Month");
    DOM.setAttribute(nextYear.getElement(), "title", "Next Year");
   
    HorizontalPanel prevButtons = new HorizontalPanel();
    prevMonth.setStyleName("monthYearTraversorBtn");
    prevYear.setStyleName("monthYearTraversorBtn");
    prevButtons.add(prevYear);
    prevButtons.add(prevMonth);
   
    HorizontalPanel nextButtons = new HorizontalPanel();
    nextMonth.setStyleName("monthYearTraversorBtn");
    nextYear.setStyleName("monthYearTraversorBtn");
    nextButtons.add(nextMonth);
    nextButtons.add(nextYear);
   
    this.add(prevButtons, DockPanel.WEST);
    this.setCellHorizontalAlignment(prevButtons, DockPanel.ALIGN_LEFT);
    this.add(nextButtons, DockPanel.EAST);
    this.setCellHorizontalAlignment(nextButtons, DockPanel.ALIGN_RIGHT);
View Full Code Here

    label.setText(text);
  }

  @Override
  protected void setup() {
    HorizontalPanel p = new HorizontalPanel();
    p.add(backwards);
    backwards.addStyleName(Styles.MONTH_BACKWARD);
    p.add(label);
    label.addStyleName(Styles.MONTH_LABEL);
    p.add(forwards);
    p.setCellWidth(label, "100%");
    forwards.addStyleName(Styles.MONTH_FORWARD);
    initWidget(p);
    setStyleName(Styles.MONTH_SELECTOR);

    backwards.addClickListener(new ClickListener() {
View Full Code Here

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
    HorizontalPanel master = new HorizontalPanel();
    SimpleLogHandler handler = new SimpleLogHandler(false);
    Log.addLogHandler(handler);

    TabPanel panel = new TabPanel();
    LazyPanel.addTabListener(panel);
    master.add(panel);
    master.add(handler.getWidget());
    panel.add(new LazyPanel() {

      @Override
      public Widget createWidget() {
        return simplePicker();
View Full Code Here

    RootPanel.get().add(master);
  }

  private Widget dateRange() {
    VerticalPanel v = new VerticalPanel();
    HorizontalPanel p = new HorizontalPanel();
    v.add(p);
    start = new DateBox();
    final DateBox end = new DateBox();

    start.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent e) {
        if (e.getKeyCode() == KEY_RIGHT
            && start.getCursorPos() == start.getText().length()) {
          start.hideDatePicker();
          end.setFocus(true);
        }
      }
    });

    end.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent e) {
        if ((e.getKeyCode() == KEY_LEFT) && end.getCursorPos() == 0) {
          start.setFocus(true);
          end.hideDatePicker();
        }
      }
    });

    end.getDatePicker().addChangeHandler(new ChangeHandler<Date>() {
      public void onChange(ChangeEvent<Date> event) {
        start.removeStyleName("user-modified");
      }
    });

    start.showDate(new Date());

    p.add(start);
    Label l = new Label(" - ");
    l.setStyleName("filler");
    p.add(l);
    p.add(end);
    HorizontalPanel h2 = new HorizontalPanel();
    v.add(h2);
    h2.add(new Button("Short format", new ClickListener() {

      public void onClick(Widget sender) {
        start.setDateFormat(DateTimeFormat.getShortDateFormat());
        end.setDateFormat(DateTimeFormat.getShortDateFormat());
      }
    }));
    h2.add(new Button("Long format", new ClickListener() {

      public void onClick(Widget sender) {
        start.setDateFormat(DateTimeFormat.getLongDateFormat());
        end.setDateFormat(DateTimeFormat.getLongDateFormat());
      }
View Full Code Here

    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,
        HasHorizontalAlignment.ALIGN_LEFT);

    panel.add(title);
    panel.add(controlButton);
    panel.setCellWidth(controlButton, "1px");
    panel.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_CENTER);

    navBar.add(panel);

    panel.setStyleName("nav-Tree-title");
    wrapper = new MyStackPanel();
    wrapper.setHeight("250px");

    final FastTree contents = new FastTree();
    wrapper.add(contents, "<b>People</b>", true);
View Full Code Here

TOP

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

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.