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

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


public  class Botones extends Composite  implements BotonesInterfaces{

  public Botones() {
   
    Grid grid = new Grid(1, 3);
    initWidget(grid);
    grid.setSize("", "");
   
    Button buttonGuardar = new Button("");
    buttonGuardar.setText("Guardar");
    grid.setWidget(0, 1, buttonGuardar);
    buttonGuardar.setSize("", "");
    buttonGuardar.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        guardar();
      }
    });
   
    Button buttonReestablecer = new Button("");
    buttonReestablecer.setText("Restablecer");
    grid.setWidget(0, 2, buttonReestablecer);
    buttonReestablecer.setSize("", "");
    buttonReestablecer.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        restablecer();
      }
    });
   
    grid.getCellFormatter().setWidth(0, 0, "300px");
    grid.getCellFormatter().setHeight(0, 0, "15px");
    grid.getCellFormatter().setWidth(0, 1, "80px");
    grid.getCellFormatter().setWidth(0, 2, "80px");
  }
View Full Code Here


public class VerProfesional extends Composite {

  public VerProfesional() {
   
    Grid grid = new Grid(3, 2);
    initWidget(grid);
    grid.setSize("295px", "86px");
   
    Label lblCampoEjemplo = new Label("Campo Ejemplo");
    grid.setWidget(0, 0, lblCampoEjemplo);
   
    Label label_1 = new Label("<Valor Ejemplo>");
    grid.setWidget(0, 1, label_1);
   
    Label label = new Label("Campo Ejemplo");
    grid.setWidget(1, 0, label);
   
    Label label_3 = new Label("<Valor Ejemplo>");
    grid.setWidget(1, 1, label_3);
   
    Label label_2 = new Label("Campo Ejemplo");
    grid.setWidget(2, 0, label_2);
   
    Label label_4 = new Label("<Valor Ejemplo>");
    grid.setWidget(2, 1, label_4);
   
  }
View Full Code Here

public class IngresarProfesional extends Composite {

  public IngresarProfesional() {
   
    Grid grid = new Grid(3, 2);
    initWidget(grid);
    grid.setSize("395px", "96px");
   
    Label lblCampoEjemplo = new Label("Campo Ejemplo");
    grid.setWidget(0, 0, lblCampoEjemplo);
   
    TextBox textBox = new TextBox();
    grid.setWidget(0, 1, textBox);
   
    Label lblCampoEjemplo_1 = new Label("Campo Ejemplo");
    grid.setWidget(1, 0, lblCampoEjemplo_1);
   
    TextBox textBox_1 = new TextBox();
    grid.setWidget(1, 1, textBox_1);
   
    Label lblCampoEjemplo_2 = new Label("Campo Ejemplo");
    grid.setWidget(2, 0, lblCampoEjemplo_2);
   
    TextBox textBox_2 = new TextBox();
    grid.setWidget(2, 1, textBox_2);
  }
View Full Code Here

    this.people = people;
    this.cellSize = height;
    this.noPhotoUrl = noPhotoUrl;
    DockLayoutPanel panel = new DockLayoutPanel(Unit.PX);

    friendsGrid = new Grid(1, pageSize);
    friendsGrid.setWidth("100%");
    friendsGrid.setCellPadding(0);
    friendsGrid.setCellSpacing(0);

    Button prevButton = new Button("&lt;");
View Full Code Here

     */
    root.add(createGrid());
  }

  private Grid createGrid() {
    final Grid grid = new Grid(3, 1);
    final PagingTable table = createTable();
    table.setSize("100%", "100%");
    grid.setWidget(0, 0, table);
    grid.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_TOP);
    grid.getCellFormatter().setWidth(0, 0, "100%");
    grid.getCellFormatter().setHeight(0, 0, "100%");
    HorizontalPanel hpanel = new HorizontalPanel();
    hpanel.add(new Label("Show Column:"));
    for(int i = 0; i < table.getColumnLayout().getTotalColumnCount(); ++i) {
      final CheckBox checkbox = new CheckBox(String.valueOf(i));
      checkbox.setValue(true);
      hpanel.add(checkbox);
      final int ii = i;
      checkbox.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          table.show(ii, checkbox.getValue());
          table.update();
        }
      });
    }
    grid.setWidget(1, 0, hpanel);
    hpanel = new HorizontalPanel();
    hpanel.add(new Button("Clear", new ClickHandler() {
      public void onClick(ClickEvent event) {
        table.clear();
      }     
    }));
    hpanel.add(new Button("Reset", new ClickHandler() {
      public void onClick(ClickEvent event) {
        table.reset();
      }     
    }));
    hpanel.add(new Button("Simulate Failure", new ClickHandler() {
      public void onClick(ClickEvent event) {
        table.onFailure(null);
      }     
    }));
    grid.setWidget(2, 0, hpanel);
    grid.setSize("100%", "100%");
    return grid;
  }
