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


Java FlexTable.getWidget方法代码示例

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


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

示例1: 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

示例2: onRender

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

示例3: clearSelectedRowStyle

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
private void clearSelectedRowStyle(final FlexTable flexTable) {
	for (int i = 0; i < flexTable.getRowCount(); i++) {
		for (int j = 0; j < flexTable.getCellCount(i); j++) {
			if (flexTable.getWidget(i, j) != null) {
				flexTable.getWidget(i, j).removeStyleName(ReviewValidateConstants.ROW_SELECTION_STYLE);
			}
		}
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:10,代码来源:TableExtractionView.java

示例4: calculateParagonPoints

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
protected void calculateParagonPoints(FlexTable table) {
	int level = this.paragonLevel.getValue();
	int points = (level + 2) / 4;
	
	for (int i = 0; i < 4; i++) {
		NumberSpinner n = (NumberSpinner)table.getWidget(firstRow + i, 1);
		int value = Math.min(50, points);
		
		n.setValue(value);
		points -= value;
	}
}
 
开发者ID:dawg6,项目名称:dhcalc,代码行数:13,代码来源:ParagonPanel.java

示例5: setFocus

import com.google.gwt.user.client.ui.FlexTable; //导入方法依赖的package包/类
public void setFocus() {
	FlexTable selectedView = tableNameVsViewMap.get(selectedDataTableName);
	SuggestBox suggestBox = (SuggestBox) selectedView.getWidget(selectedRowNumber, 0);
	suggestBox.setFocus(true);
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:6,代码来源:TableExtractionView.java


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