Package org.odlabs.wiquery.ui.progressbar

Examples of org.odlabs.wiquery.ui.progressbar.ProgressBar


 
  public ProgressBarPanel(String id) {
    super(id);
   
    // Indeterminate progress bar
    final ProgressBar indeterminateProgressBar = new ProgressBar("indeterminateProgressBar");
    indeterminateProgressBar.setValue(false);
    indeterminateProgressBar.setMax(50);
    add(indeterminateProgressBar);
   
    // Classic progress bar
    final ProgressBar classicProgressBar = new ProgressBar("classicProgressBar");
    classicProgressBar.setValue(10);
    classicProgressBar.setMax(20);
    classicProgressBar.setChangeEvent(JsScopeUiEvent.quickScope(indeterminateProgressBar.increment()));
    classicProgressBar.setCompleteEvent(JsScopeUiEvent.quickScope(indeterminateProgressBar.disable()));
    add(classicProgressBar);
   
    // Increment link
    final AjaxLink<Void> incrementLink = new AjaxLink<Void>("incrementLink") {
      private static final long serialVersionUID = 1L;

      @Override
      public void onClick(AjaxRequestTarget target) {
        target.appendJavaScript(classicProgressBar.increment().render());
      }
    };
    add(incrementLink);
   
    // Decrement link
    final AjaxLink<Void> decrementLink = new AjaxLink<Void>("decrementLink") {
      private static final long serialVersionUID = 1L;

      @Override
      public void onClick(AjaxRequestTarget target) {
        target.appendJavaScript(classicProgressBar.decrement().render());
      }
    };
    add(decrementLink);
  }
View Full Code Here

TOP

Related Classes of org.odlabs.wiquery.ui.progressbar.ProgressBar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.