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