histogram.setConstraintHeight(30);
}
public void setup(final RangeFilter rangeFilter) {
this.filter = rangeFilter;
final Range range = (Range) rangeFilter.getRangeProperty().getValue();
if (range == null) {
//Do nothing
} else {
new Thread(new Runnable() {
public void run() {
final JRangeSliderPanel rangeSlider = (JRangeSliderPanel) rangeSliderPanel;
values = range.getValues();
rangeSlider.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
try {
if (evt.getPropertyName().equals(JRangeSliderPanel.LOWER_BOUND)) {
Range oldRange = (Range) filter.getRangeProperty().getValue();
final Range newRange = new Range((Number) rangeSlider.getRange().getLowerBound(), (Number) rangeSlider.getRange().getUpperBound(), oldRange.getMinimum(), oldRange.getMaximum(), oldRange.getValues());
if (!oldRange.equals(newRange)) {
filter.getRangeProperty().setValue(newRange);
new Thread(new Runnable() {
public void run() {
setupHistogram(filter, newRange);
}
}).start();
}
} else if (evt.getPropertyName().equals(JRangeSliderPanel.UPPER_BOUND)) {
final Range oldRange = (Range) filter.getRangeProperty().getValue();
final Range newRange = new Range((Number) rangeSlider.getRange().getLowerBound(), (Number) rangeSlider.getRange().getUpperBound(), oldRange.getMinimum(), oldRange.getMaximum(), oldRange.getValues());
if (!oldRange.equals(newRange)) {
filter.getRangeProperty().setValue(newRange);
new Thread(new Runnable() {
public void run() {