Package org.eclipse.gef.editparts

Examples of org.eclipse.gef.editparts.ScalableRootEditPart


            tabItem.setControl(composite);
           
            graphicalViewer = new ScrollingGraphicalViewer();
            graphicalViewer.createControl(composite);
            graphicalViewer.getControl().setBackground(ColorConstants.listBackground);
            graphicalViewer.setRootEditPart(new ScalableRootEditPart());
            IJavaProject javaProject = getJavaProject(projectName);
           
            IExtensionRegistry reg = Platform.getExtensionRegistry();
            IConfigurationElement[] extensions =
                reg.getConfigurationElementsFor(
View Full Code Here


    protected abstract void writeModel(OutputStream os) throws IOException;

    protected void configureGraphicalViewer() {
        super.configureGraphicalViewer();
        getGraphicalViewer().setRootEditPart(new ScalableRootEditPart());
        getGraphicalViewer().setEditPartFactory(createEditPartFactory());
        getGraphicalViewer().setKeyHandler(
                new GraphicalViewerKeyHandler(getGraphicalViewer())
                        .setParent(getCommonKeyHandler()));
View Full Code Here

        return super.getAdapter(type);
    }

    protected OverviewOutlinePage getOverviewOutlinePage() {
        if (null == overviewOutlinePage && null != getGraphicalViewer()) {
            ScalableRootEditPart rootEditPart = (ScalableRootEditPart) getGraphicalViewer()
                    .getRootEditPart();
            overviewOutlinePage = new OverviewOutlinePage(rootEditPart);
        }
        return overviewOutlinePage;
    }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.gef.ui.parts.GraphicalEditor#initializeGraphicalViewer()
   */
  protected void initializeGraphicalViewer() {
    ScalableRootEditPart rootEditPart = new ScalableRootEditPart();
    _viewer.setRootEditPart(rootEditPart);

    _viewer.getViewport().setContentsTracksWidth(true);

    _viewer.setKeyHandler(new GraphicalViewerKeyHandler(_viewer));
View Full Code Here

   * @param parent
   */
  private ScrollingGraphicalViewer createGraphicalViewer(final Composite parent) {
    final ScrollingGraphicalViewer viewer = new ScrollingGraphicalViewer();
    viewer.createControl(parent);
    _root = new ScalableRootEditPart();
    viewer.setRootEditPart(_root);
    getEditDomain().addViewer(viewer);
    getSite().setSelectionProvider(viewer);
    viewer.setEditPartFactory(getEditPartFactory());
    viewer.setContents(getEditorInput().getAdapter(ScannedMap.class));
View Full Code Here

    protected abstract void writeModel(OutputStream os) throws IOException;

    protected void configureGraphicalViewer() {
        super.configureGraphicalViewer();
        getGraphicalViewer().setRootEditPart(new ScalableRootEditPart());
        getGraphicalViewer().setEditPartFactory(createEditPartFactory());
        getGraphicalViewer().setKeyHandler(
                new GraphicalViewerKeyHandler(getGraphicalViewer())
                        .setParent(getCommonKeyHandler()));
View Full Code Here

        return super.getAdapter(type);
    }

    protected OverviewOutlinePage getOverviewOutlinePage() {
        if (null == overviewOutlinePage && null != getGraphicalViewer()) {
            ScalableRootEditPart rootEditPart = (ScalableRootEditPart) getGraphicalViewer()
                    .getRootEditPart();
            overviewOutlinePage = new OverviewOutlinePage(rootEditPart);
        }
        return overviewOutlinePage;
    }
View Full Code Here

            tabItem.setControl(composite);
           
            graphicalViewer = new ScrollingGraphicalViewer();
            graphicalViewer.createControl(composite);
            graphicalViewer.getControl().setBackground(ColorConstants.listBackground);
            graphicalViewer.setRootEditPart(new ScalableRootEditPart());
            IJavaProject javaProject = getJavaProject(projectName);
           
            IExtensionRegistry reg = Platform.getExtensionRegistry();
            IConfigurationElement[] extensions =
                reg.getConfigurationElementsFor(
View Full Code Here

   * Called to configure the graphical viewer before it receives its contents. This is where the root editpart should
   * be configured.
   */
  @SuppressWarnings({ "unchecked" })
  protected void configureGraphicalViewer() {
    ScalableRootEditPart root = new ScalableRootEditPart();

    List zoomLevels = new ArrayList(3);
    zoomLevels.add(ZoomManager.FIT_ALL);
    zoomLevels.add(ZoomManager.FIT_WIDTH);
    zoomLevels.add(ZoomManager.FIT_HEIGHT);
    root.getZoomManager().setZoomLevelContributions(zoomLevels);

    IAction zoomIn = new ZoomInAction(root.getZoomManager());
    IAction zoomOut = new ZoomOutAction(root.getZoomManager());
    getActionRegistry().registerAction(zoomIn);
    getActionRegistry().registerAction(zoomOut);
    getActionRegistry().registerAction(new ExportAction(this));
    getSite().getKeyBindingService().registerAction(zoomIn);
    getSite().getKeyBindingService().registerAction(zoomOut);
View Full Code Here

    super.commandStackChanged(event);
  }

  protected void configureGraphicalViewer() {
    super.configureGraphicalViewer();
    ScalableRootEditPart root = new ScalableRootEditPart();

    List<String> zoomLevels = new ArrayList<String>();
    zoomLevels.add(ZoomManager.FIT_ALL);
    zoomLevels.add(ZoomManager.FIT_WIDTH);
    zoomLevels.add(ZoomManager.FIT_HEIGHT);
    root.getZoomManager().setZoomLevelContributions(zoomLevels);
    root.getZoomManager().setZoomLevels(
        new double[] { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1,
            1.5, 2, 2.5, 3 });
    IAction zoomIn = new ZoomInAction(root.getZoomManager());
    IAction zoomOut = new ZoomOutAction(root.getZoomManager());
    getActionRegistry().registerAction(zoomIn);
    getActionRegistry().registerAction(zoomOut);

    getActionRegistry().registerAction(new ExportAction(this));
    getSite().getKeyBindingService().registerAction(zoomIn);
View Full Code Here

TOP

Related Classes of org.eclipse.gef.editparts.ScalableRootEditPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.