ui/src/main/java/ucar/nc2/ui/image/PicturePane.java
public void centerImage() {
		if (sclPic.getOriginalImage() != null) {
			setCenterLocation((int) sclPic.getOriginalWidth() / 2, (int) sclPic.getOriginalHeight() / 2);
			repaint();
		}
 }
public void centerImage() {
		if (sclPic.getOriginalImage() != null) {
			setCenterLocation((int) sclPic.getOriginalWidth() / 2, (int) sclPic.getOriginalHeight() / 2);
			repaint();
		}
 }
public void centerImage ( ) { if ( sclPic . getOriginalImage ( ) != null ) { setCenterLocation ( ( int ) sclPic . getOriginalWidth ( ) / 2 , ( int ) sclPic . getOriginalHeight ( ) / 2 ) ; repaint ( ) ; } }
Set image to center of panel by putting the coordinates of the middle of the original image into the
Center to X and Center to Y varaibles by invoking the setCenterLoaction method.
This method
calls <code>repaint()</code> directly since no time consuming image operations need to take place.
Set image to center of panel by putting the coordinates of the middle of the original image into the Center to X and Center to Y varaibles by invoking the setCenterLoaction method . This method calls <code > repaint () < / code > directly since no time consuming image operations need to take place .