Package org.eclipse.draw2d.parts

Examples of org.eclipse.draw2d.parts.ScrollableThumbnail


            thumbnail = new FigureCanvas(parent, SWT.NONE);
            thumbnail.setBackground(ColorConstants.white);
            thumbnail.setLayoutData(data);

            tb = new ScrollableThumbnail();
            tb.setBorder(new LineBorder(1));
            thumbnail.setContents(tb);
        }
View Full Code Here


    private void createOverview(Composite parent) {
        ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) editor.getGraphicalViewer().getRootEditPart();
        overview = new Canvas(parent, SWT.NONE);
        LightweightSystem lws = new LightweightSystem(overview);
        thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
        thumbnail.setBorder(new MarginBorder(3));
        thumbnail.setSource(rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS));
        lws.setContents(thumbnail);
    }
View Full Code Here

    canvas = new Canvas(parent, SWT.BORDER);
    LightweightSystem lws = new LightweightSystem(canvas);

    RootEditPart root = editor.getGraphicalViewer().getRootEditPart();
    ScalableFreeformRootEditPart scalable = (ScalableFreeformRootEditPart) root;
    thumbnail = new ScrollableThumbnail((Viewport) scalable.getFigure());
    thumbnail.setSource(scalable.getLayer(LayerConstants.PRINTABLE_LAYERS));

    lws.setContents(thumbnail);

    disposeListener = new DisposeListener() {
View Full Code Here

    }

    public void createControl(Composite parent) {
        overview = new Canvas(parent, SWT.NONE);
        LightweightSystem lws = new LightweightSystem(overview);
        thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
        thumbnail.setBorder(new MarginBorder(3));
        thumbnail.setSource(rootEditPart
                .getLayer(LayerConstants.PRINTABLE_LAYERS));
        lws.setContents(thumbnail);
    }
View Full Code Here

      overview = new Canvas(parent, SWT.NONE);
      LightweightSystem lws = new LightweightSystem(overview);
 
      // create thumbnail
      thumbnail =
          new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
      thumbnail.setBorder(new MarginBorder(3));
      thumbnail.setSource(
          rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS));
      lws.setContents(thumbnail);
  }
View Full Code Here

   
    // TODO Graphiti - not a ScalableRootEditPart but some kind of DiagramEditPart
    if (rootEditPart instanceof ScalableRootEditPartAnimated) {
      ScalableRootEditPartAnimated diagramEditPart = (ScalableRootEditPartAnimated) rootEditPart;
      IFigure figure = diagramEditPart.getFigure();
      thumbnail = new ScrollableThumbnail( (Viewport) figure);
      IFigure source = diagramEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS);
      thumbnail.setSource(source);
      lws.setContents(thumbnail);
    } else if (rootEditPart instanceof ScalableRootEditPart) {
      thumbnail = new ScrollableThumbnail( (Viewport) ((ScalableRootEditPart) rootEditPart).getFigure());
      thumbnail.setSource(((ScalableRootEditPart) rootEditPart).getLayer(LayerConstants.PRINTABLE_LAYERS));
      lws.setContents(thumbnail);
    }
    disposeListener = new DisposeListener() {
      /*
 
View Full Code Here

  protected void initializeOverview() {
    LightweightSystem lws = new LightweightSystem(overview);
    RootEditPart rep = getGraphicalViewer().getRootEditPart();
    if (rep instanceof ScalableFreeformRootEditPart) {
      ScalableFreeformRootEditPart root = (ScalableFreeformRootEditPart)rep;
      thumbnail = new ScrollableThumbnail((Viewport)root.getFigure());
      thumbnail.setBorder(new MarginBorder(3));
      thumbnail.setSource(root.getLayer(LayerConstants.PRINTABLE_LAYERS));
      lws.setContents(thumbnail);
      disposeListener = new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
View Full Code Here

  @Override
  public void createControl(Composite parent) {
    overview = new Canvas(parent, SWT.NONE);
    overview.setBackground(ColorConstants.listBackground);
    LightweightSystem lws = new LightweightSystem(overview);
    thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
    thumbnail.setBorder(new MarginBorder(3));
    thumbnail.setSource(rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS));
    lws.setContents(thumbnail);
  }
View Full Code Here

  @Override
  public void createControl(Composite parent) {
    overview = new Canvas(parent, SWT.NONE);
    overview.setBackground(ColorConstants.listBackground);
    LightweightSystem lws = new LightweightSystem(overview);
    thumbnail = new ScrollableThumbnail((Viewport)rootEditPart.getFigure());
    thumbnail.setBorder(new MarginBorder(3));
    thumbnail.setSource(rootEditPart.getLayer(
                        LayerConstants.PRINTABLE_LAYERS));
    lws.setContents(thumbnail);
  }
View Full Code Here

    protected void initializeOverview() {
      LightweightSystem lws = new LightweightSystem(overview);
      RootEditPart rep = getGraphicalViewer().getRootEditPart();
      if (rep instanceof ScalableRootEditPart) {
        ScalableRootEditPart root = (ScalableRootEditPart) rep;
        thumbnail = new ScrollableThumbnail((Viewport) root.getFigure());
        thumbnail.setBorder(new MarginBorder(3));
        thumbnail.setSource(root
            .getLayer(LayerConstants.PRINTABLE_LAYERS));
        lws.setContents(thumbnail);
        disposeListener = new DisposeListener() {
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.parts.ScrollableThumbnail

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.