private LabeledRangeSlider createSeedsFilter() { LabeledRangeSlider slider = new LabeledRangeSlider(I18n.tr("Seeds"), null, 0, 1000); slider.setPreferredSize(new Dimension(200, (int) slider.getPreferredSize().getHeight())); slider.addChangeListener( new ChangeListener() { public void stateChanged(ChangeEvent e) { sliderSeeds_stateChanged(e); } }); return slider; }
private void sliderSeeds_stateChanged(ChangeEvent e) { // System.out.println(sliderSeeds.getLowerValue() + " - " + sliderSeeds.getUpperValue()); if (generalFilter != null) { generalFilter.setRangeSeeds(sliderSeeds.getLowerValue(), sliderSeeds.getUpperValue()); } }
private void sliderSize_stateChanged(ChangeEvent e) { if (generalFilter != null) { generalFilter.setRangeSize(sliderSize.getLowerValue(), sliderSize.getUpperValue()); } }
public void resetFilters() { sliderSeeds.setMinimum(0); sliderSeeds.setMaximum(1000); sliderSeeds.setLowerValue(0); sliderSeeds.setUpperValue(1000); sliderSize.setMinimum(0); sliderSize.setMaximum(1000); sliderSize.setLowerValue(0); sliderSize.setUpperValue(1000); sliderSeeds.getMinimumValueLabel().setText("0"); sliderSeeds.getMaximumValueLabel().setText(I18n.tr("Max")); sliderSize.getMinimumValueLabel().setText("0"); sliderSize.getMaximumValueLabel().setText(I18n.tr("Max")); textFieldKeywords.setText(""); }