@Test public void selectNoCell() { TreeTableView<?> treeTableView = (TreeTableView<?>) getPrimaryStage().getScene().getRoot().lookup(".tree-table-view"); LoggingRecorder lr = new LoggingRecorder(); Platform.runLater(() -> { treeTableView.getSelectionModel().setCellSelectionEnabled(true); RFXTreeTableView rfxTreeTableView = new RFXTreeTableView(treeTableView, null, null, lr); rfxTreeTableView.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) { TreeTableView<?> treeTableView = (TreeTableView<?>) node; String currentCellValue = getTreeTableCellValueAt(treeTableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && treeTableView.getSelectionModel().getSelectedItems().size() > 1) { String currentTreeTableText = getTreeTableSelection(treeTableView); if (!currentTreeTableText.equals(treeTableText)) { recorder.recordSelect(this, getTreeTableSelection(treeTableView)); } } }
RFXTreeTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TreeTableView<?> treeTableView = (TreeTableView<?>) node; String currentCellValue = getTreeTableCellValueAt(treeTableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && treeTableView.getSelectionModel().getSelectedItems().size() > 1) { String currentTreeTableText = getTreeTableSelection(treeTableView); if (!currentTreeTableText.equals(treeTableText)) { recorder.recordSelect(this, getTreeTableSelection(treeTableView)); } } } }
RFXTreeTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TreeTableView<?> treeTableView = (TreeTableView<?>) node; String currentCellValue = getTreeTableCellValueAt(treeTableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && treeTableView.getSelectionModel().getSelectedItems().size() > 1) { String currentTreeTableText = getTreeTableSelection(treeTableView); if (!currentTreeTableText.equals(treeTableText)) { recorder.recordSelect(this, getTreeTableSelection(treeTableView)); } } } RFXTreeTableView(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); }
RFXTreeTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TreeTableView<?> treeTableView = (TreeTableView<?>) node; String currentCellValue = getTreeTableCellValueAt(treeTableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && treeTableView.getSelectionModel().getSelectedItems().size() > 1) { String currentTreeTableText = getTreeTableSelection(treeTableView); if (!currentTreeTableText.equals(treeTableText)) { recorder.recordSelect(this, getTreeTableSelection(treeTableView)); } } } RFXTreeTableView(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); String getTreeTableCellValueAt(TreeTableView<?> treeTableView, int row, int column); @Override void focusLost(RFXComponent next); @Override int hashCode(); @Override boolean equals(Object obj); @Override String getCellInfo(); @Override String _getText(); }
RFXTreeTableView extends RFXComponent { @Override public void focusLost(RFXComponent next) { TreeTableView<?> treeTableView = (TreeTableView<?>) node; String currentCellValue = getTreeTableCellValueAt(treeTableView, row, column); if (currentCellValue != null && !currentCellValue.equals(cellValue)) { recorder.recordSelect2(this, currentCellValue, true); } if ((next == null || next.getComponent() != getComponent()) && treeTableView.getSelectionModel().getSelectedItems().size() > 1) { String currentTreeTableText = getTreeTableSelection(treeTableView); if (!currentTreeTableText.equals(treeTableText)) { recorder.recordSelect(this, getTreeTableSelection(treeTableView)); } } } RFXTreeTableView(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); String getTreeTableCellValueAt(TreeTableView<?> treeTableView, 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; }