View Full Code Here

    final RootPanel gBottomMenu = RootPanel.get("gerrit_btmmenu");

    gTopMenu.setStyleName(RESOURCES.css().gerritTopMenu());
    gBody.setStyleName(RESOURCES.css().gerritBody());

    final Grid menuLine = new Grid(1, 3);
    menuLeft = new MorphingTabPanel();
    menuRight = new LinkMenuBar();
    searchPanel = new SearchPanel();
    menuLeft.setStyleName(RESOURCES.css().topmenuMenuLeft());
    menuLine.setStyleName(RESOURCES.css().topmenu());
    gTopMenu.add(menuLine);
    final FlowPanel menuRightPanel = new FlowPanel();
    menuRightPanel.setStyleName(RESOURCES.css().topmenuMenuRight());
    menuRightPanel.add(menuRight);
    menuRightPanel.add(searchPanel);
    menuLine.setWidget(0, 0, menuLeft);
    menuLine.setWidget(0, 1, new FlowPanel());
    menuLine.setWidget(0, 2, menuRightPanel);
    final CellFormatter fmt = menuLine.getCellFormatter();
    fmt.setStyleName(0, 0, RESOURCES.css().topmenuTDmenu());
    fmt.setStyleName(0, 1, RESOURCES.css().topmenuTDglue());
    fmt.setStyleName(0, 2, RESOURCES.css().topmenuTDmenu());

    siteHeader = RootPanel.get("gerrit_header");
View Full Code Here

    super.onInitUI();

    addPanel = new FlowPanel();
    addPanel.setStyleName(Gerrit.RESOURCES.css().addSshKeyPanel());

    final Grid addGrid = new Grid(2, 2);

    nameTxtBox = new HintTextBox();
    nameTxtBox.setVisibleLength(50);
    nameTxtBox.setHintText(Util.C.defaultBranchName());
    nameTxtBox.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
          doAddNewBranch();
        }
      }
    });
    addGrid.setText(0, 0, Util.C.columnBranchName() + ":");
    addGrid.setWidget(0, 1, nameTxtBox);

    irevTxtBox = new HintTextBox();
    irevTxtBox.setVisibleLength(50);
    irevTxtBox.setHintText(Util.C.defaultRevisionSpec());
    irevTxtBox.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
          doAddNewBranch();
        }
      }
    });
    addGrid.setText(1, 0, Util.C.initialRevision() + ":");
    addGrid.setWidget(1, 1, irevTxtBox);

    addBranch = new Button(Util.C.buttonAddBranch());
    addBranch.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(final ClickEvent event) {
View Full Code Here

    faxTxt = new NpTextBox();
    faxTxt.setVisibleLength(30);
    faxTxt.setMaxLength(30);

    final Grid infoSecure = new Grid(4, 2);
    infoSecure.setStyleName(Gerrit.RESOURCES.css().infoBlock());
    infoSecure.addStyleName(Gerrit.RESOURCES.css().accountInfoBlock());

    final HTML privhtml = new HTML(Util.C.contactPrivacyDetailsHtml());
    privhtml.setStyleName(Gerrit.RESOURCES.css().accountContactPrivacyDetails());

    hasContact = new Label();
    hasContact.setStyleName(Gerrit.RESOURCES.css().accountContactOnFile());
    hasContact.setVisible(false);

    if (Gerrit.getConfig().isUseContactInfo()) {
      body.add(privhtml);
      body.add(hasContact);
      body.add(infoSecure);
    }

    row(infoSecure, 0, Util.C.contactFieldAddress(), addressTxt);
    row(infoSecure, 1, Util.C.contactFieldCountry(), countryTxt);
    row(infoSecure, 2, Util.C.contactFieldPhone(), phoneTxt);
    row(infoSecure, 3, Util.C.contactFieldFax(), faxTxt);

    infoSecure.getCellFormatter().addStyleName(0, 0, Gerrit.RESOURCES.css().topmost());
    infoSecure.getCellFormatter().addStyleName(0, 1, Gerrit.RESOURCES.css().topmost());
    infoSecure.getCellFormatter().addStyleName(3, 0, Gerrit.RESOURCES.css().bottomheader());

    final OnEditEnabler sbl = new OnEditEnabler(save);
    sbl.listenTo(addressTxt);
    sbl.listenTo(countryTxt);
    sbl.listenTo(phoneTxt);
View Full Code Here

  private KeyCommand cmds[] = new KeyCommand[2];

  NavLinks(KeyCommandSet kcs, PatchSet.Id forPatch) {
    patchSetId = forPatch;
    keys = kcs;
    table = new Grid(1, 3);
    initWidget(table);

    final CellFormatter fmt = table.getCellFormatter();
    table.setStyleName(Gerrit.RESOURCES.css().sideBySideScreenLinkTable());
    fmt.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
View Full Code Here

        && Gerrit.getConfig().canEdit(FieldName.USER_NAME)) {
      final FlowPanel fp = new FlowPanel();
      fp.setStyleName(Gerrit.RESOURCES.css().registerScreenSection());
      fp.add(new SmallHeading(Util.C.welcomeUsernameHeading()));

      final Grid userInfo = new Grid(1, 2);
      final CellFormatter fmt = userInfo.getCellFormatter();
      userInfo.setStyleName(Gerrit.RESOURCES.css().infoBlock());
      userInfo.addStyleName(Gerrit.RESOURCES.css().accountInfoBlock());
      fp.add(userInfo);

      fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().topmost());
      fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topmost());
      fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().bottomheader());

      UsernameField field = new UsernameField();
      if (LocaleInfo.getCurrentLocale().isRTL()) {
        userInfo.setText(0, 1, Util.C.userName());
        userInfo.setWidget(0, 0, field);
        fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().header());
      } else {
        userInfo.setText(0, 0, Util.C.userName());
        userInfo.setWidget(0, 1, field);
        fmt.addStyleName(0, 0, Gerrit.RESOURCES.css().header());
      }

      formBody.add(fp);
    }
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.