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

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


                0,
                vh );
        layout.getCellFormatter().setStyleName( 0,
                0,
                "metadata-Widget" ); //NON-NLS
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setHorizontalAlignment( 0,
                0,
                HasHorizontalAlignment.ALIGN_LEFT );

        refresh = new ImageButton( images.refresh() );

        refresh.addClickHandler( clickHandler );

        layout.setWidget( 0,
                1,
                refresh );
        formatter.setHorizontalAlignment( 0,
                1,
                HasHorizontalAlignment.ALIGN_RIGHT );

        wrapper.setStyleName( "version-browser-Border" );
View Full Code Here


                        }

                        layout.setWidget( 1,
                                0,
                                history );
                        FlexCellFormatter formatter = layout.getFlexCellFormatter();

                        formatter.setColSpan( 1,
                                0,
                                2 );

                        Button open = new Button( constants.View() );

                        open.addClickHandler( new ClickHandler() {

                            public void onClick( ClickEvent event ) {
                                showVersion( history.getValue( history.getSelectedIndex() ) );
                            }

                        } );

                        layout.setWidget( 2,
                                0,
                                open );
                        formatter.setColSpan( 2,
                                1,
                                3 );
                        formatter.setHorizontalAlignment( 2,
                                1,
                                HasHorizontalAlignment.ALIGN_CENTER );

                        showStaticIcon();
View Full Code Here

        boolean isRTL = LocaleInfo.getCurrentLocale().isRTL();
        topPanel = new FlexTable();
        topPanel.setCellPadding(0);
        topPanel.setCellSpacing(0);
        topPanel.setStyleName(DEFAULT_STYLE_NAME + "-top");
        FlexCellFormatter formatter = topPanel.getFlexCellFormatter();

        // Setup the links cell
        linksPanel = new HorizontalPanel();
        topPanel.setWidget(0, 0, linksPanel);
        formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-links");
        if (isRTL) {
            formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
        } else {
            formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
        }
        formatter.setColSpan(0, 0, 2);

        // Setup the title cell
        setTitleWidget(null);
        formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-title");

        formatter.setStyleName(1, 1, DEFAULT_STYLE_NAME + "-options");
        if (isRTL) {
            formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT);
        } else {
            formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_RIGHT);
        }

        RowFormatter rowFormatter = topPanel.getRowFormatter();

        // Align the content to the top
View Full Code Here

    super(true, true);
    setStylePrimaryName(DEFAULT_STYLENAME);

    // Wrap contents in a table
    layoutTable = new FlexTable();
    FlexCellFormatter formatter = layoutTable.getFlexCellFormatter();
    layoutTable.setCellSpacing(0);
    setWidget(layoutTable);

    // Add a label
    setLabel("");
    formatter.setColSpan(0, 0, 3);

    // Add content widget
    layoutTable.setWidget(1, 0, content);

    // Add accept and cancel buttons
View Full Code Here

   */
  private DecoratorPanel createDecoratedForm() {
    // Create a table to layout the form options
    FlexTable layout = new FlexTable();
    layout.setCellSpacing(6);
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();

    // Add a title to the form
    layout.setHTML(0, 0, "Enter Search Criteria");
    cellFormatter.setColSpan(0, 0, 2);
    cellFormatter.setHorizontalAlignment(0, 0,
        HasHorizontalAlignment.ALIGN_CENTER);

    // Add some standard form options
    layout.setHTML(1, 0, "Name");
    layout.setWidget(1, 1, new TextBox());
View Full Code Here

     
     
      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

    Widget title = new TLabel("Mappings",
          "Lists the current mappings.. "
    );
   
   
    FlexCellFormatter cf = flexPanel.getFlexCellFormatter();
    cf.setColSpan(row, 1, 3);
    cf.setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
    );
    cf.setWidth(row, 1, "100%");
    flexPanel.setWidget(row, 1, title);
    row++;
   
  }
View Full Code Here

   
  }
 
  private void _addNoMappingsRow(int row) {
    flexPanel.getRowFormatter().setStyleName(row, "MappingsTable-row");
    FlexCellFormatter cf = flexPanel.getFlexCellFormatter();
//    _setAlignments(row);
    cf.setColSpan(row, 1, 3);
    cf.setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
    );
//    cf.setWidth(row, 1, "100%");
    HTML noYet = new HTML("<font color=\"gray\">(<i>No&nbsp;mappings</i>)</font>");
    flexPanel.setWidget(row, 0, noYet);
View Full Code Here

  private void _addRow(CheckBox cb, Widget left, Widget center, Widget right, String style,
      final MappingAssoc ma
  ) {
    final int row = flexPanel.getRowCount();
    FlexCellFormatter cf = flexPanel.getFlexCellFormatter();
    flexPanel.getRowFormatter().setStyleName(row, style);
   
   
    HorizontalPanel hp = new HorizontalPanel();
   
    if ( cb != null ) {
      hp.add(cb);
    }
   
//    hp.add(Main.images.delete().createImage());
   
    // #169: metadata association per mapping
    Widget mdWidget = _prepareMappingMetadata(row, ma);
    hp.add(mdWidget);
   
    flexPanel.setWidget(row, 0, new FocusableRowElement(row, hp));
   
    flexPanel.setWidget(row, 1, new FocusableRowElement(row, left));
   
    flexPanel.getCellFormatter().setStyleName(row, 2, "MappingsTable-row");
    flexPanel.setWidget(row, 2, new FocusableRowElement(row, center));
       
    flexPanel.setWidget(row, 3, new FocusableRowElement(row, right));

    if ( center instanceof Image ) {
      Image img = (Image) center;
      String width = String.valueOf(img.getWidth());
      cf.setWidth(row, 2, width);
    }   
    _setAlignments(row);
   
   
    // add (empty) row for expansion
    flexPanel.getRowFormatter().setStyleName(row + 1, style);
    cf.setColSpan(row + 1, 0, 4);
    cf.setAlignment(row + 1, 0,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
    );

  }
View Full Code Here

    );

  }
 
  private void _setAlignments(int row) {
    FlexCellFormatter cf = flexPanel.getFlexCellFormatter();
    cf.setAlignment(row, 0,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    cf.setWidth(row, 1, "50%");
    cf.setWidth(row, 3, "50%");
     
    cf.setAlignment(row, 1,
        HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE
    );
    cf.setAlignment(row, 2,
        HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE
    );
    cf.setAlignment(row, 3,
        HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_MIDDLE
    );
  }
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.