Search in sources :

Example 1 with RootEditPart

use of org.whole.lang.e4.ui.editparts.RootEditPart in project whole by wholeplatform.

the class E4GraphicalViewer method invalidateTree.

protected void invalidateTree() {
    RootEditPart rootPart = (RootEditPart) super.getRootEditPart();
    rootPart.getFigure().invalidateTree();
    rootPart.getFigure().validate();
    getFigureCanvas().getViewport().invalidateTree();
    getFigureCanvas().getViewport().validate();
}
Also used : RootEditPart(org.whole.lang.e4.ui.editparts.RootEditPart) IScalableRootEditPart(org.whole.lang.e4.ui.editparts.IScalableRootEditPart)

Example 2 with RootEditPart

use of org.whole.lang.e4.ui.editparts.RootEditPart in project whole by wholeplatform.

the class E4GraphicalViewer method createRootEditPart.

protected RootEditPart createRootEditPart() {
    RootEditPart rootEditPart = new RootEditPart();
    List<String> levels = new ArrayList<String>(3);
    levels.add(ZoomManager.FIT_ALL);
    levels.add(ZoomManager.FIT_WIDTH);
    levels.add(ZoomManager.FIT_HEIGHT);
    ZoomManager zoomManager = rootEditPart.getZoomManager();
    zoomManager.setZoomLevelContributions(levels);
    zoomManager.setZoomAnimationStyle(ZoomManager.ANIMATE_ZOOM_IN_OUT);
    return rootEditPart;
}
Also used : ZoomManager(org.eclipse.gef.editparts.ZoomManager) ArrayList(java.util.ArrayList) RootEditPart(org.whole.lang.e4.ui.editparts.RootEditPart) IScalableRootEditPart(org.whole.lang.e4.ui.editparts.IScalableRootEditPart)

Aggregations

IScalableRootEditPart (org.whole.lang.e4.ui.editparts.IScalableRootEditPart)2 RootEditPart (org.whole.lang.e4.ui.editparts.RootEditPart)2 ArrayList (java.util.ArrayList)1 ZoomManager (org.eclipse.gef.editparts.ZoomManager)1