@Test public void testSetup() { view.setHandle(0, 4); view.valueChanged(0.f); view.setHandle(2, 2); view.valueChanged(4.f); replay(view); scrollbar.bindToView(view, 0.f, 4.f, viewSize, 1.f, 4.f); scrollbar.setup(4.f, 8.f, viewSize, 2.f, 4.f); assertEquals(2.f, scrollbar.getButtonStepSize()); assertEquals(4.f, scrollbar.getValue()); assertEquals(4.f, scrollbar.getPageStepSize()); }
public void setup( final float value, final float worldMax, final float worldPageSize, final float buttonStepSize, final float pageStepSize) { this.value = value; this.worldMax = worldMax; this.worldPageSize = worldPageSize; this.buttonStepSize = buttonStepSize; this.pageStepSize = pageStepSize; ensureWorldPageSize(); changeValue(value); updateView(); }
ScrollbarImpl { public void setup( final float value, final float worldMax, final float worldPageSize, final float buttonStepSize, final float pageStepSize) { this.value = value; this.worldMax = worldMax; this.worldPageSize = worldPageSize; this.buttonStepSize = buttonStepSize; this.pageStepSize = pageStepSize; ensureWorldPageSize(); changeValue(value); updateView(); } }
ScrollbarImpl { public void setup( final float value, final float worldMax, final float worldPageSize, final float buttonStepSize, final float pageStepSize) { this.value = value; this.worldMax = worldMax; this.worldPageSize = worldPageSize; this.buttonStepSize = buttonStepSize; this.pageStepSize = pageStepSize; ensureWorldPageSize(); changeValue(value); updateView(); }  }
ScrollbarImpl { public void setup( final float value, final float worldMax, final float worldPageSize, final float buttonStepSize, final float pageStepSize) { this.value = value; this.worldMax = worldMax; this.worldPageSize = worldPageSize; this.buttonStepSize = buttonStepSize; this.pageStepSize = pageStepSize; ensureWorldPageSize(); changeValue(value); updateView(); }  void bindToView(
      @Nonnull final ScrollbarView view,
      final float value,
      final float worldMax,
      final float worldPageSize,
      final float buttonStepSize,
      final float pageStepSize); void setup(
      final float value,
      final float worldMax,
      final float worldPageSize,
      final float buttonStepSize,
      final float pageStepSize); void setValue(final float value); float getValue(); void stepUp(); void stepDown(); void stepPageUp(); void stepPageDown(); float getWorldMax(); void setWorldMax(final float max); float getWorldPageSize(); void setWorldPageSize(final float worldPageSize); float getButtonStepSize(); void setButtonStepSize(final float buttonStepSize); float getPageStepSize(); void setPageStepSize(final float pageStepSize); void interactionClick(final int viewValueClicked); void interactionMove(final int viewValue); void updateView(); }
ScrollbarImpl { public void setup( final float value, final float worldMax, final float worldPageSize, final float buttonStepSize, final float pageStepSize) { this.value = value; this.worldMax = worldMax; this.worldPageSize = worldPageSize; this.buttonStepSize = buttonStepSize; this.pageStepSize = pageStepSize; ensureWorldPageSize(); changeValue(value); updateView(); }  void bindToView(
      @Nonnull final ScrollbarView view,
      final float value,
      final float worldMax,
      final float worldPageSize,
      final float buttonStepSize,
      final float pageStepSize); void setup(
      final float value,
      final float worldMax,
      final float worldPageSize,
      final float buttonStepSize,
      final float pageStepSize); void setValue(final float value); float getValue(); void stepUp(); void stepDown(); void stepPageUp(); void stepPageDown(); float getWorldMax(); void setWorldMax(final float max); float getWorldPageSize(); void setWorldPageSize(final float worldPageSize); float getButtonStepSize(); void setButtonStepSize(final float buttonStepSize); float getPageStepSize(); void setPageStepSize(final float pageStepSize); void interactionClick(final int viewValueClicked); void interactionMove(final int viewValue); void updateView();  }