@Test public void getText() { ProgressBar progressBar = (ProgressBar) getPrimaryStage().getScene().getRoot().lookup(".progress-bar"); LoggingRecorder lr = new LoggingRecorder(); List<String> text = new ArrayList<>(); Platform.runLater(() -> { RFXProgressBar rfxProgressBar = new RFXProgressBar(progressBar, null, null, lr); progressBar.setProgress(0.56); rfxProgressBar.mouseReleased(null); text.add(rfxProgressBar.getAttribute("text")); }); new Wait("Waiting for progress bar text.") { @Override public boolean until() { return text.size() > 0; } }; AssertJUnit.assertEquals("0.56", text.get(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; }