Skip to main content



      Home
Home » Eclipse Projects » GEF » Is there a preferred way to add zoom to a FigureCanvas?
Is there a preferred way to add zoom to a FigureCanvas? [message #203571] Tue, 22 November 2005 16:03 Go to next message
Eclipse UserFriend
if not is there a recommended way?
Re: Is there a preferred way to add zoom to a FigureCanvas? [message #203587 is a reply to message #203571] Tue, 22 November 2005 16:40 Go to previous messageGo to next message
Eclipse UserFriend
The logic example does zoom in and zoom out for diagrams, using the GEF
actions from org.eclipse.gef.ui.actions. Is that what you mean?

"Drew" <drew@acm.org> wrote in message news:dm0133$2uu$1@news.eclipse.org...
> if not is there a recommended way?
>
>
>
Re: Is there a preferred way to add zoom to a FigureCanvas? [message #203601 is a reply to message #203587] Tue, 22 November 2005 17:57 Go to previous messageGo to next message
Eclipse UserFriend
no. I am usiung draw2d only, no editparts.
I am currently using something similar to org.eclipse.draw2d.examples.zoom.
But wanted to see if there was a preferred way.


"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dm0380$5t5$1@news.eclipse.org...
> The logic example does zoom in and zoom out for diagrams, using the GEF
> actions from org.eclipse.gef.ui.actions. Is that what you mean?
>
> "Drew" <drew@acm.org> wrote in message
news:dm0133$2uu$1@news.eclipse.org...
> > if not is there a recommended way?
> >
> >
> >
>
>
Re: Is there a preferred way to add zoom to a FigureCanvas? [message #203678 is a reply to message #203601] Wed, 23 November 2005 14:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cleversons.gmail.com

Hi,

I've recently implemented zoom on my Dra2D based application. I did it by
using a ScalableLayeredPane. This class has a method called
setScale(double newZoom) which fitted my needs. Try it and if you have any
trouble using this class, feel free to back here and ask more questions.

Regards
Cleverson
Re: Is there a preferred way to add zoom to a FigureCanvas? [message #204119 is a reply to message #203678] Wed, 30 November 2005 08:03 Go to previous messageGo to next message
Eclipse UserFriend
What is the initialization sequence to get a ScalableLayeredPane to work in
your scenario. When i flip and SLP in for my current Pane nothing displays.
I am using a FigureCanvas as the parent.

"Cleverson Schmidt" <cleversons@gmail.com> wrote in message
news:c6344104ac90f714c37d20a8ac1f8c91$1@www.eclipse.org...
> Hi,
>
> I've recently implemented zoom on my Dra2D based application. I did it by
> using a ScalableLayeredPane. This class has a method called
> setScale(double newZoom) which fitted my needs. Try it and if you have any
> trouble using this class, feel free to back here and ask more questions.
>
> Regards
> Cleverson
>
Re: Is there a preferred way to add zoom to a FigureCanvas? [message #204163 is a reply to message #204119] Wed, 30 November 2005 15:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cleversons.gmail.com

This is what I'm doing:

protected void createView(Composite parent) {
Canvas canvas = new Canvas(parent, SWT.CENTER);
LightweightSystem lws = new LightweightSystem(canvas);
this.scrollpane = new ScrollPane();
this.scrollpane.setVerticalScrollBarVisibility(ScrollPane.AU TOMATIC);
this.scrollpane.setHorizontalScrollBarVisibility(ScrollPane. AUTOMATIC);
this.slp = new ScalableLayeredPane();
this.scrollpane.setContents(this.slp);
lws.setContents(this.graphScrollpane);
}
Re: Is there a preferred way to add zoom to a FigureCanvas? [message #204170 is a reply to message #204163] Wed, 30 November 2005 15:51 Go to previous message
Eclipse UserFriend
Originally posted by: cleversons.gmail.com

ops
Replace the last line by:

lws.setContents(this.scrollpane);
Previous Topic:MultiPageEditor with Palette
Next Topic:EMF using GEF: link EObjects to editParts
Goto Forum:
  


Current Time: Fri Sep 19 08:16:34 EDT 2025

Powered by FUDForum. Page generated in 0.04219 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top