private void testViewCenter(MutableTransformer transformer,Point2D point){
  if (transformer instanceof LensTransformer) {
    LensTransformer ht=(LensTransformer)transformer;
    double distanceFromCenter=ht.getDistanceFromCenter(point);
    if (distanceFromCenter < 10) {
      ht.setViewCenter(point);
      dragOnLens=true;
    }
 else     if (Math.abs(distanceFromCenter - ht.getViewRadius()) < 10) {
      edgeOffset=ht.getViewRadius() - distanceFromCenter;
      ht.setViewRadius(distanceFromCenter + edgeOffset);
      dragOnEdge=true;
    }
  }
}

private void testViewCenter ( MutableTransformer transformer , Point2D point ) { if ( transformer instanceof LensTransformer ) { LensTransformer ht = ( LensTransformer ) transformer ; double distanceFromCenter = ht . getDistanceFromCenter ( point ) ; if ( distanceFromCenter < 10 ) { ht . setViewCenter ( point ) ; dragOnLens = true ; } else if ( Math . abs ( distanceFromCenter - ht . getViewRadius ( ) ) < 10 ) { edgeOffset = ht . getViewRadius ( ) - distanceFromCenter ; ht . setViewRadius ( distanceFromCenter + edgeOffset ) ; dragOnEdge = true ; } } }
called to set up translating the lens center or changing the size
