[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] menubuilder
|
Hi Andrea,
Have a look at the UDIGMenuBuilder:
http://svn.geotools.org/udig/trunk/plugins/net.refractions.udig.ui/src/net/refractions/udig/ui/UDIGMenuBuilder.java
I don't have a usable uDig development environment at the moment, so I can't assist more than that. In a couple weeks I will be fixing a couple bugs, and I could definitely hack on the API then. Jesse might also have some suggetions.
Richard
On Thu, 03 May 2007 12:02:26 +0200
Andrea Antonello <andrea.antonello@xxxxxxxxx> wrote:
> Hi Richard, I know you are the only one that can answer this, so I
> repost the question, that was lost in the list :)
>
> Any hint to give me? I think this should work like that.
>
> Andrea
>
> > I'm trying the menubuilder.
> > If I got it right, I should be able to create my SomeAction extending
> > Action and implementing IAction with its text, icon and whatever.
> > Then I use the extention point and create a class that wants me to
> > implement the fill menu and toolbar methods. Kinda like:
> > ____________________________________________________________________
> > public class JGrassMenusAndToolbars implements MenuBuilder {
> >
> > private SomeAction someAction = null;
> >
> > public JGrassMenusAndToolbars() {
> > someAction = new SomeAction();
> > }
> >
> > public void fillCoolBar( ICoolBarManager coolBar, IWorkbenchWindow
> > window ) {
> >
> > IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle());
> > coolBar.add(toolBar);
> >
> > toolBar.add(someAction);
> > }
> >
> > public void fillMenuBar( IMenuManager menuBar, IWorkbenchWindow
> > window ) {
> > MenuManager newMenu = new MenuManager("jgrass", "&JGrass");
> > fileMenu.add(someAction);
> >
> > menuBar.add(newMenu);
> > }
> > }
> >
> > ____________________________________________________________________
> >
> >
> > However nothing appears on the bar or menu and I also do not get any error.
> > Any idea?
> > Am I going the proper way?
> >
> >
> > Andrea
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> >
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel