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

Examples of com.google.gwt.user.client.ui.FlexTable$FlexCellFormatter


    upload.setWidth("300");
    upload.setName("ontologyFile");
   
    contents.clear();
   
    FlexTable panel = new FlexTable();
    panel.setWidth("100%");
//    panel.setBorderWidth(1);
    int row = 0;
   
    String info =
      "<br/>" +
      "Please indicate the ontology file to be used as a basis for the new version. " +
      "See this <a target=\"_blank\" href=\"" +PortalConsts.REG_TYPE_HELP_PAGE+ "\"" +
      ">manual page</a> for details." +
      "<br/>" +
      "<br/>" +
      "Please, select your ontology file"
    ;
    panel.setWidget(row, 0, new HTML(info));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

    contents.add(panel);
View Full Code Here


 
 
  private Widget createWidget() {
   
    FlexTable panel = new FlexTable();
   
    int row = 0;
   
    panel.getFlexCellFormatter().setColSpan(row, 0, 2);
    panel.setWidget(row, 0, prepareUploadPanel());
    panel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
   
    int col = 0;
   
    panel.setWidget(row, col, fileTypePanel.getWidget());
    panel.getFlexCellFormatter().setAlignment(row, col,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    col++;

    HorizontalPanel buttons = new HorizontalPanel();
    if ( loadButton != null ) {
      buttons.add(loadButton);
    }
   
    // include the "details" button only if an administrator is logged in
    // OR this is running in my dev environment (for testing)
    LoginResult loginResult = PortalControl.getInstance().getLoginResult();
    if ( (loginResult != null && loginResult.isAdministrator())
    ||   !GWT.isScript()
    ) {
      buttons.add(detailsButton);
    }
   
    panel.getFlexCellFormatter().setColSpan(row, col, 2);
    panel.setWidget(row, col, buttons);
    panel.getFlexCellFormatter().setAlignment(row, col,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

   
    if ( INCLUDE_RDF ) {
      CellPanel resultPanel = new VerticalPanel();
      textArea.setReadOnly(true);
      textArea.setSize("400px", "100px");

      panel.getFlexCellFormatter().setColSpan(row, 0, 2);
      panel.setWidget(row, 0, resultPanel);

      DecoratorPanel decPanel = new DecoratorPanel();
      decPanel.setWidget(textArea);
      resultPanel.add(decPanel);
      row++;
View Full Code Here

   
    formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);
    formPanel.setMethod(FormPanel.METHOD_POST);

   
    FlexTable panel = new FlexTable();
    formPanel.setWidget(panel);
   
   
   
    rb0 = new RadioButton("grp", "Local file:");

   
    final HorizontalPanel uploadContainer = new HorizontalPanel();
    uploadContainer.add(upload);
    rb0.setChecked(true);
//    upload.setEnabled(true);   // --> this method is not available
    ClickListener clickListener = new ClickListener() {
      private TextBox chooseLabel;
      public void onClick(Widget sender) {
        statusHtml.setText("");
//        upload.setEnabled(rb0.isChecked());  // --> this method is not available
        uploadContainer.clear();
        if ( rb0.isChecked() ) {
          uploadContainer.add(upload);
        }
        else {
          if ( chooseLabel == null ) {
            chooseLabel = new TextBox();
            chooseLabel.setText("");
            chooseLabel.setEnabled(false);
          }
          uploadContainer.add(chooseLabel);
        }
       
        if ( selectButton != null ) {
          selectButton.setEnabled(rb1.isChecked());
        }
      }
    };
    rb0.addClickListener(clickListener);
   
    if ( rb1 != null ) {
      rb1.addClickListener(clickListener);
    }

    int row = 0;

    panel.setWidget(row, 0, rb0);
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    panel.setWidget(row, 1, uploadContainer);
    panel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
//    panel.setWidget(row, 2, new Label("To submit a new ontology"));
    row++;
View Full Code Here

    if ( lines == null || lines.length == 0 ) {
      Window.alert("No details are available");
      return;
    }
   
    FlexTable table = new FlexTable();
    table.setStylePrimaryName("inline");
   
    table.getFlexCellFormatter().setColSpan(0, 0, 2);
    table.getFlexCellFormatter().setAlignment(0, 0,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE);
    table.setWidget(0, 0, new Label("MMI attribute"));
   
    table.getFlexCellFormatter().setAlignment(0, 1,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE);
    table.setWidget(0, 1, new Label("Note"));
   
   
    for ( int lin = 0; lin < lines.length; lin++ ) {
      String[] vals = lines[lin].split("\\|");
      for ( int col = 0; col < vals.length; col++ ) {
        table.setWidget(lin+1, col, new Label(vals[col]));
      }
 
    }
    VerticalPanel vp = new VerticalPanel();
    vp.setWidth("400");
View Full Code Here

 
 
  private void recreate() {
    contents.clear();
   
    FlexTable panel = new FlexTable();
    panel.setWidth("100%");
    int row = 0;
   
    String ontologyUri = getWizard().getOntologyUri();
    assert ontologyUri != null;
   
    panel.setWidget(row, 0, new HTML(INFO_TEMPLATE.replaceFirst(ONT_URI, ontologyUri)));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

    contents.add(panel);
View Full Code Here

 
 
  private void recreate() {
    contents.clear();
   
    FlexTable panel = new FlexTable();
    panel.setWidth("100%");
    int row = 0;
   
    String info = "<br/>Specify the desired type of registration";
   
    panel.setWidget(row, 0, new HTML(info));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

    contents.add(panel);
View Full Code Here

  }
 
  private void _prepareFlexPanel() {
    this.clear();
   
    flexPanel = new FlexTable();
//    flexPanel.setBorderWidth(1);
   
    add(flexPanel);
      flexPanel.setWidth("100%");
     
View Full Code Here

    contents.add(createWidget());
  }

 
  private Widget createWidget() {
    FlexTable panel = new FlexTable();
    int row = 0;
    for ( RadioButton rb : rbs ) {
      panel.getFlexCellFormatter().setColSpan(row, 0, 2);
      panel.setWidget(row, 0, rb);
      panel.getFlexCellFormatter().setAlignment(row, 1,
          HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
      );
      row++;
    }
   
    String info2 =
      "<br/>" +
      "<br/>" +
      "See this <a target=\"_blank\" href=\"" +PortalConsts.REG_TYPE_HELP_PAGE+ "\"" +
          ">manual page</a> for details."
    ;
    panel.setWidget(row, 0, new HTML(info2));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
   
   
    return panel;
View Full Code Here

 
 
  private void recreate() {
    contents.clear();
   
    FlexTable panel = new FlexTable();
    panel.setWidth("100%");
    int row = 0;
   
    String info = "<br/>Will you upload a file with the contents for the new " +
        "version, or just edit the metadata for the current registered ontology?";
   
    panel.setWidget(row, 0, new HTML(info));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

    contents.add(panel);
View Full Code Here

    contents.add(createWidget());
  }

 
  private Widget createWidget() {
    FlexTable panel = new FlexTable();
    int row = 0;
   
    panel.getFlexCellFormatter().setColSpan(row, 0, 2);
    panel.setWidget(row, 0, uploadFileRb);
    panel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
   
    String info2 =
      "<br/>" +
      "<br/>" +
      "See this <a target=\"_blank\" href=\"" +PortalConsts.REG_TYPE_HELP_PAGE+ "\"" +
          ">manual page</a> for details."
    ;
    panel.setWidget(row, 0, new HTML(info2));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
   
   
    return panel;
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.FlexTable$FlexCellFormatter

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.