Exemplo n.º 1
0
 /**
  * Pans the display back to the origin, so that 0, 0 is at the the upper left of the visible
  * viewport.
  */
 public void recenter(Location loc) {
   originRow = loc.getRow();
   originCol = loc.getCol();
   repaint();
   JViewport vp = getEnclosingViewport();
   if (vp != null) {
     if (!isPannableUnbounded() || !(vp instanceof PseudoInfiniteViewport))
       vp.setViewPosition(pointForLocation(loc));
     else showPanTip();
   }
 }