Java 类com.google.gwt.user.client.ui.FlexTable 实例源码

项目:unitimes    文件:WebTable.java   
public void setCell(int col, Cell cell) {
    iCells[col] = cell;
    if (iTable != null) {
        FlexTable t = iTable.iTable;
        cell.setColIdx(col);
        cell.setRow(this);
        if (cell.getWidget() == null)
            t.setHTML(getRowIdx() + iTable.getHeaderRowsCount(), col, (cell.getValue() == null || cell.getValue().isEmpty() ? " " : cell.getValue()));
        else
            t.setWidget(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getWidget());
        t.getFlexCellFormatter().setWordWrap(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getWordWrap());
        t.getFlexCellFormatter().setColSpan(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getColSpan());
        t.getFlexCellFormatter().setStyleName(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getStyleName());
        t.getFlexCellFormatter().setWidth(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getWidth());
        t.getFlexCellFormatter().setVerticalAlignment(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getVerticalAlignment());
        t.getFlexCellFormatter().setHorizontalAlignment(getRowIdx() + iTable.getHeaderRowsCount(), col, cell.getHorizontalAlignment());
        t.getFlexCellFormatter().getElement(getRowIdx() + iTable.getHeaderRowsCount(), col).setTitle(cell.getTitle());
    }
}
项目:LAS    文件:ComparisonAxisSelector.java   
public ComparisonAxisSelector(String width) {
        // The the other widgets have flextable layouts.  Without it, this one doesn't line up.
        layout = new FlexTable();
        axes = new ListBox();
        flex = new FlexTable();
        // It looks funny without some sort of label on the same line.
        HTML html = new HTML("Axis: ");
        flex.setWidget(0, 0, html);
        flex.setWidget(0, 1, axes);
        disPanel = new DisclosurePanel("Compare");
        disPanel.add(flex);
        disPanel.setOpen(true);

//      if ( width != null && !width.equals("") ) {
//          disPanel.setWidth(width);
//      }
        layout.setWidget(0, 0, disPanel);
        initWidget(layout);
    }
项目:LAS    文件:DropDown.java   
public DropDown() {
    current = new FlexTable();
    current.addStyleName("datatable");
    itemlist = new FlexTable();
    dropdown = new PopupPanel(true);
    scroller = new ScrollPanel();
    scroller.add(itemlist);
    dropdown.add(scroller);
    down =new HTML(" ▼");
    down.addStyleName("current-item");
    initWidget(current);
    HTML load = new HTML("loading...");
    load.addStyleName("current-item");
    current.setWidget(0, 0, load);
    current.setWidget(0, 1, down);
    current.addClickHandler(show);
}
项目:LAS    文件:BaseUI.java   
/**
 * @param flexTable
 * 
 */
void setTopLeftAlignment(FlexTable flexTable) {
    if (flexTable != null) {
        int rows = flexTable.getRowCount();
        for (int row = 0; row < rows; row++) {
            int cellCount = flexTable.getCellCount(row);
            for (int col = 0; col < cellCount; col++) {
                if (flexTable.isCellPresent(row, col)) {
                    flexTable.getCellFormatter().setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_LEFT);
                    flexTable.getCellFormatter().setVerticalAlignment(row, col, HasVerticalAlignment.ALIGN_TOP);
                    Widget widget = flexTable.getWidget(row, col);
                    if ((widget != null) && (widget.getClass().getName().equals("FlexTable"))) {
                        try {
                            setTopLeftAlignment((FlexTable) widget);
                        } catch (Exception e) {
                           // e.printStackTrace();
                        }
                    }
                }
            }
        }
    }
}
项目:x-cure-chat    文件:ActionGridDialog.java   
/**
 * Add a new widget to the compulsory dialog-form grid 
 * @param gridIndex the index of the Grid which we will add elements to
 * @param column the column to add to
 * @param colspan the colump span, for the widget taking more than one column 
 * @param w the widget to add
 * @param isNewRow if true then we will add it to the new row
 * @param setFocus true to set focus on the given Widget
 */
