public void setMaxProgress ( int newMaxProgress ) { if ( getProgress ( ) <= newMaxProgress ) { maxProgress = newMaxProgress ; } else { throw new IllegalArgumentException ( String . format ( "MaxProgress cant be smaller than the current progress %d<%d" , getProgress ( ) , newMaxProgress ) ) ; } invalidate ( ) ; BootstrapProgressBarGroup parent = ( BootstrapProgressBarGroup ) getParent ( ) ; }
Used for settings the maxprogress . Also check if currentProgress is smaller than newMaxProgress .