Esempio n. 1
0
 @Inject
 public FilterViewImpl() {
   // Setting the Range for the Sliders
   lengthSlider = new RangeSlider();
   lengthSlider.setMin(Boundaries.MIN_LENGTH);
   lengthSlider.setMax(Boundaries.MAX_LENGTH);
   lengthSlider.setWidth("70%");
   lengthSlider.setValue(new Range(Boundaries.MIN_LENGTH, Boundaries.MAX_LENGTH));
   yearSlider = new RangeSlider();
   yearSlider.setWidth("70%");
   yearSlider.setMin(Boundaries.MIN_YEAR);
   yearSlider.setMax(Boundaries.MAX_YEAR);
   yearSlider.setValue(new Range(Boundaries.MIN_YEAR, Boundaries.MAX_YEAR));
   initWidget(uiBinder.createAndBindUi(this));
   collapseBox.setIn(true);
   // Setting Up Listening for Enter Pressed Events to start the search
   focusPanel.addKeyDownHandler(
       new KeyDownHandler() {
         @Override
         public void onKeyDown(KeyDownEvent event) {
           if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
             filterPresenter.onSearch();
           }
         }
       });
 }
Esempio n. 2
0
 @Override
 public int getYearEnd() {
   return (int) yearSlider.getValue().getMaxValue();
 }
Esempio n. 3
0
 @Override
 public int getYearStart() {
   return (int) yearSlider.getValue().getMinValue();
 }
Esempio n. 4
0
 @Override
 public void setYearSlider(int startYear, int endYear) {
   yearSlider.setValue(new Range(startYear, endYear));
 }
Esempio n. 5
0
 @Override
 public int getLengthEnd() {
   return (int) lengthSlider.getValue().getMaxValue();
 }
Esempio n. 6
0
 @Override
 public int getLengthStart() {
   return (int) lengthSlider.getValue().getMinValue();
 }
Esempio n. 7
0
 @Override
 public void setLengthSlider(int startLength, int endLength) {
   lengthSlider.setValue(new Range(startLength, endLength));
 }