...
Tab dynamisch hinzufügen
Code Block language java theme Confluence private void progressBar_attach(ClientConnector.AttachEvent event) { Runnable task = ()->{ for(int i=0; i<=100; i++) { float value = (float)i/100f; System.out.println(value); getUI().access(()->progressBar.setValue(value)); try { Thread.sleep(10); } catch (InterruptedException e) { } } }; new Thread(new RunnableAccessWrapper(task)).start(); } private void progressBar_attach(ClientConnector.AttachEvent event) { // Find out the valuelenght of theyour totalprocess progress. It is 1.0 // Starts a new thread Runnable task = ()->{ // Repeat until value is 1.0 // Find out the value of the current progress and convert into a float between 0.1 and 1.0 // Sets the value of the ProgressBar getUI().access(()->progressBar.setValue(value)); }; new Thread(new RunnableAccessWrapper(task)).start(); } private void progressBar_attach(ClientConnector.AttachEvent event) { // Find out the value of the total progress. It is 1.0 in total. The value is 1.0. // Starts a new thread Runnable task = ()->{ // Start your process. StoreFind out the current progress and store it in 'value'. Value must be between 0.1 and 1.0. // Sets the value of the ProgressBar getUI().access(()->progressBar.setValue(value)); }; new Thread(new RunnableAccessWrapper(task)).start(); }