starting to work on bug3122: redraw SliderBar when min/max has been adjusted

This commit is contained in:
Axel Uhl committed 2015-07-17 11:01:14 +02:00
1 parent d9d02e9737
commit f590b71f4c
2 files changed
+15 -10

No files matched your search

@@ -45,6 +45,7 @@ import com.google.gwt.user.client.ui.FocusPanel;
import com.google.gwt.user.client.ui.HasValue;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.RequiresResize;
import com.sap.sse.common.Util;
/**
* A widget that allows the user to select a value within a range of possible values using a sliding bar that responds
@@ -704,9 +705,11 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
* the current value
*/
public void setMaxValue(Double maxValue, boolean fireEvent) {
this.maxValue = maxValue;
drawTickLabels();
resetCurrentValue(fireEvent);
if (!Util.equalsWithNull(maxValue, this.maxValue)) {
this.maxValue = maxValue;
redraw();
resetCurrentValue(fireEvent);
}
}
/**
@@ -716,9 +719,11 @@ public class SliderBar extends FocusPanel implements RequiresResize, HasValue<Do
* the current value
*/
public void setMinValue(Double minValue, boolean fireEvent) {
this.minValue = minValue;
drawTickLabels();
resetCurrentValue(fireEvent);
if (!Util.equalsWithNull(minValue, this.minValue)) {
this.minValue = minValue;
redraw();
resetCurrentValue(fireEvent);
}
}
/**
@@ -199,21 +199,21 @@ public class TimeSlider extends SliderBar {
}
public void setMaxValue(Double maxValue, boolean fireEvent) {
if(!isZoomed) {
calculateTicks();
if (!isZoomed) {
super.setMaxValue(maxValue, fireEvent);
} else {
this.maxValue = maxValue;
}
calculateTicks();
}
public void setMinValue(Double minValue, boolean fireEvent) {
if(!isZoomed) {
calculateTicks();
if (!isZoomed) {
super.setMinValue(minValue, fireEvent);
} else {
this.minValue = minValue;
}
calculateTicks();
}
public void setStepSize(double stepSize, boolean fireEvent) {