final IpSliderBar51 ipSliderBar51OnOff = new IpSliderBar51("Off", "On");
verticalPanel.add(ipSliderBar51OnOff);
ipSliderBar51OnOff.setValue(bb.getValue() ? 1 : 0);
ipSliderBar51OnOff.setStyleName("gwt-BehaviorsPopupPanel");
ipSliderBar51OnOff.addStyleName("widget");
ipSliderBar51OnOff.addBarValueChangedHandler(new BarValueChangedHandler() {
@Override
public void onBarValueChanged(BarValueChangedEvent event) {
// TODO Auto-generated method stub
if (((BooleanBehavior) b).getValue() != Boolean.valueOf(ipSliderBar51OnOff.getValue() != 0)) {
EnvironmentsController.changeBehavior(obj.getName(), b.getName(), Boolean.valueOf(ipSliderBar51OnOff.getValue() != 0).toString());
}
}
});
//verticalPanel.add(horizontalPanel);
} else if (b instanceof RangedIntBehavior) {
final RangedIntBehavior rb = (RangedIntBehavior) b;
final SliderBarSimpleHorizontal slide = new SliderBarSimpleHorizontal(rb.getMax() - rb.getMin(), "100%", true);
verticalPanel.add(slide);
slide.setValue(rb.getValue() - rb.getMin());
slide.setStyleName("gwt-BehaviorsPopupPanel");
slide.addStyleName("widget");
slide.addBarValueChangedHandler(new BarValueChangedHandler() {
@Override
public void onBarValueChanged(BarValueChangedEvent event) {
//((RangedIntBehavior) b).setValue(slide.getValue()+rb.getMin());
if (((RangedIntBehavior) b).getValue() != (slide.getValue() + rb.getMin())) {
EnvironmentsController.changeBehavior(obj.getName(), b.getName(), String.valueOf((slide.getValue() + rb.getMin())));