@Test public void testRelativeX() { final double transformTranslateX = 50d; final double transformScaleX = 1.5d; final int x = 100; final int expectedRelativeX = 33; when(transform.getTranslateX()).thenReturn(transformTranslateX); when(transform.getScaleX()).thenReturn(transformScaleX); final int actualRelativeX = abstractDragProxy.relativeX(x); assertEquals(expectedRelativeX, actualRelativeX); }
int relativeX(final int x) { final Double relativeX = ((x) - getViewportTransform().getTranslateX()) / getViewportTransform().getScaleX(); return relativeX.intValue(); }
AbstractDragProxy { int relativeX(final int x) { final Double relativeX = ((x) - getViewportTransform().getTranslateX()) / getViewportTransform().getScaleX(); return relativeX.intValue(); } }
AbstractDragProxy { int relativeX(final int x) { final Double relativeX = ((x) - getViewportTransform().getTranslateX()) / getViewportTransform().getScaleX(); return relativeX.intValue(); } AbstractDragProxy(final Layer layer,
                             final T shape,
                             final int x,
                             final int y,
                             final int timeout,
                             final Callback callback); }
AbstractDragProxy { int relativeX(final int x) { final Double relativeX = ((x) - getViewportTransform().getTranslateX()) / getViewportTransform().getScaleX(); return relativeX.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 relativeX(final int x) { final Double relativeX = ((x) - getViewportTransform().getTranslateX()) / getViewportTransform().getScaleX(); return relativeX.intValue(); } AbstractDragProxy(final Layer layer,
                             final T shape,
                             final int x,
                             final int y,
                             final int timeout,
                             final Callback callback); void clear(); void destroy();  }