add(coloredWarning);
ProgressBar coloredDanger = new ProgressBar("coloredDanger", Model.of(80), ProgressBar.Type.DANGER);
add(coloredDanger);
UpdatableProgressBar updatableBar = new UpdatableProgressBar("updatable", Model.of(0)) {
@Override
protected IModel<Integer> newValue() {
int newValue = (value() + 1) % ProgressBar.MAX;
return Model.of(newValue);
}
};
updatableBar.updateInterval(Duration.seconds(1));
add(updatableBar);
}