Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » jface ApplicationWindow
jface ApplicationWindow [message #458893] Mon, 25 July 2005 18:36
Eclipse UserFriend
Originally posted by: hansm.science.uva.nlDELETE

It seems that in jface.ApplicationWindow I cannot make the addCoolBar mechanism
work, whereas addToolBar does allright.

Code extract:
public class XYZ extends ApplicationWindow{...
protected ToolBarManager createToolBarManager(int style) {
ToolBarManager toolbarManager = new ToolBarManager();
// THE NEXT STATEMENT WORKS, ADDS ACTION.
toolbarManager.add(someAction);
return toolbarManager;
}
addToolBar(SWT.FLAT)
OR:
protected CoolBarManager createCoolBarManager(int style) {
CoolBarManager coolbarManager = new CoolBarManager();
// THE NEXT STATEMENT DOES NOT WORK, ADDS NOTHING
coolbarManager.add(someAction);
return coolbarManager;
// How for example can I put a Combo into the coolbar here?
}
addCoolBar(SWT.FLAT);


One of the problems making other solutions impossible (e.g. creating a coolbar
by myself, etc. and adding it) is the fact that the controls involved are not
realized before the open call. I guess the first moment the parent Shell can be
accessed is in the call to createContents, too late to do something with the
setup of bars and statusline.

Same sort of problem occurs with addStatusLine(). I have not been able to set
the layout of the statusline at its construction (subclassed it), because
ApplicationWindow makes its layout inaccessible.
StatusLineLayoutData layout = new StatusLineLayoutData();
cannot be used for example, because for the same reason createControl cannot be
executed on the statusline. I am thus prohibited to set width and height hints,
for example.

Is this known behaviour, i.e. limitations inherent to jface ApplicationWindow?
Or am I just misunderstanding proper usage.

thanks in advance for your opinion.
Hans van der Meer
Previous Topic:Search Plugin
Next Topic:how to control the different view by input?
Goto Forum:
  


Current Time: Fri Apr 26 15:55:11 GMT 2024

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

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

Back to the top