src/main/java/com/mxgraph/swing/mxGraphComponent.java
public void zoomActual()
	{
		mxPoint translate = (pageVisible && centerPage) ? getPageTranslate(1)
				: new mxPoint();
		graph.getView()
				.scaleAndTranslate(1, translate.getX(), translate.getY());

		if (isPageVisible())
		{
			// Causes two repaints, see zoomTo for more details
			SwingUtilities.invokeLater(new Runnable()
			{
				public void run()
				{
					Dimension pageSize = getPreferredSizeForPage();

					if (getViewport().getWidth() > pageSize.getWidth())
					{
						scrollToCenter(true);
					}
					else
					{
						JScrollBar scrollBar = getHorizontalScrollBar();

						if (scrollBar != null)
						{
							scrollBar.setValue((scrollBar.getMaximum() / 3) - 4);
						}
					}

					if (getViewport().getHeight() > pageSize.getHeight())
					{
						scrollToCenter(false);
					}
					else
					{
						JScrollBar scrollBar = getVerticalScrollBar();

						if (scrollBar != null)
						{
							scrollBar.setValue((scrollBar.getMaximum() / 4) - 4);
						}
					}
				}
			});
		}
	}
/**
	 * Function: zoomActual
	 * 
	 * Resets the zoom and panning in the view.
	 */
zoomActual

Resets the zoom and panning in the view.
zoomActual Resets the zoom and panning in the view .
public void zoomActual()
	{
		mxPoint translate = (pageVisible && centerPage) ? getPageTranslate(1)
				: new mxPoint();
		graph.getView()
				.scaleAndTranslate(1, translate.getX(), translate.getY());
		if (isPageVisible())
		{
			SwingUtilities.invokeLater(new Runnable()
			{
				public void run()
				{
					Dimension pageSize = getPreferredSizeForPage();
					if (getViewport().getWidth() > pageSize.getWidth())
					{
						scrollToCenter(true);
					}
					else
					{
						JScrollBar scrollBar = getHorizontalScrollBar();
						if (scrollBar != null)
						{
							scrollBar.setValue((scrollBar.getMaximum() / 3) - 4);
						}
					}
					if (getViewport().getHeight() > pageSize.getHeight())
					{
						scrollToCenter(false);
					}
					else
					{
						JScrollBar scrollBar = getVerticalScrollBar();
						if (scrollBar != null)
						{
							scrollBar.setValue((scrollBar.getMaximum() / 4) - 4);
						}
					}
				}
			});
		}
	}
public void zoomActual ( ) { mxPoint translate = ( pageVisible && centerPage ) ? getPageTranslate ( 1 ) : new mxPoint ( ) ; graph . getView ( ) . scaleAndTranslate ( 1 , translate . getX ( ) , translate . getY ( ) ) ; if ( isPageVisible ( ) ) { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { Dimension pageSize = getPreferredSizeForPage ( ) ; if ( getViewport ( ) . getWidth ( ) > pageSize . getWidth ( ) ) { scrollToCenter ( true ) ; } else { JScrollBar scrollBar = getHorizontalScrollBar ( ) ; if ( scrollBar != null ) { scrollBar . setValue ( ( scrollBar . getMaximum ( ) / 3 ) - 4 ) ; } } if ( getViewport ( ) . getHeight ( ) > pageSize . getHeight ( ) ) { scrollToCenter ( false ) ; } else { JScrollBar scrollBar = getVerticalScrollBar ( ) ; if ( scrollBar != null ) { scrollBar . setValue ( ( scrollBar . getMaximum ( ) / 4 ) - 4 ) ; } } } } ) ; } }
Function: zoomActual
Function : zoomActual
// Causes two repaints, see zoomTo for more details