Search in sources :

Example 6 with DiagramViewer

use of org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer in project jbosstools-hibernate by jbosstools.

the class DiagramEditPart method refresh.

@Override
public void refresh() {
    IFigure layer = getLayer(LayerConstants.PRIMARY_LAYER);
    getOrmDiagram().updateWidthAndHeight(layer.getBounds().width, layer.getBounds().height);
    double zoom = ((DiagramViewer) ((DefaultEditDomain) getViewer().getEditDomain()).getEditorPart()).getZoom();
    getOrmDiagram().setZoom(zoom);
    super.refresh();
}
Also used : DiagramViewer(org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer) IFigure(org.eclipse.draw2d.IFigure)

Aggregations

DiagramViewer (org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer)6 FileNotFoundException (java.io.FileNotFoundException)2 CoreException (org.eclipse.core.runtime.CoreException)2 IFigure (org.eclipse.draw2d.IFigure)2 GraphicalViewer (org.eclipse.gef.GraphicalViewer)2 IEditorPart (org.eclipse.ui.IEditorPart)2 ConsoleConfiguration (org.hibernate.console.ConsoleConfiguration)2 IColumn (org.jboss.tools.hibernate.runtime.spi.IColumn)2 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)2 IProperty (org.jboss.tools.hibernate.runtime.spi.IProperty)2 Shape (org.jboss.tools.hibernate.ui.diagram.editors.model.Shape)2 DiagramEditorInput (org.jboss.tools.hibernate.ui.view.DiagramEditorInput)2 File (java.io.File)1 IWorkspace (org.eclipse.core.resources.IWorkspace)1 IPath (org.eclipse.core.runtime.IPath)1 Path (org.eclipse.core.runtime.Path)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 ScalableFreeformRootEditPart (org.eclipse.gef.editparts.ScalableFreeformRootEditPart)1 PrintDialog (org.eclipse.swt.printing.PrintDialog)1 Printer (org.eclipse.swt.printing.Printer)1