Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » scrollablethumbnail with zoom
scrollablethumbnail with zoom [message #137715] Fri, 11 June 2004 03:55 Go to next message
Allen C Wong is currently offline Allen C WongFriend
Messages: 9
Registered: July 2009
Junior Member
Hi, I am using the scrollablethumbnail and scrollPane with zoom support.
I notice when i zoom out the scrollPane, the thumbnail will follow the
scale and scale itself down as well.

Is there a way to set the figure inside the scrollablethumbnail to a fixed
size, not matter what's the scollPane's zoom rate is?
Re: scrollablethumbnail with zoom [message #137851 is a reply to message #137715] Fri, 11 June 2004 18:48 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You are probably asking the ScalableFreeformLayeredPane from your graphical
viewer to paint on the thumbnail as well. Paint just the printable layers
(or go far enough down the figure hierarchy that you omit the
ScalableFreeformLayeredPane) and you should be good.

"Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
news:cabafj$v3f$1@eclipse.org...
> Hi, I am using the scrollablethumbnail and scrollPane with zoom support.
> I notice when i zoom out the scrollPane, the thumbnail will follow the
> scale and scale itself down as well.
>
> Is there a way to set the figure inside the scrollablethumbnail to a fixed
> size, not matter what's the scollPane's zoom rate is?
>
Re: scrollablethumbnail with zoom [message #137894 is a reply to message #137851] Sat, 12 June 2004 04:06 Go to previous messageGo to next message
Allen C Wong is currently offline Allen C WongFriend
Messages: 9
Registered: July 2009
Junior Member
I think I did just that. Here is my setup:
In my main view:
Eclipse View (ve.accessPlan)->canvas->lws->scrollPane
(scroll)->scalablePane->Figure (container)->a bunch of figures

protected Figure createThumbnail() { ScrollableThumbnail thumbnail =
new ScrollableThumbnail(scroll
.getViewport());
thumbnail.setSource(container);
return thumbnail;
}

then i create my scrollableThumbnailView by:
another eclipse view -> canvas->LWS->scrollableThumbnail->Figure(container)


public void createPartControl(Composite parent) {

VEGraphView vp = (VEGraphView) this.getSite().getWorkbenchWindow()
.getActivePage().findView("ve.accessPlan");
overview = new Canvas(parent, SWT.NULL);
LightweightSystem overviewLWS = new LightweightSystem(overview);

overviewLWS.setContents(vp.createThumbnail());
}


I thought the source of my scrollableThumbnail (container) is not scalable,
but apparently it is.
I have taken two screenshots. Ideally I would like to have the size of my
figures inside the thumbnail view always fixed as the one in
largeOverview.jpg.


http://www.home.mycybernet.net/~acwong/smallOverview.JPG
http://www.home.mycybernet.net/~acwong/largeOverview.JPG

Pratik Shah wrote:

> You are probably asking the ScalableFreeformLayeredPane from your graphical
> viewer to paint on the thumbnail as well. Paint just the printable layers
> (or go far enough down the figure hierarchy that you omit the
> ScalableFreeformLayeredPane) and you should be good.

> "Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
> news:cabafj$v3f$1@eclipse.org...
> > Hi, I am using the scrollablethumbnail and scrollPane with zoom support.
> > I notice when i zoom out the scrollPane, the thumbnail will follow the
> > scale and scale itself down as well.
> >
> > Is there a way to set the figure inside the scrollablethumbnail to a fixed
> > size, not matter what's the scollPane's zoom rate is?
> >
Re: scrollablethumbnail with zoom [message #138013 is a reply to message #137894] Mon, 14 June 2004 17:34 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is because when you zoom out such that the primary layer is smaller
than the viewable area, it gets
stretched to take up all available space.

"Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
news:cadvg0$mf6$1@eclipse.org...
> I think I did just that. Here is my setup:
> In my main view:
> Eclipse View (ve.accessPlan)->canvas->lws->scrollPane
> (scroll)->scalablePane->Figure (container)->a bunch of figures
>
> protected Figure createThumbnail() { ScrollableThumbnail thumbnail =
> new ScrollableThumbnail(scroll
> .getViewport());
> thumbnail.setSource(container);
> return thumbnail;
> }
>
> then i create my scrollableThumbnailView by:
> another eclipse view ->
canvas->LWS->scrollableThumbnail->Figure(container)
>
>
> public void createPartControl(Composite parent) {
>
> VEGraphView vp = (VEGraphView) this.getSite().getWorkbenchWindow()
> .getActivePage().findView("ve.accessPlan");
> overview = new Canvas(parent, SWT.NULL);
> LightweightSystem overviewLWS = new LightweightSystem(overview);
>
> overviewLWS.setContents(vp.createThumbnail());
> }
>
>
> I thought the source of my scrollableThumbnail (container) is not
scalable,
> but apparently it is.
> I have taken two screenshots. Ideally I would like to have the size of my
> figures inside the thumbnail view always fixed as the one in
> largeOverview.jpg.
>
>
> http://www.home.mycybernet.net/~acwong/smallOverview.JPG
> http://www.home.mycybernet.net/~acwong/largeOverview.JPG
>
> Pratik Shah wrote:
>
> > You are probably asking the ScalableFreeformLayeredPane from your
graphical
> > viewer to paint on the thumbnail as well. Paint just the printable
layers
> > (or go far enough down the figure hierarchy that you omit the
> > ScalableFreeformLayeredPane) and you should be good.
>
> > "Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
> > news:cabafj$v3f$1@eclipse.org...
> > > Hi, I am using the scrollablethumbnail and scrollPane with zoom
support.
> > > I notice when i zoom out the scrollPane, the thumbnail will follow the
> > > scale and scale itself down as well.
> > >
> > > Is there a way to set the figure inside the scrollablethumbnail to a
fixed
> > > size, not matter what's the scollPane's zoom rate is?
> > >
>
>
Re: scrollablethumbnail with zoom [message #138160 is a reply to message #138013] Tue, 15 June 2004 14:51 Go to previous messageGo to next message
Allen C Wong is currently offline Allen C WongFriend
Messages: 9
Registered: July 2009
Junior Member
Thanks for your reply. So I think this is a intended behaviour. Now my
question is why do you guys make the ScrollableThumbnail a final class?
The reason I say that is because I have come up with a hack to the
thumbnail class to do what I want (the size of the thumbnail figure is
fixed). Ideally I would extends ScrollableThumbnail and override that
method with my hack, however since the class is final, I would have to
extend Thumbnail and write my own code for the scrollable part. That sucks
because the ScrollableThumnail is doing exactly what i want, and if not
for the licensing issue, i would just do a copy and paste and force it to
extend my "hacked" thumbnail class.

You guys probably have a valid reason for making the class final, I am
just curious to know why. :)

cheers



Pratik Shah wrote:

> This is because when you zoom out such that the primary layer is smaller
> than the viewable area, it gets
> stretched to take up all available space.

> "Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
> news:cadvg0$mf6$1@eclipse.org...
> > I think I did just that. Here is my setup:
> > In my main view:
> > Eclipse View (ve.accessPlan)->canvas->lws->scrollPane
> > (scroll)->scalablePane->Figure (container)->a bunch of figures
> >
> > protected Figure createThumbnail() { ScrollableThumbnail thumbnail =
> > new ScrollableThumbnail(scroll
> > .getViewport());
> > thumbnail.setSource(container);
> > return thumbnail;
> > }
> >
> > then i create my scrollableThumbnailView by:
> > another eclipse view ->
> canvas->LWS->scrollableThumbnail->Figure(container)
> >
> >
> > public void createPartControl(Composite parent) {
> >
> > VEGraphView vp = (VEGraphView) this.getSite().getWorkbenchWindow()
> > .getActivePage().findView("ve.accessPlan");
> > overview = new Canvas(parent, SWT.NULL);
> > LightweightSystem overviewLWS = new LightweightSystem(overview);
> >
> > overviewLWS.setContents(vp.createThumbnail());
> > }
> >
> >
> > I thought the source of my scrollableThumbnail (container) is not
> scalable,
> > but apparently it is.
> > I have taken two screenshots. Ideally I would like to have the size of my
> > figures inside the thumbnail view always fixed as the one in
> > largeOverview.jpg.
> >
> >
> > http://www.home.mycybernet.net/~acwong/smallOverview.JPG
> > http://www.home.mycybernet.net/~acwong/largeOverview.JPG
> >
> > Pratik Shah wrote:
> >
> > > You are probably asking the ScalableFreeformLayeredPane from your
> graphical
> > > viewer to paint on the thumbnail as well. Paint just the printable
> layers
> > > (or go far enough down the figure hierarchy that you omit the
> > > ScalableFreeformLayeredPane) and you should be good.
> >
> > > "Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
> > > news:cabafj$v3f$1@eclipse.org...
> > > > Hi, I am using the scrollablethumbnail and scrollPane with zoom
> support.
> > > > I notice when i zoom out the scrollPane, the thumbnail will follow the
> > > > scale and scale itself down as well.
> > > >
> > > > Is there a way to set the figure inside the scrollablethumbnail to a
> fixed
> > > > size, not matter what's the scollPane's zoom rate is?
> > > >
> >
> >
Re: scrollablethumbnail with zoom [message #138306 is a reply to message #138160] Tue, 15 June 2004 19:42 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> Thanks for your reply. So I think this is a intended behaviour. Now my
> question is why do you guys make the ScrollableThumbnail a final class?
> The reason I say that is because I have come up with a hack to the
> thumbnail class to do what I want (the size of the thumbnail figure is
> fixed). Ideally I would extends ScrollableThumbnail and override that
> method with my hack, however since the class is final, I would have to
> extend Thumbnail and write my own code for the scrollable part. That sucks
> because the ScrollableThumnail is doing exactly what i want, and if not
> for the licensing issue, i would just do a copy and paste and force it to
> extend my "hacked" thumbnail class.
>
> You guys probably have a valid reason for making the class final, I am
> just curious to know why. :)

We did this so we could change the class however we see fit. I suppose the
other way to do this is to just put a warning in the javadoc stating that
the class should not be subclassed.

Open a bugzilla.

> cheers
>
>
>
> Pratik Shah wrote:
>
> > This is because when you zoom out such that the primary layer is smaller
> > than the viewable area, it gets
> > stretched to take up all available space.
>
> > "Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
> > news:cadvg0$mf6$1@eclipse.org...
> > > I think I did just that. Here is my setup:
> > > In my main view:
> > > Eclipse View (ve.accessPlan)->canvas->lws->scrollPane
> > > (scroll)->scalablePane->Figure (container)->a bunch of figures
> > >
> > > protected Figure createThumbnail() { ScrollableThumbnail
thumbnail =
> > > new ScrollableThumbnail(scroll
> > > .getViewport());
> > > thumbnail.setSource(container);
> > > return thumbnail;
> > > }
> > >
> > > then i create my scrollableThumbnailView by:
> > > another eclipse view ->
> > canvas->LWS->scrollableThumbnail->Figure(container)
> > >
> > >
> > > public void createPartControl(Composite parent) {
> > >
> > > VEGraphView vp = (VEGraphView) this.getSite().getWorkbenchWindow()
> > > .getActivePage().findView("ve.accessPlan");
> > > overview = new Canvas(parent, SWT.NULL);
> > > LightweightSystem overviewLWS = new LightweightSystem(overview);
> > >
> > > overviewLWS.setContents(vp.createThumbnail());
> > > }
> > >
> > >
> > > I thought the source of my scrollableThumbnail (container) is not
> > scalable,
> > > but apparently it is.
> > > I have taken two screenshots. Ideally I would like to have the size of
my
> > > figures inside the thumbnail view always fixed as the one in
> > > largeOverview.jpg.
> > >
> > >
> > > http://www.home.mycybernet.net/~acwong/smallOverview.JPG
> > > http://www.home.mycybernet.net/~acwong/largeOverview.JPG
> > >
> > > Pratik Shah wrote:
> > >
> > > > You are probably asking the ScalableFreeformLayeredPane from your
> > graphical
> > > > viewer to paint on the thumbnail as well. Paint just the printable
> > layers
> > > > (or go far enough down the figure hierarchy that you omit the
> > > > ScalableFreeformLayeredPane) and you should be good.
> > >
> > > > "Allen Wong" <ac4wong@uwaterloo.ca> wrote in message
> > > > news:cabafj$v3f$1@eclipse.org...
> > > > > Hi, I am using the scrollablethumbnail and scrollPane with zoom
> > support.
> > > > > I notice when i zoom out the scrollPane, the thumbnail will follow
the
> > > > > scale and scale itself down as well.
> > > > >
> > > > > Is there a way to set the figure inside the scrollablethumbnail to
a
> > fixed
> > > > > size, not matter what's the scollPane's zoom rate is?
> > > > >
> > >
> > >
>
>
Previous Topic:toolBar
Next Topic:Dificulty with using ButtonBorder
Goto Forum:
  


Current Time: Wed Apr 24 18:50:43 GMT 2024

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

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

Back to the top