public StackPane decorateTable(SQLResult sqlResult) { TableLoader tableLoader = sqlResult.getResultTableLoader(); TableView tv = new TableView(); RightMouseMenuHandler sqlResultRightMouseMenuHandler = new RightMouseMenuHandler(tv); ExtendedTableSelectionHandler extendedTableSelectionHandler = doStandardConfigs(tableLoader, tv, sqlResultRightMouseMenuHandler); if (null != _editButtonCtrl && _editButtonCtrl.allowsEditing()) { _editButtonCtrl.displayAndPrepareEditing(sqlResult, tv); sqlResultRightMouseMenuHandler.addSeparator(); MenuItem mnuDeleteRows = sqlResultRightMouseMenuHandler.addMenu( new I18n(getClass()).t("sqlresult.popup.delete.selected.rows"), () -> _editButtonCtrl.deleteSelectedRows()); _editButtonCtrl.setDeleteRowsMenuItem(mnuDeleteRows); } else { tableLoader.load(tv); } return extendedTableSelectionHandler.getStackPane(); }
private StackPane decorateTable(TableLoader tableLoader) { TableView tv = new TableView(); RightMouseMenuHandler sqlResultRightMouseMenuHandler = new RightMouseMenuHandler(tv); ExtendedTableSelectionHandler extendedTableSelectionHandler = doStandardConfigs(tableLoader, tv, sqlResultRightMouseMenuHandler); tableLoader.load(tv); return extendedTableSelectionHandler.getStackPane(); }