use of org.eclipse.gef.editparts.ZoomManager in project jbosstools-hibernate by jbosstools.
the class DiagramViewer method getFitWidthZoomValue.
public double getFitWidthZoomValue() {
double res = 1.0;
ZoomManager manager = (ZoomManager) getGraphicalViewer().getProperty(ZoomManager.class.toString());
Method m = null;
try {
// $NON-NLS-1$
m = manager.getClass().getDeclaredMethod("getFitWidthZoomLevel");
m.setAccessible(true);
res = (Double) m.invoke(manager);
} catch (SecurityException e) {
} catch (NoSuchMethodException e) {
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
return res;
}
Aggregations