当前位置: 首页>>代码示例>>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;未经允许,请勿转载。