本文整理匯總了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;
}