本文整理汇总了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();
}
}
}
}
}
}
}
示例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);
}
}
}
}
}
}
示例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);
}
}
}
}
示例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;
}
}
示例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);
}