@Test public void getText() { Spinner<?> spinner = (Spinner<?>) getPrimaryStage().getScene().getRoot().lookup(".spinner"); LoggingRecorder lr = new LoggingRecorder(); List<String> text = new ArrayList<>(); Platform.runLater(() -> { RFXSpinner rfxSpinner = new RFXSpinner(spinner, null, null, lr); spinner.getEditor().setText("March"); rfxSpinner.focusLost(null); text.add(rfxSpinner.getAttribute("text")); }); new Wait("Waiting for spinner text.") { @Override public boolean until() { return text.size() > 0; } }; AssertJUnit.assertEquals("March", text.get(0)); }
@Override public void focusLost(RFXComponent next) { Spinner<?> spinner = (Spinner<?>) node; String currentValue = getSpinnerText(spinner); if (!currentValue.equals(oldValue)) { recorder.recordSelect(this, currentValue); } }
RFXSpinner extends RFXComponent { @Override public void focusLost(RFXComponent next) { Spinner<?> spinner = (Spinner<?>) node; String currentValue = getSpinnerText(spinner); if (!currentValue.equals(oldValue)) { recorder.recordSelect(this, currentValue); } } }
RFXSpinner extends RFXComponent { @Override public void focusLost(RFXComponent next) { Spinner<?> spinner = (Spinner<?>) node; String currentValue = getSpinnerText(spinner); if (!currentValue.equals(oldValue)) { recorder.recordSelect(this, currentValue); } } RFXSpinner(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); }
RFXSpinner extends RFXComponent { @Override public void focusLost(RFXComponent next) { Spinner<?> spinner = (Spinner<?>) node; String currentValue = getSpinnerText(spinner); if (!currentValue.equals(oldValue)) { recorder.recordSelect(this, currentValue); } } RFXSpinner(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); @Override void focusLost(RFXComponent next); @Override String _getText(); }
RFXSpinner extends RFXComponent { @Override public void focusLost(RFXComponent next) { Spinner<?> spinner = (Spinner<?>) node; String currentValue = getSpinnerText(spinner); if (!currentValue.equals(oldValue)) { recorder.recordSelect(this, currentValue); } } RFXSpinner(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); @Override void focusLost(RFXComponent next); @Override String _getText(); static final Logger LOGGER; }