Skip to main content



      Home
Home » Eclipse Projects » GEF » Problems with PaletteDrawer
Problems with PaletteDrawer [message #150338] Thu, 09 September 2004 12:24 Go to next message
Eclipse UserFriend
Originally posted by: jdelgad.fedro.ugr.es

Hello, I am developing a Graphical Application using swing and I have to
create a tool Palette.

Now I have read about GEF and I can notice that exists a class named
PaletteDrawer. I have just read the API but I don`t know how to use it
into my program.
If someone knows how to do it, please, tell me.

Thanks a lot.


P.D.: Excuse my level of English
Re: Problems with PaletteDrawer [message #150363 is a reply to message #150338] Thu, 09 September 2004 18:26 Go to previous messageGo to next message
Eclipse UserFriend
Look at LogicPlugin#createPalette().

You create a PaletteRoot and in it put the items you want to place on the
palette. This palette root (model) is then passed on to the PaletteViewer,
which creates EditParts (controller) and figures (view) for it.

This is an extensive framework and not something that you can copy and put
into your code (at least not easily and not without quite a bit of re-work).

Is your application an Eclipse plug-in? If so, you should consider
switching to GEF; if not, you should consider using RCP. :-)

"Jose" <jdelgad@fedro.ugr.es> wrote in message
news:chq033$3v6$1@eclipse.org...
> Hello, I am developing a Graphical Application using swing and I have to
> create a tool Palette.
>
> Now I have read about GEF and I can notice that exists a class named
> PaletteDrawer. I have just read the API but I don`t know how to use it
> into my program.
> If someone knows how to do it, please, tell me.
>
> Thanks a lot.
>
>
> P.D.: Excuse my level of English
>
Re: Problems with PaletteDrawer [message #150441 is a reply to message #150363] Fri, 10 September 2004 04:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jdelgad.fedro.ugr.es

Well, I have done that, but now, I do not know where to place the
PaletteViewer. How can I place it into a JPanel?

Thanks a lot
Re: Problems with PaletteDrawer [message #150465 is a reply to message #150441] Fri, 10 September 2004 11:14 Go to previous message
Eclipse UserFriend
You can't. That is what I was trying to tell you. GEF is based on
Draw2d/SWT, not Swing/AWT.

"Jose" <jdelgad@fedro.ugr.es> wrote in message
news:chrnkh$iuh$1@eclipse.org...
>
>
> Well, I have done that, but now, I do not know where to place the
> PaletteViewer. How can I place it into a JPanel?
>
> Thanks a lot
>
Previous Topic:Attaching labels to figures
Next Topic:Model-View-Controller Question
Goto Forum:
  


Current Time: Mon Jul 21 21:00:19 EDT 2025

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

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

Back to the top