public int getProgression() { return progression_.getValue(); }
public void setDesc(final String _s) { desc_ = _s; setProgression(bar_.getValue()); }
public void setProgression(int _v) { int vInit=_v; if(progression_!=null) { if(vInit< 0) vInit=0; if(vInit>100) vInit=100; if(progression_.getValue()!=vInit) { if(SwingUtilities.isEventDispatchThread()) { progression_.setValue(vInit); } else { final int v=vInit; SwingUtilities.invokeLater(new Runnable() //AndWait { public void run() { progression_.setValue(v); //BuUpdateGUI.repaintNow(progression_); } }); } } } } }
public String getString() { String r=super.getString(); if(r==null) { int v =getValue(); int vmin=getMinimum(); int vmax=getMaximum(); if((vmax>vmin)&&(v>vmin)) { if((vmin==0)&&(vmax==100)) r=((v-vmin)*100/(vmax-vmin))+"%"; else r=""+v; } } return r; }