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

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


  protected void onInitUI() {
    super.onInitUI();
    createWidgets();

    /* top table */
    final Grid grid = new Grid(2, 2);
    grid.setStyleName(Gerrit.RESOURCES.css().infoBlock());
    grid.setText(0, 0, Util.C.watchedProjectName());
    grid.setWidget(0, 1, nameTxt);

    grid.setText(1, 0, Util.C.watchedProjectFilter());
    grid.setWidget(1, 1, filterTxt);

    final CellFormatter fmt = grid.getCellFormatter();
    fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().topmost());
    fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topmost());
    fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().header());
    fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().header());
    fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().bottomheader());

    final FlowPanel fp = new FlowPanel();
    fp.setStyleName(Gerrit.RESOURCES.css().addWatchPanel());
    fp.add(grid);
    fp.add(addNew);
    fp.add(browse);
    add(fp);


    /* bottom table */
    add(watchesTab);
    add(delSel);


    /* popup */
    final FlowPanel pfp = new FlowPanel();
    sp = new ScrollPanel(projectsTab);
    sp.setSize("100%", "100%");
    pfp.add(sp);
    pfp.add(close);
    popup.setWidget(pfp);
    popup.setHeight("100%");
    popupPosition = new PopupPanel.PositionCallback() {

      public void setPosition(int offsetWidth, int offsetHeight) {
        int top = grid.getAbsoluteTop() - 50; // under page header
        // Try to place it to the right of everything else, but not
        // right justified
        int left =
            5 + Math.max(grid.getAbsoluteLeft() + grid.getOffsetWidth(),
                watchesTab.getAbsoluteLeft() + watchesTab.getOffsetWidth());
        if (top + offsetHeight > Window.getClientHeight()) {
          top = Window.getClientHeight() - offsetHeight;
        }
        if (left + offsetWidth > Window.getClientWidth()) {
View Full Code Here


    } else {
      labelIdx = 0;
      fieldIdx = 1;
    }

    info = new Grid((Gerrit.getConfig().siteHasUsernames() ? 1 : 0) + 4, 2);
    info.setStyleName(Gerrit.RESOURCES.css().infoBlock());
    info.addStyleName(Gerrit.RESOURCES.css().accountInfoBlock());
    add(info);

    int row = 0;
View Full Code Here

  /**
   * Display the table showing the Author, Committer and Download links,
   * followed by the action buttons.
   */
  public void ensureLoaded(final PatchSetDetail detail) {
    infoTable = new Grid(R_CNT, 2);
    infoTable.setStyleName(Gerrit.RESOURCES.css().infoBlock());
    infoTable.addStyleName(Gerrit.RESOURCES.css().patchSetInfoBlock());

    initRow(R_AUTHOR, Util.C.patchSetInfoAuthor());
    initRow(R_COMMITTER, Util.C.patchSetInfoCommitter());
View Full Code Here

  private void displayParents(final List<PatchSetInfo.ParentInfo> parents) {
    if (parents.size() == 0) {
      infoTable.setWidget(R_PARENTS, 1, new InlineLabel(Util.C.initialCommit()));
      return;
    }
    final Grid parentsTable = new Grid(parents.size(), 2);

    parentsTable.setStyleName(Gerrit.RESOURCES.css().parentsTable());
    parentsTable.addStyleName(Gerrit.RESOURCES.css().noborder());
    final CellFormatter ptfmt = parentsTable.getCellFormatter();
    int row = 0;
    for (PatchSetInfo.ParentInfo parent : parents) {
      parentsTable.setWidget(row, 0, new InlineLabel(parent.id.get()));
      ptfmt.addStyleName(row, 0, Gerrit.RESOURCES.css().noborder());
      ptfmt.addStyleName(row, 0, Gerrit.RESOURCES.css().monospace());
      parentsTable.setWidget(row, 1, new InlineLabel(parent.shortMessage));
      ptfmt.addStyleName(row, 1, Gerrit.RESOURCES.css().noborder());
      row++;
    }
    infoTable.setWidget(R_PARENTS, 1, parentsTable);
  }
View Full Code Here

  private Change.Id changeId;
  private AccountInfoCache accountCache = AccountInfoCache.empty();

  public ApprovalTable() {
    types = Gerrit.getConfig().getApprovalTypes();
    table = new Grid(1, 3);
    table.addStyleName(Gerrit.RESOURCES.css().infoTable());

    missing = new Widget() {
      {
        setElement(DOM.createElement("ul"));
View Full Code Here

  private final Change.Id changeId;
  private boolean loaded = false;

  public IncludedInTable(final Change.Id chId) {
    changeId = chId;
    table = new Grid(1, 1);
    initWidget(table);
  }
View Full Code Here

    table.setWidget(0, 1, txt_name);
    table.setWidget(1, 0, title_contact);
    table.setWidget(1, 1, txt_contact);
    // detail panel
    DisclosurePanel detailPanel = new DisclosurePanel(msg.detail());
    Grid detailGrid = new Grid(3, 2);
    // birthday
    HTML title_birthday = new HTML(msg.birthday());
    txt_birthday.setFormat(new DateBox.DefaultFormat(DateTimeFormat
        .getFormat("yyyy/MM/dd")));
    // sex
    HTML title_sex = new HTML(msg.sex());
    // ps
    HTML title_ps = new HTML(msg.ps());

    detailGrid.setWidget(0, 0, title_birthday);
    detailGrid.setWidget(0, 1, txt_birthday);
    detailGrid.setWidget(1, 0, title_sex);
    detailGrid.setWidget(1, 1, txt_sex);
    detailGrid.setWidget(2, 0, title_ps);
    detailGrid.setWidget(2, 1, txt_ps);
    detailPanel.setContent(detailGrid);
    table.setWidget(2, 0, detailPanel);
    table.getFlexCellFormatter().setColSpan(2, 0, 2);
    // button
    Button saveButton = new Button("save");
View Full Code Here

    }
   
    private AppLoadingView()
    {       
        final Image ajaxImage = new Image(Resources.INSTANCE.loaderImage());
        final Grid grid = new Grid(1, 2)
        grid.setWidget(0, 0, ajaxImage);
        grid.setText(0, 1, constants.loadingViewLabelLoading());   
        this.container.add(grid);
        add(this.container);      
    }
View Full Code Here

      this.setStyleName(css.popupPanel());
      final Button addButton = new Button("Add");
      VerticalPanel popupPanel = new VerticalPanel();
      add(popupPanel);

      Grid fieldPanel = new Grid(2, 2);
      fieldPanel.setHTML(0, 0, "Host:");
      fieldPanel.setWidget(0, 1, hostField);
      fieldPanel.setHTML(1, 0, "Port:");
      fieldPanel.setWidget(1, 1, portField);
      popupPanel.add(fieldPanel);
      addButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          String hostString = hostField.getText();
          String portString = portField.getText();
View Full Code Here

                                      dropDownFields );

    }

    private Widget getRuleAttributesPanel() {
        ruleAttributesGrid = new Grid( 2, 4 );
        ruleAttributesGrid.setCellSpacing( 5 );
        ruleAttributesGrid.setCellPadding( 5 );
        ruleAttributesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.ruleFlowGroup());
        ruleAttributesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.agendaGroup());
View Full Code Here

TOP

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

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.