Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Tab dynamisch hinzufügen

    Code Block
    languagejava
    themeConfluence
    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 value of the total 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
     
    		// Starts a new thread
    		Runnable task = ()->{			 
    	
    			// Start your process. Store the current progress 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();	
    }
  • Zur XdevPanel Javadoc