protected void addToGrid( int gridIndex, int column, int colspan, Widget w, boolean isNewRow, boolean hasFocus ) {
    FlexTable currentGrid = indexToGrid.get( gridIndex );
    int currentRowIndex = indexToCurrentRow.get( gridIndex );
    int gridSize = indexToGridSize.get( gridIndex );
    if( currentRowIndex < gridSize ) {
        if( isNewRow ){
            currentRowIndex += 1;
        }
        currentGrid.getFlexCellFormatter().setColSpan( currentRowIndex, column, colspan );
        //In case we are adding a button, then we center it inside the cell
        if( canCenterInCell( colspan, w ) ) {
            currentGrid.getFlexCellFormatter().setHorizontalAlignment( currentRowIndex, column, HasHorizontalAlignment.ALIGN_CENTER );
        }
        currentGrid.setWidget(currentRowIndex, column, w );
        if( hasFocus ) {
            setFocus( w );
        }
    } else {
        Window.alert("An internal error, trying to add an element to a non-existing row.");
    }
    indexToCurrentRow.put( gridIndex, currentRowIndex );
}
项目:mvp4g-examples    文件:ProductListView.java   
public void createView() {
    table = new FlexTable();
    createButton = new Image( "images/add.png" );
    companyButton = new Anchor( "Go to company" );
    infoButton = new Anchor( "Info" );
    passiveInfoButton = new Anchor( "Passive Info" );

    VerticalPanel mainPanel = new VerticalPanel();
    mainPanel.add( table );
    mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
    mainPanel.add( createButton );
    mainPanel.add( companyButton );
    mainPanel.add( infoButton );
    mainPanel.add( passiveInfoButton );

    setWidget( mainPanel );
}
项目:ephesoft    文件:FuzzyDBPropertiesView.java   
/**
 * Constructor.
 */
public FuzzyDBPropertiesView() {
    super();
    initWidget(BINDER.createAndBindUi(this));
    detailTable = new FlexTable();
    detailTable.setWidth("100%");
    detailTable.getColumnFormatter().setWidth(0, "40%");
    detailTable.getColumnFormatter().setWidth(1, "1%");
    detailTable.getColumnFormatter().setWidth(2, "59%");
    viewTable.setWidget(0, 0, detailTable);
    viewTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
    edit.setText(AdminConstants.EDIT_BUTTON);
    mappingButton.setText(AdminConstants.MAPPING_BUTTON);
    mappingButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent arg0) {
            presenter.getController().getMainPresenter().showDocTypeMappingView();
        }
    });
}
项目:ephesoft    文件:PluginDetailPresenter.java   
/**
 * Processing to be done on load of this presenter.
 */
@Override
public void bind() {
    if (controller.getSelectedPlugin() != null) {
        this.dataTable = view.getViewTable();
        viewTable = new FlexTable();
        viewTable.setWidth("80%");
        viewTable.setCellSpacing(0);
        viewTable.getColumnFormatter().setWidth(0, "40%");
        viewTable.getColumnFormatter().setWidth(1, "1%");
        viewTable.getColumnFormatter().setWidth(2, "59%");
        dataTable.setWidget(0, 0, viewTable);
        dataTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        setProperties();
        if (controller.getSelectedPlugin().getPlugin().getPluginName().equalsIgnoreCase(PluginNameConstants.CMIS_EXPORT_PLUGIN)) {
            view.getTestCMIS().setVisible(Boolean.TRUE);
        } else {
            view.getTestCMIS().setVisible(Boolean.FALSE);
        }
        enableCMISGetTokenButton();
    }
}
项目:ephesoft    文件:PluginDataPresenter.java   
/**
 * Processing to be done on load of this presenter.
 */
