@Test public void select() { ProgressBar progressBar = (ProgressBar) getPrimaryStage().getScene().getRoot().lookup(".progress-bar"); LoggingRecorder lr = new LoggingRecorder(); Platform.runLater(() -> { RFXProgressBar rfxProgressBar = new RFXProgressBar(progressBar, null, null, lr); progressBar.setProgress(0.56); rfxProgressBar.mouseReleased(null); }); List<Recording> recordings = lr.waitAndGetRecordings(1); Recording recording = recordings.get(0); AssertJUnit.assertEquals("recordSelect", recording.getCall()); AssertJUnit.assertEquals("0.56", recording.getParameters()[0]); }
@Override protected void mouseReleased(MouseEvent me) { ProgressBar progressBar = (ProgressBar) node; String currentValue = getProgressText(progressBar); if (currentValue != null && !currentValue.equals("-1")) { recorder.recordSelect(this, currentValue); } }
RFXProgressBar extends RFXComponent { @Override protected void mouseReleased(MouseEvent me) { ProgressBar progressBar = (ProgressBar) node; String currentValue = getProgressText(progressBar); if (currentValue != null && !currentValue.equals("-1")) { recorder.recordSelect(this, currentValue); } } }
RFXProgressBar extends RFXComponent { @Override protected void mouseReleased(MouseEvent me) { ProgressBar progressBar = (ProgressBar) node; String currentValue = getProgressText(progressBar); if (currentValue != null && !currentValue.equals("-1")) { recorder.recordSelect(this, currentValue); } } RFXProgressBar(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); }
RFXProgressBar extends RFXComponent { @Override protected void mouseReleased(MouseEvent me) { ProgressBar progressBar = (ProgressBar) node; String currentValue = getProgressText(progressBar); if (currentValue != null && !currentValue.equals("-1")) { recorder.recordSelect(this, currentValue); } } RFXProgressBar(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override String _getText(); }
RFXProgressBar extends RFXComponent { @Override protected void mouseReleased(MouseEvent me) { ProgressBar progressBar = (ProgressBar) node; String currentValue = getProgressText(progressBar); if (currentValue != null && !currentValue.equals("-1")) { recorder.recordSelect(this, currentValue); } } RFXProgressBar(Node source, JSONOMapConfig omapConfig, Point2D point, IJSONRecorder recorder); @Override String _getText(); static final Logger LOGGER; }