@Test public void selectNoCells() { TableView<?> tableView = (TableView<?>) getPrimaryStage().getScene().getRoot().lookup(".table-view"); LoggingRecorder lr = new LoggingRecorder(); Platform.runLater(() -> { tableView.getSelectionModel().setCellSelectionEnabled(true); RFXTableView rfxTableView = new RFXTableView(tableView, null, null, lr); tableView.getSelectionModel().clearSelection(); rfxTableView.focusLost(null); }); List<Recording> recordings = lr.waitAndGetRecordings(1); Recording recording = recordings.get(0); AssertJUnit.assertEquals("recordSelect", recording.getCall()); AssertJUnit.assertEquals("", recording.getParameters()[0]); }
@Override public void focusLost(RFXComponent next) { TableView<?> tableView = (TableView<?>) getComponent(); String currentCellValue = getTableCellValueAt(tableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && (tableView.getSelectionModel().getSelectedItems().size() > 1)) { String currentTableText = getSelection(tableView); if (!currentTableText.equals(tableText)) { recorder.recordSelect(this, getSelection(tableView)); } } }
RFXTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TableView<?> tableView = (TableView<?>) getComponent(); String currentCellValue = getTableCellValueAt(tableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && (tableView.getSelectionModel().getSelectedItems().size() > 1)) { String currentTableText = getSelection(tableView); if (!currentTableText.equals(tableText)) { recorder.recordSelect(this, getSelection(tableView)); } } } }
RFXTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TableView<?> tableView = (TableView<?>) getComponent(); String currentCellValue = getTableCellValueAt(tableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && (tableView.getSelectionModel().getSelectedItems().size() > 1)) { String currentTableText = getSelection(tableView); if (!currentTableText.equals(tableText)) { recorder.recordSelect(this, getSelection(tableView)); } } } RFXTableView(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); }
RFXTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TableView<?> tableView = (TableView<?>) getComponent(); String currentCellValue = getTableCellValueAt(tableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && (tableView.getSelectionModel().getSelectedItems().size() > 1)) { String currentTableText = getSelection(tableView); if (!currentTableText.equals(tableText)) { recorder.recordSelect(this, getSelection(tableView)); } } } RFXTableView(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); String getTableCellValueAt(TableView<?> tableView, int row, int column); @Override void focusLost(RFXComponent next); @Override int hashCode(); @Override boolean equals(Object obj); @Override String getCellInfo(); @Override String _getText(); }
RFXTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TableView<?> tableView = (TableView<?>) getComponent(); String currentCellValue = getTableCellValueAt(tableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && (tableView.getSelectionModel().getSelectedItems().size() > 1)) { String currentTableText = getSelection(tableView); if (!currentTableText.equals(tableText)) { recorder.recordSelect(this, getSelection(tableView)); } } } RFXTableView(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); String getTableCellValueAt(TableView<?> tableView, int row, int column); @Override void focusLost(RFXComponent next); @Override int hashCode(); @Override boolean equals(Object obj); @Override String getCellInfo(); @Override String _getText(); static final Logger LOGGER; }