@Override
public void bind() {
    if (controller.getSelectedPlugin() != null) {
        this.dataTable = view.getViewTable();
        viewTable = new FlexTable();
        viewTable.setWidth("100%");
        viewTable.setCellSpacing(0);
        viewTable.getColumnFormatter().setWidth(0, "10%");
        viewTable.getColumnFormatter().setWidth(1, "1%");
        viewTable.getColumnFormatter().setWidth(2, "70%");
        viewTable.getFlexCellFormatter().addStyleName(0, 0, "topBorder");
        viewTable.getFlexCellFormatter().addStyleName(0, 1, "topBorder");
        viewTable.getFlexCellFormatter().addStyleName(0, 2, "topBorder");
        dataTable.setWidget(0, 0, viewTable);
        dataTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        setProperties();
    }
}
项目:ephesoft    文件:TableExtractionView.java   
private void addHeaderColumns(final List<Column> columnList, final FlexTable flexTable) {
    tableNameVsCheckBoxMap.get(selectedDataTableName).clear();
    int columnNumber = 0;
    for (Column headerColumn : columnList) {
        HorizontalPanel headerRowPanel = new HorizontalPanel();
        Label headerText = new Label(headerColumn.getName());
        headerRowPanel.add(headerText);
        headerRowPanel.setWidth("80px");
        CheckBox validationCheckBox = new CheckBox();
        validationCheckBox.setVisible(Boolean.FALSE);
        headerRowPanel.add(validationCheckBox);
        headerRowPanel.setCellVerticalAlignment(validationCheckBox, HasVerticalAlignment.ALIGN_MIDDLE);
        tableNameVsCheckBoxMap.get(selectedDataTableName).add(validationCheckBox);
        flexTable.setWidget(0, columnNumber, headerRowPanel);
        flexTable.getCellFormatter().addStyleName(0, columnNumber, "wordWrap");
        columnNumber++;
    }
}
项目:ephesoft    文件:TableExtractionView.java   
private void addSelectedRowStyle(final FlexTable flexTable, final List<Row> rowList, final List<Column> columnList,
        final int selectedRowNumber) {
    int index = 1;
    for (Row row : rowList) {
        if (row != null && row.getColumns() != null && row.getColumns().getColumn() != null
                && !row.getColumns().getColumn().isEmpty()) {
            if (selectedRowNumber != index) {
                for (int index1 = 0; index1 < columnList.size(); index1++) {
                    flexTable.getWidget(index, index1).removeStyleName(ReviewValidateConstants.ROW_SELECTION_STYLE);
                }
            } else {
                for (int index1 = 0; index1 < columnList.size(); index1++) {
                    flexTable.getWidget(index, index1).addStyleName(ReviewValidateConstants.ROW_SELECTION_STYLE);
                }
            }
        }
        index++;
    }
}
项目:aggregate    文件:FiltersDataPanel.java   
private void updateFilterHeader(FilterGroup group) {
  copyButton.setEnabled(false);
  removeButton.setEnabled(false);

  if (group.getName() != null) {
    if (!group.getName().equals(UIConsts.FILTER_NONE)) {
      copyButton.setEnabled(true);
      removeButton.setEnabled(true);
    }
  }

  // create the filter group information
  String filterName = group.getName();
  if (filterName.equals(UIConsts.FILTER_NONE)) {
    filterName = "";
  }

  FlexTable filterGroupHeader = new FlexTable();
  filterGroupHeader.setWidget(0, 0, new Label(filterName));
  filterGroupHeader.setWidget(0, 1, addFilter);

  filterHeader.add(filterGroupHeader);
  filterHeader.add(new MetadataCheckBox(group, parentSubTab));
}
项目:aggregate    文件:ChangeAppNamePopup.java   
public ChangeAppNamePopup(PreferencesCompletionCallback settingsChange) {
  super();

  this.settingsChange = settingsChange;

  appNameBox = new TextBox();
  appNameBox.setText(Preferences.getAppName());

  FlexTable layout = new FlexTable();
  layout.setWidget(0, 0, new HTML("Change ODK 2.0 App Name"));
  layout.setWidget(1, 0, new HTML("App Name:"));
  layout.setWidget(1, 1, appNameBox);

  AggregateButton changeAppNameButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT,
      HELP_BALLOON_TXT);
  changeAppNameButton.addClickHandler(new ChangeAppNameHandler());

  layout.setWidget(3, 0, changeAppNameButton);
  layout.setWidget(3, 1, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:NewTablesAdminPopup.java   
public NewTablesAdminPopup() {
  super();

  users = new UserListBox();
  AggregateButton addButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
  addButton.addClickHandler(new CreateUser());

  FlexTable layout = new FlexTable();
  layout.setWidget(0, 0, new ClosePopupButton(this));
  layout.setWidget(0, 1, new HTML(LABEL_TXT));
  layout.setWidget(1, 0, new HTML("Users:"));
  layout.setWidget(1, 1, users);
  layout.setWidget(3, 1, addButton);

  SecureGWT.getSecurityAdminService().getAllUsers(true, new ODKTablesAdminPopupCallback());
  setWidget(layout);
}
项目:aggregate    文件:OdkTablesConfirmDeleteTablePopup.java   
public OdkTablesConfirmDeleteTablePopup(OdkTablesTableList parentTable,
    String tableId) {
  super();
  this.parentTable = parentTable;
  this.tableId = tableId;

  AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT,
      HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new ExecuteDelete());

  FlexTable layout = new FlexTable();

  HTML message = new HTML("Are you sure you want to delete this table?");
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:firefly    文件:LoadCatalogSearchUI.java   
private Widget createLoadCatalogsContent() {
    SimpleInputField field = SimpleInputField.createByProp(_prop.makeBase("upload"));
    _uploadField= (FileUploadField)field.getField();
    _uploadField.setUploadType("TABLE");

    HTML text = GwtUtil.makeFaddedHelp("Custom catalog in IPAC table format&nbsp;&nbsp;");

    Label pad = new Label(" ");
    pad.setHeight("400px");

    FlexTable grid = new FlexTable();
    grid.setCellSpacing(5);
    DOM.setStyleAttribute(grid.getElement(), "padding", "5px");
    grid.setWidget(0, 0, field);
    grid.setWidget(1, 0, text);

    return grid;
}
项目:aggregate    文件:MediaFileListPopup.java   
public MediaFileListPopup(String formId) {

    SecureGWT.getFormAdminService().getFormMediaFileList(formId,
        new MediaFileCallback());

    fileList = new FlexTable();
    fileList.setWidget(0, 0, new ClosePopupButton(this));
    fileList.getCellFormatter().getElement(0, 0).setAttribute("align",
        "right");
    fileList.setText(1, 0, "Media Filename");
    fileList.setText(1, 1, "Content Type");
    fileList.setText(1, 2, "Length");
    fileList.getRowFormatter().addStyleName(1, "titleBar");

    setWidget(fileList);
  }
项目:aggregate    文件:ConfirmDeleteTablesAdminPopup.java   
public ConfirmDeleteTablesAdminPopup(String uriUser) {
  super();
  this.uriUser = uriUser;

  AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT,
      HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new ExecuteDelete());

  FlexTable layout = new FlexTable();

  HTML message = new HTML("Delete the ODK Tables user?");
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:ConfirmPublishDeletePopup.java   
public ConfirmPublishDeletePopup(ExternServSummary publisher) {
  super();

  this.publisher = publisher;
  this.action = ((publisher.getStatus() == OperationalStatus.COMPLETED) || (publisher.getStatus() == OperationalStatus.ABANDONED)) ? "remove"
      : "stop publishing and remove";

  String buttonTxt = BUTTON_ICON + action + " Publisher";
  AggregateButton deleteButton = new AggregateButton(buttonTxt, TOOLTIP_TXT, HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new ExecuteDelete());

  FlexTable layout = new FlexTable();

  HTML message = new HTML("Delete this publisher?" + "<br/>Do you wish to " + action
      + " this location?");
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:ConfirmFormDeletePopup.java   
public ConfirmFormDeletePopup(String formId) {
  super();

  this.formId = formId;

  AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new DeleteHandler());

  FlexTable layout = new FlexTable();

  HTML message = new HTML(
      "Delete all data and the form definition for <b>"
          + formId
          + "</b>?<br/>Do you wish to delete all uploaded data and the form definition for this form?");
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:ConfirmPurgeUpToDatePopup.java   
@SuppressWarnings("deprecation")
public ConfirmPurgeUpToDatePopup(FormSummary summary, Date earliest) {
  super();

  this.summary = summary;
  this.earliest = earliest;

  AggregateButton confirm = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
  confirm.addClickHandler(new PurgeHandler());

  FlexTable layout = new FlexTable();
  StringBuilder stringBuilder = new StringBuilder();
  stringBuilder.append("Delete submissions data of ");
  stringBuilder.append(summary.getTitle());
  stringBuilder.append(" [");
  stringBuilder.append(summary.getId());
  stringBuilder.append("] up through ");
  stringBuilder.append(earliest.toGMTString());
  stringBuilder.append(". Incomplete submissions will not be deleted.");
  layout.setWidget(0, 0, new HTML(stringBuilder.toString()));
  layout.setWidget(0, 1, confirm);
  layout.setWidget(0, 2, new ClosePopupButton(this));
  setWidget(layout);
}
项目:aggregate    文件:ConfirmSubmissionDeletePopup.java   
public ConfirmSubmissionDeletePopup(String submissionKeyAsString) {
  super();

  this.submissionKeyAsString = submissionKeyAsString;

  FlexTable layout = new FlexTable();

  AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new ExecuteDelete());

  HTML message = new HTML(DELETE_SUBMISSION_WARNING);
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:OdkTablesAddNewTablePopup.java   
public OdkTablesAddNewTablePopup() {
  super();

  AggregateButton addTableButton = new OdkTablesAddTableButton();
  addTableButton.addClickHandler(new ExecuteAdd());

  idBox = new OdkTablesTableIdBox(this);

  FlexTable layout = new FlexTable();

  HTML message = new HTML("You are adding a new table.");
  layout.setWidget(0, 0, message);
  layout.setWidget(1, 0, new HTML("TableId:"));
 layout.setWidget(1, 1, idBox);
  layout.setWidget(2, 1, addTableButton);
  layout.setWidget(2, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:OdkTablesManageAppLevelFilesSubTab.java   
/**
 * Sets up the View Table subtab.
 */
public OdkTablesManageAppLevelFilesSubTab(OdkTablesTabUI parent) {
  this.parent = parent;

  addFileButton = new ServletPopupButton(ADD_FILE_BUTTON_TXT, ADD_FILE_TXT,
      UIConsts.APP_LEVEL_FILE_UPLOAD_SERVLET_ADDR, this, ADD_FILE_TOOLTIP_TXT, ADD_FILE_BALLOON_TXT);

  setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);

  tableFileData = new OdkTablesViewAppLevelFileInfo(this);

  selectTablePanel = new FlexTable();
  selectTablePanel.getElement().setId("app_level_panel");
  selectTablePanel.setHTML(0, 0, "<h2> Application Level Files </h2>");
  if ( AggregateUI.getUI().getUserInfo().getGrantedAuthorities().contains(GrantedAuthorityName.ROLE_ADMINISTER_TABLES)) {
    selectTablePanel.setWidget(1, 0, addFileButton);
  }

  topPanel = new HorizontalPanel();
  topPanel.add(selectTablePanel);
  topPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_JUSTIFY);
  add(topPanel);
  add(tableFileData);
}
项目:aggregate    文件:SubmissionAdminSubTab.java   
public SubmissionAdminSubTab() {
  // vertical
  setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);

  formsBox = new FormListBox(new ChangeDropDownHandler());
  submissions = new ScrollPanel();
  submissions.getElement().setId("submission_admin_list");

  purgeSubmission = new PurgeUpToDateButton();
  purgeSubmission.setSelectedForm(selectedForm);

  ServletPopupButton uploadSubmission = new ServletPopupButton(SUBMISSION_BUTTON_TEXT, SUBMISSION_TXT,
      UIConsts.SUBMISSION_SERVLET_ADDR, this, SUBMISSION_TOOLTIP_TXT, SUBMISSION_BALLOON_TXT);

  // create navigation buttons to servlet
  FlexTable navTable = new FlexTable();
  navTable.setWidget(0, 0, new Label("Form: "));
  navTable.setWidget(0, 1, formsBox);
  navTable.setWidget(0, 2, purgeSubmission);

  // add to panel
  add(uploadSubmission);
  add(navTable);
  add(new Label("Incomplete Submissions:"));
  add(submissions);
}
项目:aggregate    文件:OdkTablesConfirmDeleteInstanceFilePopup.java   
public OdkTablesConfirmDeleteInstanceFilePopup(AggregateSubTabBase basePanel, String tableId, String instanceId, String filePath) {
  super();
  this.basePanel = basePanel;
  this.tableId = tableId;
  this.instanceId = instanceId;
  this.filePath = filePath;

  AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new ExecuteDelete());

  FlexTable layout = new FlexTable();

  HTML message = new HTML("Are you sure you want to delete this file?");
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:OdkTablesConfirmDeleteAppLevelFilePopup.java   
public OdkTablesConfirmDeleteAppLevelFilePopup(AggregateSubTabBase basePanel, String odkClientApiVersion, String filePath) {
  super();
  this.basePanel = basePanel;
  this.odkClientApiVersion = odkClientApiVersion;
  this.filePath = filePath;

  AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
  deleteButton.addClickHandler(new ExecuteDelete());

  FlexTable layout = new FlexTable();

  HTML message = new HTML("Are you sure you want to delete this file?");
  layout.setWidget(0, 0, message);
  layout.setWidget(0, 1, deleteButton);
  layout.setWidget(0, 2, new ClosePopupButton(this));

  setWidget(layout);
}
项目:aggregate    文件:NavLinkBar.java   
public NavLinkBar() {
  getElement().setId("nav_bar_help_login");

  loginLogoutLink = new Anchor();
  loginLogoutLink.getElement().setId("nav_bar_help_login_item");

  helpPanelToggleButton = new HelpSlidePanelToggleButton();
  helpPanelToggleButton.getElement().setId("nav_bar_help_login_item");

  helpBookButton = new HelpBookToggleButton();
  helpBookButton.getElement().setId("nav_bar_help_login_item");

  helpBalloonsToggleButton = new HelpDialogsToggleButton();
  helpBalloonsToggleButton.getElement().setId("nav_bar_help_login_item");

  FlexTable layout = new FlexTable();
  layout.setWidget(0, 0, loginLogoutLink);
  layout.setWidget(0, 1, helpPanelToggleButton);
  layout.setWidget(0, 2, helpBookButton);
  layout.setWidget(0, 3, helpBalloonsToggleButton);
  layout.setWidget(0, 4, new HTML(HtmlConsts.TAB));
  add(layout);
}
项目:aggregate    文件:FilterNavigationTable.java   
public FilterNavigationTable(FilterSubTab filterSubTab) {
  this.filterSubTab = filterSubTab;
  // invert this because we have not yet initialized the actionTable...
  showEnketoIntegration = !Preferences.showEnketoIntegration();

  formsBox = new FormListBox(new FormChangeDropDownHandler());
  filtersBox = new FilterListBox(new FilterChangeDropDownHandler());

  FlexTable formNFilterTable = new FlexTable();
  formNFilterTable.getElement().setId("form_and_goal_selection");
  formNFilterTable.setHTML(0, 0, "<h2 id=\"form_name\"> Form </h2>");
  formNFilterTable.setWidget(0, 1, formsBox);
  formNFilterTable.setHTML(0, 2, "<h2 id=\"filter_name\"> Filter </h2>");
  formNFilterTable.setWidget(0, 3, filtersBox);

  setWidget(0, 0, formNFilterTable);
}
项目:gwtlib    文件:Table.java   
public void setColumnSortStyle(int col, int dir) {
  int row = 0;
  FlexTable.FlexCellFormatter formatter = _table.getFlexCellFormatter();
  switch(dir) {
    case Column.Sort.ASCENDING:
      formatter.removeStyleName(row, col, STYLE_DESCENDING);
      formatter.addStyleName(row, col, STYLE_ASCENDING);
      break;
    case Column.Sort.DESCENDING:
      formatter.removeStyleName(row, col, STYLE_ASCENDING);
      formatter.addStyleName(row, col, STYLE_DESCENDING);
      break;
    default:
      formatter.removeStyleName(row, col, STYLE_ASCENDING);
      formatter.removeStyleName(row, col, STYLE_DESCENDING);
      break;
  }
}
项目:gwtlib    文件:ShowcaseEntryPoint.java   
private void init(RootPanel root) {
  _deckPanel = new DeckPanel();
  _tree = createTree();
  _tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
    public void onSelection(SelectionEvent<TreeItem> event) {
      TreeItem item = event.getSelectedItem();
      if(item.getUserObject() != null) {
        ContentWidget widget = (ContentWidget)item.getUserObject();
        widget.init();
        int i = _deckPanel.getWidgetIndex(widget);
        if(i != -1) _deckPanel.showWidget(i);
      }
    }
  });

  FlexTable table = new FlexTable();
  table.setWidget(0, 0, _tree);
  table.setWidget(0, 1, _deckPanel);
  table.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_TOP);

  root.add(table);
}
项目:empiria.player    文件:ReportTableGenerator.java   
private FlexTable createTableWithStyles(Element element) {
    table = new FlexTable();
    table.setStyleName(styleNames.QP_REPORT_TABLE());
    String cls = element.getAttribute(CLASS);
    if (cls != null) {
        table.addStyleName(cls);
    }
    return table;
}
项目:empiria.player    文件:ReportTableTest.java   
@Before
public void init() {
    flexTable = mock(FlexTable.class, RETURNS_DEEP_STUBS);
    pageToRow = new HashMap<>();
    testObj = new ReportTable(flexTable, pageToRow);
    pageToRow.put(mappedPage, mappedRow);
}
项目:empiria.player    文件:RowStylesAppenderGWTTestCase.java   
public void testShouldAddStylesToRow() {
    // given
    FlexTable flexTable = new FlexTable();
    CellCoords cellCoords = new CellCoords(2, 3);

    // when
    testObj.append(flexTable, cellCoords);

    // then
    String tabelHTML = flexTable.getElement().getInnerHTML();
    assertEquals(tabelHTML, OUTPUT);
}
项目:essence    文件:DetectionRuleUI.java   
private void applyDataRowStyles(FlexTable grid) {
    RowFormatter rf = grid.getRowFormatter();

    for (int row = 0; row < grid.getRowCount(); ++row) {
        if ((row % 2) != 0) {
            rf.addStyleName(row, "FlexTable-OddRow");
        }
        else {
            rf.addStyleName(row, "FlexTable-EvenRow");
        }
    }
}
项目:WebConsole    文件:GridPanelComponent.java   
public void setComponent(int row, int col, ConsoleComponent component) {
    if (component != null) {
        ((FlexTable)getWidget()).setWidget(row, col, (Widget)component);
        components.add(component);
    } else {
        ((FlexTable)getWidget()).setText(row, col, "");
    }
}
项目:WebConsole    文件:GridPanelComponent.java   
@Override
public void onRender(int width, int height, List<DataValuePairContainer> data) {
    FlexTable grid = (FlexTable)getWidget();
    int colWidth = (int)Math.round((double)width / cols);
    int rowHeight = (int)Math.round((double)height / rows);

    for (int i=0; i<rows; i++) {
        for (int j=0; j<cols; j++) {
            CellData cellData = cellDataArr[i][j];
            if (cellData != null) {
                if (!cellData.ignore) {
                    FlexCellFormatter formatter = grid.getFlexCellFormatter();
                    int cellWidth = cellData.colSpan * colWidth;
                    int cellHeight = cellData.rowSpan * rowHeight;
                    formatter.setRowSpan(i, j, cellData.rowSpan);
                    formatter.setColSpan(i, j, cellData.colSpan);
                    formatter.setHeight(i, j, cellHeight + "px");
                    formatter.setWidth(i, j, cellWidth + "px");
                    formatter.setHorizontalAlignment(i, j, HasHorizontalAlignment.ALIGN_CENTER);
                    formatter.setVerticalAlignment(i, j, HasVerticalAlignment.ALIGN_MIDDLE);

                    Widget widget = grid.getWidget(i, j);
                    if (widget != null) {
                        ConsoleComponent component = (ConsoleComponent)widget;
                        if (component != null) {
                            component.onAdd(cellWidth, cellHeight);
                        }
                    } else {
                        // Just add an empty cell
                        this.setComponent(i, j, null);
                    }
                }
            }
        }
    }
}
项目:LAS    文件:SettingsWidget.java   
public SettingsWidget(String title, String panelID, String operationID, String optionID) {
    this.operationID = operationID;
    this.optionID = optionID;

    closeButton = new PushButton("Close");
    closeButton.addStyleDependentName("SMALLER");
    closeButton.setTitle("Close settings panel for "+panelID);
    closeButton.addClickListener(closeClick);
    buttonBar = new HorizontalPanel();
    buttonBar.add(closeButton);

    datasetButton = new DatasetButton();        
    optionsButton = new OptionsButton(optionID, 300);
    datasetButton.setOffset(0);

    operations = new OperationsWidget(title);
    operations.addClickHandler(operationsClickHandler);

    settingsButton = new PushButton (title);
    settingsButton.addStyleDependentName("SMALLER");
    settingsButton.addClickListener(settingsButtonClick);
    settingsPopup = new PopupPanel(false);

    buttonBar.add(datasetButton);
    buttonBar.add(optionsButton);

    settingsLayout = new FlexTable();
    settingsLayout.setWidget(0, 0, buttonBar);
    settingsLayout.setWidget(1, 0, operations);


    settingsPopup.add(settingsLayout);
    settingsButton.setWidth("65px");
    initWidget(settingsButton); 

}
项目:document-management-system    文件:WikiPage.java   
/**
 * WikiPage
 */
public WikiPage() {
    table = new FlexTable();
    table.setWidth("100%");

    initWidget(table);
}
项目:document-management-system    文件:TabDocumentStapling.java   
public TabDocumentStapling() {
    title = GeneralComunicator.i18nExtension("stapling.tab.document.title");

    vPanel = new VerticalPanel();
    scrollPanel = new ScrollPanel(vPanel);
    table = new FlexTable();
    vPanel.add(table);


    initWidget(scrollPanel);
}