for (Object col : playListTableView.getColumns()) { TableColumn colCasted = ((TableColumn)col); if(colCasted.getText().equals("Artist")){ colCasted.setVisible(false); } }
public void modify() { if (!isModifying()) { setModifying(true); headerCheckboxCol.setVisible(true); // clear tableview selection tableView.getSelectionModel().clearSelection(); } }
public void modify() { if (!isModifying()) { setModifying(true); headerCheckboxCol.setVisible(true); // clear tableview selection tableView.getSelectionModel().clearSelection(); } }
private void addSelectColumn() { headerCheckboxCol.setPrefWidth(40); headerCheckboxCol.setCellValueFactory(new PropertyValueFactory<>("selected")); headerCheckboxCol.setCellFactory(param -> buildCell()); headerCheckboxCol.setGraphic(headerColCheckbox); headerCheckboxCol.setVisible(false); tableView.getColumns().add(0, headerCheckboxCol); }
@SuppressWarnings({"unchecked"}) private void addSelectColumn() { headerCheckboxCol.setPrefWidth(40); headerCheckboxCol.setCellValueFactory(new PropertyValueFactory<>("selected")); headerCheckboxCol.setCellFactory(param -> buildCell()); headerCheckboxCol.setGraphic(headerColCheckbox); headerCheckboxCol.setVisible(false); tableView.getColumns().add(0, headerCheckboxCol); }
/** * Reload the table according to setting (colums) * * @param tableSetting */ public void reloadTableSetting(final VLViewTableSettingXML tableSetting) { final List<TableColumn> newcols = new ArrayList<>(); for (final VLViewTableSettingColumnXML tcol : tableSetting.getColumns()) { for (final TableColumn col : tableView.getColumns()) { if (tcol.getId().equals(col.getId())) { col.setPrefWidth(tcol.getWidth()); col.setVisible(tcol.isDisplayed()); newcols.add(col); } } } tableView.getColumns().clear(); for(TableColumn e: newcols) { tableView.getColumns().add(e); } }
PersistedPreferences columnPref = entry.getValue(); int visibility = columnPref.getInt(PREF_COLUMN_VISIBILITY, -1); column.setVisible(visibility != 0); double width = columnPref.getDouble(PREF_WIDTH, -1.0); if (width >= 0.0) {
/** * hide all checkbox */ public void cancelModify() { if (isModifying()) { headerCheckboxCol.setVisible(false); //tableView.getItems().forEach(e -> e.selectedProperty().set(false)); tableView.getSelectionModel().clearSelection(); topToolbar.done(); headerColCheckbox.selectedProperty().set(false); hasSelectedRowProperty.set(false); topToolbar.setSelectedItems(0); setModifying(false); } }
/** * hide all checkbox */ public void cancelModify() { if (isModifying()) { headerCheckboxCol.setVisible(false); for(ObjectModel e: tableView.getItems()) { e.selectedProperty().set(false); } tableView.getSelectionModel().clearSelection(); topToolbar.done(); headerColCheckbox.selectedProperty().set(false); hasSelectedRowProperty.set(false); topToolbar.setSelectedItems(0); setModifying(false); } }
tcAvgHeartrate.setVisible(options.isListViewShowAvgHeartrate()); tcAscent.setVisible(options.isListViewShowAscent()); tcDescent.setVisible(options.isListViewShowDescent()); tcEnergy.setVisible(options.isListViewShowEnergy()); tcEquipment.setVisible(options.isListViewShowEquipment()); tcComment.setVisible(options.isListViewShowComment());