當前位置: 首頁>>代碼示例>>Java>>正文


Java SpreadsheetCellType類代碼示例

本文整理匯總了Java中org.controlsfx.control.spreadsheet.SpreadsheetCellType的典型用法代碼示例。如果您正苦於以下問題:Java SpreadsheetCellType類的具體用法?Java SpreadsheetCellType怎麽用?Java SpreadsheetCellType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SpreadsheetCellType類屬於org.controlsfx.control.spreadsheet包,在下文中一共展示了SpreadsheetCellType類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: start

import org.controlsfx.control.spreadsheet.SpreadsheetCellType; //導入依賴的package包/類
@Override
public void start(Stage primaryStage) throws Exception {

	GridBase gridBase = new GridBase(100, 100);
	List<ObservableList<SpreadsheetCell>> rows = FXCollections.observableArrayList();

	for (int row = 0; row < gridBase.getRowCount(); ++row) {
		ObservableList<SpreadsheetCell> currentRow = FXCollections.observableArrayList();
		for (int column = 0; column < gridBase.getColumnCount(); ++column) {
			SpreadsheetCell createCell = SpreadsheetCellType.STRING.createCell(row, column, 1, 1, "");
			currentRow.add(createCell);
		}
		rows.add(currentRow);
	}
	gridBase.setRows(rows);

	ExcelTemplateControl excelTemplateControl = new ExcelTemplateControl();
	primaryStage.setScene(new Scene(new GagoyleSpreadSheetView(gridBase)));
	primaryStage.show();

}
 
開發者ID:callakrsos,項目名稱:Gargoyle,代碼行數:22,代碼來源:GargoyleSpreadSheetExam.java

示例2: SchoolMgrerSpreadSheetView

import org.controlsfx.control.spreadsheet.SpreadsheetCellType; //導入依賴的package包/類
/**
 * @param colSize
 */
public SchoolMgrerSpreadSheetView(int colSize) {
	GridBase gridBase = new GridBase(100, colSize);
	List<ObservableList<SpreadsheetCell>> rows = FXCollections.observableArrayList();

	for (int row = 0; row < gridBase.getRowCount(); ++row) {
		ObservableList<SpreadsheetCell> currentRow = FXCollections.observableArrayList();
		for (int column = 0; column < gridBase.getColumnCount(); ++column) {
			SpreadsheetCell createCell = SpreadsheetCellType.STRING.createCell(row, column, 1, 1, "");
			currentRow.add(createCell);
		}
		rows.add(currentRow);
	}
	gridBase.setRows(rows);

	gagoyleSpreadSheetView = new GagoyleSpreadSheetView(gridBase);

	setTop(mbRoot);
	setCenter(gagoyleSpreadSheetView);

	createMenus();
}
 
開發者ID:callakrsos,項目名稱:Gargoyle,代碼行數:25,代碼來源:SchoolMgrerSpreadSheetView.java

示例3: createNewRow

import org.controlsfx.control.spreadsheet.SpreadsheetCellType; //導入依賴的package包/類
/**
 * 새로운 Row를 생성한다.
 *
 * @param newRow
 *            생성할 로우
 * @return
 */
private ObservableList<SpreadsheetCell> createNewRow() {

	Grid grid = ssv.getGrid();
	ObservableList<ObservableList<SpreadsheetCell>> rows = grid.getRows();

	int columnCount = grid.getColumnCount();
	int newRow = rows.size();

	ObservableList<SpreadsheetCell> newCells = FXCollections.observableArrayList(new ArrayList<>(columnCount));

	for (int newCol = 0; newCol < columnCount; newCol++) {
		newCells.add(SpreadsheetCellType.STRING.createCell(newRow, newCol, 1, 1, ""));
	}

	return newCells;
}
 
開發者ID:callakrsos,項目名稱:Gargoyle,代碼行數:24,代碼來源:GagoyleSpreadSheetView.java


注:本文中的org.controlsfx.control.spreadsheet.SpreadsheetCellType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。