예제 #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();
           }
         }
       });
 }
예제 #2
0
 @Override
 public void setYearSlider(int startYear, int endYear) {
   yearSlider.setValue(new Range(startYear, endYear));
 }
예제 #3
0
 @Override
 public void setLengthSlider(int startLength, int endLength) {
   lengthSlider.setValue(new Range(startLength, endLength));
 }