List of usage examples for java.awt.geom NoninvertibleTransformException toString
public String toString()
From source file:org.kepler.gui.KeplerGraphFrame.java
/** * Return the size of the visible part of the canvas, in canvas coordinates. * // ww w . j av a 2 s .co m * @return Rectangle2D */ public Rectangle2D getVisibleSize() { AffineTransform current = _jgraph.getGraphPane().getCanvas().getCanvasPane().getTransformContext() .getTransform(); AffineTransform inverse; try { inverse = current.createInverse(); } catch (NoninvertibleTransformException e) { throw new RuntimeException(e.toString()); } Dimension size = _jgraph.getGraphPane().getCanvas().getSize(); Rectangle2D visibleRect = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight()); return ShapeUtilities.transformBounds(visibleRect, inverse); }