src/main/java/com/mxgraph/swing/mxGraphComponent.java
public void checkTripleBuffer()
	{
		mxRectangle bounds = graph.getGraphBounds();
		int width = (int) Math.ceil(bounds.getX() + bounds.getWidth() + 2);
		int height = (int) Math.ceil(bounds.getY() + bounds.getHeight() + 2);

		if (tripleBuffer != null)
		{
			if (tripleBuffer.getWidth() != width
					|| tripleBuffer.getHeight() != height)
			{
				// Resizes the buffer (destroys existing and creates new)
				destroyTripleBuffer();
			}
		}

		if (tripleBuffer == null)
		{
			createTripleBuffer(width, height);
		}
	}
/**
	 * Checks if the triple buffer exists and creates a new one if it does not.
	 * Also compares the size of the buffer with the size of the graph and drops
	 * the buffer if it has a different size.
	 */
Checks if the triple buffer exists and creates a new one if it does not.
Also compares the size of the buffer with the size of the graph and drops
the buffer if it has a different size.
Checks if the triple buffer exists and creates a new one if it does not . Also compares the size of the buffer with the size of the graph and drops the buffer if it has a different size .
public void checkTripleBuffer()
	{
		mxRectangle bounds = graph.getGraphBounds();
		int width = (int) Math.ceil(bounds.getX() + bounds.getWidth() + 2);
		int height = (int) Math.ceil(bounds.getY() + bounds.getHeight() + 2);
		if (tripleBuffer != null)
		{
			if (tripleBuffer.getWidth() != width
					|| tripleBuffer.getHeight() != height)
			{
				destroyTripleBuffer();
			}
		}
		if (tripleBuffer == null)
		{
			createTripleBuffer(width, height);
		}
	}
public void checkTripleBuffer ( ) { mxRectangle bounds = graph . getGraphBounds ( ) ; int width = ( int ) Math . ceil ( bounds . getX ( ) + bounds . getWidth ( ) + 2 ) ; int height = ( int ) Math . ceil ( bounds . getY ( ) + bounds . getHeight ( ) + 2 ) ; if ( tripleBuffer != null ) { if ( tripleBuffer . getWidth ( ) != width || tripleBuffer . getHeight ( ) != height ) { destroyTripleBuffer ( ) ; } } if ( tripleBuffer == null ) { createTripleBuffer ( width , height ) ; } }
Checks if the triple buffer exists and creates a new one if it does not.
Checks if the triple buffer exists and creates a new one if it does not .
// Resizes the buffer (destroys existing and creates new)