当前位置: 首页>>代码示例>>Java>>正文


Java FlexTable类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.FlexTable的典型用法代码示例。如果您正苦于以下问题:Java FlexTable类的具体用法?Java FlexTable怎么用?Java FlexTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FlexTable类属于com.google.gwt.user.client.ui包,在下文中一共展示了FlexTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setCell

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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());
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:20,代码来源:WebTable.java

示例2: ComparisonAxisSelector

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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);
	}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:20,代码来源:ComparisonAxisSelector.java

示例3: DropDown

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:18,代码来源:DropDown.java

示例4: setTopLeftAlignment

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
/**
 * @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();
                        }
                    }
                }
            }
        }
    }
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:27,代码来源:BaseUI.java

示例5: addToGrid

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
/**
 * 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 );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:32,代码来源:ActionGridDialog.java

示例6: createView

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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 );
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:18,代码来源:ProductListView.java

示例7: FuzzyDBPropertiesView

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
/**
 * 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();
		}
	});
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:24,代码来源:FuzzyDBPropertiesView.java

示例8: bind

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
/**
 * 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();
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:25,代码来源:PluginDetailPresenter.java

示例9: bind

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
/**
 * 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();
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:22,代码来源:PluginDataPresenter.java

示例10: addHeaderColumns

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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++;
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:19,代码来源:TableExtractionView.java

示例11: addSelectedRowStyle

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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++;
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:20,代码来源:TableExtractionView.java

示例12: updateFilterHeader

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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));
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:25,代码来源:FiltersDataPanel.java

示例13: NewTablesAdminPopup

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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);
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:18,代码来源:NewTablesAdminPopup.java

示例14: OdkTablesConfirmDeleteTablePopup

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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);
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:20,代码来源:OdkTablesConfirmDeleteTablePopup.java

示例15: createLoadCatalogsContent

import com.google.gwt.user.client.ui.FlexTable; //导入依赖的package包/类
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;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:19,代码来源:LoadCatalogSearchUI.java


注:本文中的com.google.gwt.user.client.ui.FlexTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。