當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。