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

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


 
  private void recreate() {
    contents.clear();
   
    FlexTable panel = new FlexTable();
    panel.setWidth("100%");
    int row = 0;
   
    panel.setWidget(row, 0, infoHtml);
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );

    contents.add(panel);
  }
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 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 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 ontServiceUrl = Orr.getPortalBaseInfo().getOntServiceUrl();
   
    panel.setWidget(row, 0, new HTML(INFO_TEMPLATE.replaceFirst(ONT_SERVICE_URL_FRAG, ontServiceUrl)));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

    panel.setWidget(row, 0, authorityShortNamePanel);
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
    contents.add(panel);
  }
View Full Code Here

        shortNameTextBox.getText().trim()
    );
  }

  private Widget createForm() {
    FlexTable panel = new FlexTable();
   
    int row = 0;

    ChangeListener cl = null;
   
    cl = new ChangeListener () {
      public void onChange(Widget sender) {
        formChanged();
      }
    };

    authorityWidget = new FieldWithChoose(authorityAttrDef, cl, "130px");
    shortNameTextBox = OrrUtil.createTextBoxBase(1, "200px", cl);
     
     
    String label = authorityAttrDef.getLabel();
    String tooltip = "<b>" +label+ "</b>:<br/>" +
        authorityAttrDef.getTooltip() +
        "<br/><br/><div align=\"right\">(" +authorityAttrDef.getUri()+ ")</div>";
    panel.setWidget(row, 0, new TLabel(label, true, tooltip ));

    panel.setWidget(row, 1, authorityWidget);
    panel.getFlexCellFormatter().setWidth(row, 0, "250px");
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    panel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;

 
    String label2 = "Ontology short name";
    String tooltip2 = "<b>" +label2+ "</b>:<br/>" +
        "The short name of the ontology.";
    panel.setWidget(row, 0, new TLabel(label2, true, tooltip2 ));

    panel.setWidget(row, 1, shortNameTextBox);
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
     

    String label3 = "URI";
    String tooltip3 = "<b>" +label3+ "</b>:<br/>" +
        "The resulting URI for your ontology";
    panel.setWidget(row, 0, new TLabel(label3, false, tooltip3 ));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
    );

    panel.setWidget(row, 1, resultingUri);
    panel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
     
    panel.setWidget(row, 0, new HTML("Click to verify availability: "));
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
    );

    CellPanel buttons = createButtons();
    panel.setWidget(row, 1, buttons);
    panel.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
   
    return panel;
View Full Code Here

      String uri = entity.getUri();
     
      String uriResLink = getUriResolutionLink(uri);
     
     
      FlexTable flexPanel = new FlexTable();
      flexPanel.setStylePrimaryName("DisclosureTable");
      flexPanel.setCellSpacing(4);
      FlexCellFormatter cf = flexPanel.getFlexCellFormatter();
     
      int row = 0;
     
      cf.setColSpan(row, 0, 2);
      flexPanel.setWidget(row, 0, new HTML("<a target=\"_blank\" href=\"" +uriResLink+ "\">" +uri+ "</a>"));
      cf.setAlignment(row, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
      row++;
     
     
      List<PropValue> props = entity.getProps();
      for ( PropValue pv : props ) {
       
        String htmlStr;
        HTML html;
       
        // column 0
        html = new HTML();
        String propName = pv.getPropName();
        String propUri = pv.getPropUri();
        if ( propName == null ) {
          propName = "?";
        }
        if ( propUri != null ) {
          htmlStr = "<a target=\"_blank\" href=\"" +propUri+ "\">" +propName+ "</a>";
        }
        else {
          htmlStr = propName;
        }
        html.setHTML("<b>" +htmlStr+ "</b>:");
        if ( propUri != null ) {
          html.setTitle(propUri);
        }
        flexPanel.setWidget(row, 0, html);
        cf.setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_TOP);

       
        // column 1
        html = new HTML();
        String valueName = pv.getValueName();
        String valueUri = pv.getValueUri();
        if ( valueName == null ) {
          valueName = "?";
        }
        if ( valueUri != null ) {
          htmlStr = "<a target=\"_blank\" href=\"" +valueUri+ "\">" +valueName+ "</a>";
          html.setHTML(htmlStr);
        }
        else {
          htmlStr = valueName;
          html.setText(htmlStr);
        }
        if ( valueUri != null ) {
          html.setTitle(valueUri);
        }
        flexPanel.setWidget(row, 1, html);
        cf.setAlignment(row, 1, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);

       
        row++;
      }
View Full Code Here

    if ( details.size() == 0 ) {
      Window.alert("No details are available");
      return;
    }
   
    FlexTable table = new FlexTable();
    table.setStylePrimaryName("inline");
    table.setCellSpacing(6);
    int row = 0;
   
   
    table.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE);
    table.setWidget(row, 0, new HTML("<b>Metadata property</b>".replaceAll(" ", "&nbsp;")));
   
    table.getFlexCellFormatter().setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE);
    table.setWidget(row, 1, new HTML("<b>Value in uploaded file</b>".replaceAll(" ", "&nbsp;")));
   
    table.getFlexCellFormatter().setAlignment(row, 2,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE);
    table.setWidget(row, 2, new HTML("<b>Value in registered ontology</b>".replaceAll(" ", "&nbsp;")));
   
    row++;
   
    Map<String, AttrDef> uriAttrDefMap = Orr.getMetadataBaseInfo().getUriAttrDefMap();
   
    for ( Detail detail : details ) {
      HTML propLabel = new HTML();
      String uri = detail.key;
      AttrDef attrDef = uriAttrDefMap.get(uri);
     
      if ( attrDef == null || attrDef.isInternal() || attrDef.getLabel() == null ) {
        // we are only interested in the fields that are shown in the metadata sections;
        // so, ignore this detail:
        continue;
      }
     
      String lbl = attrDef.getLabel().replaceAll(" ", "&nbsp;");
      propLabel.setHTML(lbl);
      propLabel.setTitle(uri);
     
      table.getFlexCellFormatter().setAlignment(row, 0,
          HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
      table.setWidget(row, 0, propLabel);
     
     
      if ( detail.loadedValue.equals(detail.registeredValue) ) {
        table.getFlexCellFormatter().setColSpan(row, 1, 2);
        table.getFlexCellFormatter().setAlignment(row, 1,
            HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
        table.setWidget(row, 1, new Label(detail.loadedValue));
      }
      else {
        if ( detail.loadedValue.length() > 0 && detail.registeredValue.length() > 0 ) {
          // non-empty, different values:
          propLabel.setHTML(DIFF_MARK +lbl);
        }
       
        table.getFlexCellFormatter().setAlignment(row, 1,
            HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
        table.setWidget(row, 1, new Label(detail.loadedValue));
       
        table.getFlexCellFormatter().setAlignment(row, 2,
            HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);
        table.setWidget(row, 2, new Label(detail.registeredValue));
      }
     
      row++;
    }
    VerticalPanel vp = new VerticalPanel();
View Full Code Here

  }
 
  private void recreate() {
    contents.clear();
   
    FlexTable panel = new FlexTable();
    panel.setWidth("100%");
    int row = 0;
   
    panel.setWidget(row, 0, infoHtml);
    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;
    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++;
    }
   
    panel.setWidget(row, 0, detailsPanel);
    panel.getFlexCellFormatter().setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    row++;
   
    String info2 =
      "<br/>" +
      "<br/>" +
      "See this <a target=\"_blank\" href=\"" +PortalConsts.REG_TYPE_HELP_PAGE+ "\"" +
          ">manual page</a> for more information."
    ;
    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

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.