I have three integer values Total, right and left. How can i use it in a progressbar. for example, Sum = Total-(right+left). This sum is the remaining progress. Where Total is Full value. I am using a vaadin progressbar. vaadin version-7.6.3 How can i convert. please help.
ProgressBar.setValue(..) takes a Float between 0 and 1 as a parameter. (See: https://vaadin.com/download/release/8.4/8.4.1/docs/api/com/vaadin/ui/ProgressBar.html#setValue-float- )
This means that you need to scale your value to this range, say value = index / total If the index is Integer between 0 and total.