@Test public void testRelativeY() { final double transformTranslateY = 50d; final double transformScaleY = 1.5d; final int y = 100; final int expectedRelativeY = 33; when(transform.getTranslateY()).thenReturn(transformTranslateY); when(transform.getScaleY()).thenReturn(transformScaleY); final int actualRelativeY = abstractDragProxy.relativeY(y); assertEquals(expectedRelativeY, actualRelativeY); }
int relativeY(final int y) { final Double relativeY = ((y) - getViewportTransform().getTranslateY()) / getViewportTransform().getScaleY(); return relativeY.intValue(); }
AbstractDragProxy { int relativeY(final int y) { final Double relativeY = ((y) - getViewportTransform().getTranslateY()) / getViewportTransform().getScaleY(); return relativeY.intValue(); } }
AbstractDragProxy { int relativeY(final int y) { final Double relativeY = ((y) - getViewportTransform().getTranslateY()) / getViewportTransform().getScaleY(); return relativeY.intValue(); } AbstractDragProxy(final Layer layer,
                             final T shape,
                             final int x,
                             final int y,
                             final int timeout,
                             final Callback callback); }
AbstractDragProxy { int relativeY(final int y) { final Double relativeY = ((y) - getViewportTransform().getTranslateY()) / getViewportTransform().getScaleY(); return relativeY.intValue(); } AbstractDragProxy(final Layer layer,
                             final T shape,
                             final int x,
                             final int y,
                             final int timeout,
                             final Callback callback); void clear(); void destroy(); }
AbstractDragProxy { int relativeY(final int y) { final Double relativeY = ((y) - getViewportTransform().getTranslateY()) / getViewportTransform().getScaleY(); return relativeY.intValue(); } AbstractDragProxy(final Layer layer,
                             final T shape,
                             final int x,
                             final int y,
                             final int timeout,
                             final Callback callback); void clear(); void destroy();  }