@Test public void selectListSpinner() { Spinner<?> spinner = (Spinner<?>) getPrimaryStage().getScene().getRoot().lookup(".spinner"); LoggingRecorder lr = new LoggingRecorder(); Platform.runLater(() -> { RFXSpinner rfxSpinner = new RFXSpinner(spinner, null, null, lr); spinner.getEditor().setText("March"); rfxSpinner.focusLost(null); }); List<Recording> recordings = lr.waitAndGetRecordings(1); Recording recording = recordings.get(0); AssertJUnit.assertEquals("recordSelect", recording.getCall()); AssertJUnit.assertEquals("March", recording.getParameters()[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; }