use of com.archimatetool.editor.diagram.util.ExtendedViewportAutoexposeHelper in project archi by archimatetool.
the class CanvasEditor method createRootEditPart.
@Override
protected void createRootEditPart(GraphicalViewer viewer) {
/*
* We'll have a Zoom Manager using ScalableFreeformRootEditPart
*/
RootEditPart rootPart = new ScalableFreeformRootEditPart() {
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class adapter) {
if (adapter == AutoexposeHelper.class) {
return new ExtendedViewportAutoexposeHelper(this, new Insets(50), false);
}
return super.getAdapter(adapter);
}
};
viewer.setRootEditPart(rootPart);
}
Aggregations