ToolBarManager in stand-alone JFace [message #259363] |
Wed, 07 July 2004 15:11 |
Eclipse User |
|
|
|
Please forgive the newbie question...
I do not really understand where it is appropriate to use the XXXManager
classes under the ApplicationWindow. I was able to create a MenuManager
pretty easily, and I like the ActionContributionItem hooks, so I was
hoping to extend it to a ToolBarManager.
However, the ToolBar needs to be placed as a child to some Composite deep
down in my application... not directly under the ApplicationWindow. The
obvious thought is code like the following...
ToolBarManager myTBManager = new ToolBarManager();
ToolBar tb = myTBManager.createControl(parentComposite);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
tb.setLayoutData(gd);
myTBManager.add(...a bunch of Actions to make my toolbar work);
but it does not work.
Do the XXXManager classes have to be managed through the
ApplicationWindow? Is there no such thing as a "stand-alone"
ToolBarManager (that is, a ToolBarManager that manages a ToolBar which is
a child of a composite)?
|
|
|
Powered by
FUDForum. Page generated in 0.02896 seconds