@Test public void getText() { TreeTableView<?> treeTableView = (TreeTableView<?>) getPrimaryStage().getScene().getRoot().lookup(".tree-table-view"); LoggingRecorder lr = new LoggingRecorder(); List<String> text = new ArrayList<>(); Platform.runLater(() -> { RFXTreeTableView rfxTreeTableView = new RFXTreeTableView(treeTableView, null, null, lr); treeTableView.getSelectionModel().select(2); rfxTreeTableView.focusLost(null); text.add(rfxTreeTableView.getAttribute("text")); }); new Wait("Waiting for tree table view text.") { @Override public boolean until() { return text.size() > 0; } }; AssertJUnit.assertEquals("{\"rows\":[\"/Sales Department/Emma Jones\"]}", text.get(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; }