|
Re: Thumbnail inside eclipse workbench [message #136947 is a reply to message #136910] |
Tue, 08 June 2004 10:34 |
Eclipse User |
|
|
|
Originally posted by: rlemaigr.ulb.ac.be
Hello allen,
So your problem is getting the canvas of your editor from your view when=
=
your editor become active ?
If it is so, the problem seems similar to the one discussed in the topic=
=
"how can a viewer get the model of a GEF editor?" which was posted a few=
=
days ago. Maybe you could take a look there to see if it solve your =
problem too ?
r=E9gis
On Tue, 8 Jun 2004 00:52:06 +0000 (UTC), Allen Wong <ac4wong@uwaterloo.c=
a> =
wrote:
> Hi, I am trying to do something similar to the example in
> org.eclipse.draw2d.examples.thumbnail. In standalone mode, everything
> works fine. Now i want to move it into the eclipse workbench, in which=
I
> will have one view showing the scrollPane, and another view showing th=
e
> scrollableThumbnail.
> However, I have not so sure how to achieve this. The only way I come u=
p
> with is to put a static pointer in ScrollPane view (which point to the=
> Thumbnail canvas), and later in the thumbnail view I will use that sta=
tic
> pointer and put that canvas into the thumbnail view.
> I have a feeling this is not the correct/recommended way to do impleme=
nt,
> any comments would be appreciated.
> In my "scrollPane view":
> public class VEGraphView extends ViewPart {
> private Composite ve;
> private Figure contents;
> public static Canvas overviewStatic; //this point to the thumbnail
> canvas
> .....
>
> In my "thumbnail" view:public class ThumbnailView extends ViewPart {
> =
> private Canvas overview;
>
> public void createPartControl(Composite frame) {
> =
> frame.setLayout(new FillLayout());
> overview=3DVEGraphView.overviewStatic; //here i get the thumbnail c=
anvas
> if (overview!=3Dnull) {
> overview.setParent(frame);
> overview.setBackground(ColorConstants.white);
> overview.setVisible(true);
> }
> else {
> Label label=3Dnew Label(frame,SWT.NULL);
> label.setText("Thumbnail not avaliable.\n Please restart the View."=
);
> }
> =
> =
> }
>
>
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
|
|
Re: Thumbnail inside eclipse workbench [message #137243 is a reply to message #136947] |
Wed, 09 June 2004 02:00 |
Allen C Wong Messages: 9 Registered: July 2009 |
Junior Member |
|
|
I looked at that post you mentioned, although it's not exactly what i am
talking about, it does give me enough hints to figure out the rest.
thx man
rlemaigr@ulb.ac.be wrote:
> Hello allen,
> So your problem is getting the canvas of your editor from your view when
> your editor become active ?
> If it is so, the problem seems similar to the one discussed in the topic
> "how can a viewer get the model of a GEF editor?" which was posted a few
> days ago. Maybe you could take a look there to see if it solve your
> problem too ?
> régis
> On Tue, 8 Jun 2004 00:52:06 +0000 (UTC), Allen Wong <ac4wong@uwaterloo.ca>
> wrote:
> > Hi, I am trying to do something similar to the example in
> > org.eclipse.draw2d.examples.thumbnail. In standalone mode, everything
> > works fine. Now i want to move it into the eclipse workbench, in which I
> > will have one view showing the scrollPane, and another view showing the
> > scrollableThumbnail.
> > However, I have not so sure how to achieve this. The only way I come up
> > with is to put a static pointer in ScrollPane view (which point to the
> > Thumbnail canvas), and later in the thumbnail view I will use that static
> > pointer and put that canvas into the thumbnail view.
> > I have a feeling this is not the correct/recommended way to do implement,
> > any comments would be appreciated.
> > In my "scrollPane view":
> > public class VEGraphView extends ViewPart {
> > private Composite ve;
> > private Figure contents;
> > public static Canvas overviewStatic; //this point to the thumbnail
> > canvas
> > .....
> >
> > In my "thumbnail" view:public class ThumbnailView extends ViewPart {
> >
> > private Canvas overview;
> >
> > public void createPartControl(Composite frame) {
> >
> > frame.setLayout(new FillLayout());
> > overview=VEGraphView.overviewStatic; //here i get the thumbnail canvas
> > if (overview!=null) {
> > overview.setParent(frame);
> > overview.setBackground(ColorConstants.white);
> > overview.setVisible(true);
> > }
> > else {
> > Label label=new Label(frame,SWT.NULL);
> > label.setText("Thumbnail not avaliable.n Please restart the View.");
> > }
> >
> >
> > }
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.02941 seconds