Ejemplo 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();
           }
         }
       });
 }
Ejemplo n.º 2
0
 @Override
 public int getYearEnd() {
   return (int) yearSlider.getValue().getMaxValue();
 }
Ejemplo n.º 3
0
 @Override
 public int getYearStart() {
   return (int) yearSlider.getValue().getMinValue();
 }
Ejemplo n.º 4
0
 @Override
 public void setYearSlider(int startYear, int endYear) {
   yearSlider.setValue(new Range(startYear, endYear));
 }
Ejemplo n.º 5
0
 @Override
 public int getLengthEnd() {
   return (int) lengthSlider.getValue().getMaxValue();
 }
Ejemplo n.º 6
0
 @Override
 public int getLengthStart() {
   return (int) lengthSlider.getValue().getMinValue();
 }
Ejemplo n.º 7
0
 @Override
 public void setLengthSlider(int startLength, int endLength) {
   lengthSlider.setValue(new Range(startLength, endLength));
 }