@Test public void getText() throws Throwable { Slider slider = (Slider) getPrimaryStage().getScene().getRoot().lookup(".slider"); LoggingRecorder lr = new LoggingRecorder(); List<String> text = new ArrayList<>(); Platform.runLater(new Runnable() { @Override public void run() { slider.setValue(25.0); RFXSlider rfxSlider = new RFXSlider(slider, null, null, lr); rfxSlider.focusLost(null); text.add(rfxSlider.getAttribute("text")); } }); new Wait("Waiting for slider text.") { @Override public boolean until() { return text.size() > 0; } }; AssertJUnit.assertEquals("25.0", text.get(0)); }
@Override public void focusLost(RFXComponent next) { double current = ((Slider) node).getValue(); if (current != prevValue) { recorder.recordSelect(this, "" + current); } }
RFXSlider extends RFXComponent { @Override public void focusLost(RFXComponent next) { double current = ((Slider) node).getValue(); if (current != prevValue) { recorder.recordSelect(this, "" + current); } } }
RFXSlider extends RFXComponent { @Override public void focusLost(RFXComponent next) { double current = ((Slider) node).getValue(); if (current != prevValue) { recorder.recordSelect(this, "" + current); } } RFXSlider(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); }
RFXSlider extends RFXComponent { @Override public void focusLost(RFXComponent next) { double current = ((Slider) node).getValue(); if (current != prevValue) { recorder.recordSelect(this, "" + current); } } RFXSlider(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override void focusGained(RFXComponent prev); @Override void focusLost(RFXComponent next); @Override String _getText(); }
RFXSlider extends RFXComponent { @Override public void focusLost(RFXComponent next) { double current = ((Slider) node).getValue(); if (current != prevValue) { recorder.recordSelect(this, "" + current); } } RFXSlider(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; }