org.eclipse.gef.RootEditPart Java Examples
The following examples show how to use
org.eclipse.gef.RootEditPart.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProcessDiagramEditor.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
/** * initialize the overview */ protected void initializeOverview() { LightweightSystem lws = new LightweightSystem(overview); RootEditPart rep = getGraphicalViewer().getRootEditPart(); DiagramRootEditPart root = (DiagramRootEditPart) rep; thumbnail = new ScrollableThumbnailEx((Viewport) root.getFigure()); // thumbnail.setSource(root.getLayer(org.eclipse.gef.LayerConstants.PRINTABLE_LAYERS)); thumbnail.setSource(root.getLayer(LayerConstants.SCALABLE_LAYERS)); lws.setContents(thumbnail); disposeListener = new DisposeListener() { public void widgetDisposed(DisposeEvent e) { if (thumbnail != null) { thumbnail.deactivate(); thumbnail = null; } } }; getEditor().addDisposeListener(disposeListener); this.overviewInitialized = true; }
Example #2
Source File: FeedbackGraphicalNodeEditPolicy.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected IMapMode getMapMode() { RootEditPart root = getHost().getRoot(); if (root instanceof DiagramRootEditPart) { DiagramRootEditPart dgrmRoot = (DiagramRootEditPart) root; return dgrmRoot.getMapMode(); } return MapModeUtil.getMapMode(); }
Example #3
Source File: EditorRulerComposite.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * @see org.eclipse.gef.EditPartViewer#appendSelection(org.eclipse.gef.EditPart) */ public void appendSelection( EditPart editpart ) { if ( editpart instanceof RootEditPart ) editpart = ( (RootEditPart) editpart ).getContents( ); setFocus( editpart ); super.appendSelection( editpart ); }
Example #4
Source File: CustomLaneEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void refreshOverlapping() { final RootEditPart root = getRoot(); for (final Object child : root.getChildren()) { if (child instanceof MainProcessEditPart) { for (final Object child1 : ((MainProcessEditPart) child).getChildren()) { if (child1 instanceof CustomPoolEditPart && !child1.equals(getParent())) { ((CustomPoolEditPart) child1).refreshBounds(); } } } } }
Example #5
Source File: StatechartDiagramEditPartProvider.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public RootEditPart createRootEditPart(Diagram diagram) { return new SCTRenderedDiagramRootEditPart(diagram.getMeasurementUnit()); }
Example #6
Source File: EditorRulerRootEditPart.java From birt with Eclipse Public License 1.0 | 4 votes |
/** * @see org.eclipse.gef.EditPart#getRoot() */ public RootEditPart getRoot( ) { return this; }
Example #7
Source File: BonitaTreeViewer.java From bonita-studio with GNU General Public License v2.0 | 2 votes |
@Override public void setRootEditPart(final RootEditPart editpart) { }