Search in sources :

Example 1 with ExcelTemplateControl

use of com.kyj.fx.voeditor.visual.component.spreadsheets.ExcelTemplateControl in project Gargoyle by callakrsos.

the class GargoyleSpreadSheetExam method start.

/* (non-Javadoc)
	 * @see javafx.application.Application#start(javafx.stage.Stage)
	 */
@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();
}
Also used : GridBase(org.controlsfx.control.spreadsheet.GridBase) SpreadsheetCell(org.controlsfx.control.spreadsheet.SpreadsheetCell) ExcelTemplateControl(com.kyj.fx.voeditor.visual.component.spreadsheets.ExcelTemplateControl) ObservableList(javafx.collections.ObservableList) GagoyleSpreadSheetView(com.kyj.fx.voeditor.visual.component.spreadsheets.GagoyleSpreadSheetView) Scene(javafx.scene.Scene)

Aggregations

ExcelTemplateControl (com.kyj.fx.voeditor.visual.component.spreadsheets.ExcelTemplateControl)1 GagoyleSpreadSheetView (com.kyj.fx.voeditor.visual.component.spreadsheets.GagoyleSpreadSheetView)1 ObservableList (javafx.collections.ObservableList)1 Scene (javafx.scene.Scene)1 GridBase (org.controlsfx.control.spreadsheet.GridBase)1 SpreadsheetCell (org.controlsfx.control.spreadsheet.SpreadsheetCell)1