DefaultViewport implements Viewport { @Override public void moveViewDelta(double deltaX, double deltaY) { if (deltaX == 0.0 && deltaY == 0.0) { return; } viewToModelTransform.translate(-deltaX, -deltaY); updateModelToViewTransform(); fireViewportChanged(false); } DefaultViewport();  DefaultViewport(Rectangle viewBounds);  DefaultViewport(boolean modelYAxisDown);  DefaultViewport(Rectangle viewBounds, boolean modelYAxisDown); @Override boolean isModelYAxisDown(); @Override void setModelYAxisDown(boolean modelYAxisDown); @Override Rectangle getViewBounds(); @Override void setViewBounds(Rectangle viewBounds); @Override AffineTransform getViewToModelTransform(); @Override AffineTransform getModelToViewTransform(); @Override double getOrientation(); @Override void setOrientation(double orientation); @Override double getOffsetX(); @Override double getOffsetY(); @Override void setOffset(double offsetX, double offsetY); @Override void moveViewDelta(double deltaX, double deltaY); @Override double getZoomFactor(); @Override void setZoomFactor(double zoomFactor); @Override void zoom(Rectangle2D modelBounds); @Override void setZoomFactor(double zoomFactor, double modelCenterX, double modelCenterY); @Override void addListener(ViewportListener listener); @Override void removeListener(ViewportListener listener); @Override ViewportListener[] getListeners(); @Override void setTransform(Viewport other); @Override String toString(); @SuppressWarnings({"CloneDoesntDeclareCloneNotSupportedException"}) @Override Viewport clone();  }
@Test public void testMove() { final DefaultViewport viewport = new DefaultViewport(true); viewport.moveViewDelta(15.0, 10.0); assertEquals(p(-15.0, -10.0), getModelOffset(viewport)); viewport.moveViewDelta(-15.0, -10.0); assertEquals(p(0.0, 0.0), getModelOffset(viewport)); }