Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CoolBars
CoolBars [message #446743] Thu, 02 December 2004 09:09 Go to next message
Eclipse UserFriend
Originally posted by: huntdo.bc.edu

I've been working with this problem for a bit, and haven't found any
solutions in any of the newsgroups or on the web. I need a text field inside
a toolbar, so I realized that I need to use a CoolBar (right?) So I'm using
an ApplicationWindow from JFACE, and decided to just use the CoolBarManager.
When I call:
addCoolBar(SWT.NONE); It should go an call the createCoolBarManager().
However, nothing is appearing in my GUI. Using the same code but with
ToolBarManager, and addToolBar, everything works fine. Any ideas?
Also, for a note, if I call:
this.getCoolBarManager().getControl().setSize(100,10); from within the
ApplicationWindow, I get a NullPointerException, so is the CoolBar not being
created?

Here's the overridden createCoolBarManager(int style) code:

protected CoolBarManager createCoolBarManager(int style){

CoolBarManager cool_bar_manager = new CoolBarManager();

cool_bar_manager.add(exit_action);
cool_bar_manager.add(copy_action);
cool_bar_manager.add(open_action);
cool_bar_manager.add(findpeers_action);

return cool_bar_manager;
}

If I have failed to be clear, please let me know.
Thanks very much,
Doyle
Re: CoolBars [message #446754 is a reply to message #446743] Thu, 02 December 2004 13:47 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
No Coolbar is required.

See:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet58.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup

For questions about JFace components such as ToolBarManager and
CoolBarManager, please ask in the eclipse.platform newsgroup:

news://news.eclipse.org/eclipse.platform


"Doyle Hunt" <huntdo@bc.edu> wrote in message
news:comm54$uac$1@www.eclipse.org...
> I've been working with this problem for a bit, and haven't found any
> solutions in any of the newsgroups or on the web. I need a text field
> inside a toolbar, so I realized that I need to use a CoolBar (right?) So
> I'm using an ApplicationWindow from JFACE, and decided to just use the
> CoolBarManager. When I call:
> addCoolBar(SWT.NONE); It should go an call the createCoolBarManager().
> However, nothing is appearing in my GUI. Using the same code but with
> ToolBarManager, and addToolBar, everything works fine. Any ideas?
> Also, for a note, if I call:
> this.getCoolBarManager().getControl().setSize(100,10); from within the
> ApplicationWindow, I get a NullPointerException, so is the CoolBar not
> being created?
>
> Here's the overridden createCoolBarManager(int style) code:
>
> protected CoolBarManager createCoolBarManager(int style){
>
> CoolBarManager cool_bar_manager = new CoolBarManager();
>
> cool_bar_manager.add(exit_action);
> cool_bar_manager.add(copy_action);
> cool_bar_manager.add(open_action);
> cool_bar_manager.add(findpeers_action);
>
> return cool_bar_manager;
> }
>
> If I have failed to be clear, please let me know.
> Thanks very much,
> Doyle
>
Previous Topic:Special dnd features
Next Topic:How to get a control from a specific column of a TableTreeItem ?
Goto Forum:
  


Current Time: Tue Oct 27 01:14:18 GMT 2020

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

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

Back to the top