|
|
|
Re: shell-Problem when using SWT 3.1 Mx [message #443823 is a reply to message #443800] |
Fri, 01 October 2004 17:46 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
I really couldn't tell you exactly what needs to be changed in the code
below but what I can say is that prior to the fix (assuming this really is
the thing that is causing the trouble), the same application would appear
blank on every other platform but Windows. You should post this code on
eclipse.platform. Thanks.
"Michal Bergmann" <m.bergmann@sh.cvut.cz> wrote in message
news:cjhnuk$bjm$1@eclipse.org...
> Ok, what should I change in following jface application, so that window
> content would appear without resizing main window?
> Michal Bergmann
>
> import org.eclipse.jface.action.MenuManager;
> import org.eclipse.jface.action.StatusLineManager;
> import org.eclipse.jface.action.ToolBarManager;
> import org.eclipse.jface.window.ApplicationWindow;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.graphics.Point;
> import org.eclipse.swt.widgets.Composite;
> import org.eclipse.swt.widgets.Control;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
> import org.eclipse.swt.widgets.Text;
> import org.eclipse.swt.layout.FillLayout;
> import org.eclipse.jface.action.Action;
>
> public class JFaceTest extends ApplicationWindow
> {
>
> private Action action;
> private Text text;
> public JFaceTest()
> {
> super(null);
> createActions();
> addToolBar(SWT.NONE);
> addMenuBar();
> addStatusLine();
> }
>
> protected Control createContents(Composite parent)
> {
> Composite container = new Composite(parent, SWT.NONE);
> container.setLayout(new FillLayout());
>
> text = new Text(container, SWT.BORDER);
> //
> return container;
> }
>
> private void createActions()
> {
>
> action = new Action() {
> public void run() {
> }
> };
> action.setText("Exit");
> }
>
> protected MenuManager createMenuManager()
> {
> MenuManager result = new MenuManager("menu");
>
> final MenuManager menuManager = new MenuManager("File");
> result.add(menuManager);
>
> menuManager.add(action);
> return result;
> }
>
> protected ToolBarManager createToolBarManager(int arg)
> {
> ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT |
> SWT.WRAP);
> return toolBarManager;
> }
>
> protected StatusLineManager createStatusLineManager()
> {
> StatusLineManager statusLineManager = new StatusLineManager();
> statusLineManager.setMessage(null, "");
> return statusLineManager;
> }
>
> public static void main(String args[])
> {
> JFaceTest window = new JFaceTest();
> window.setBlockOnOpen(true);
> window.open();
> }
>
> protected void configureShell(Shell newShell)
> {
> super.configureShell(newShell);
> newShell.setText("New Application");
> }
>
> protected Point getInitialSize()
> {
> return new Point(500, 375);
> }
> }
>
> "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> news:cjhfip$q1h$1@eclipse.org...
> > This is a "bug fix". On Windows, you were getting a free resize, even
> > when
> > the size did not change.
> >
> > "Dominik Niehus" <nicke@upb.de> wrote in message
> > news:cjgi4o$o8u$1@eclipse.org...
> >> Bug or feature?
> >>
> >> When I create a new shell using SWT 3.1Mx (build 31xx or newest stream
> >> build) no widget is visible (gray pane). By resizing shell all widget
> >> become visible. I have no problem when compiling with SWT 3.0.1 (build
> >> 3063).
> >>
> >> Is this a bug in SWT 3.1 Mx (didn't find a Bug Report jet)? Or a
feature
> >> in SWT 3.1 Mx?
> >>
> >> Thanks
> >>
> >> Dominik
> >
> >
>
>
|
|
|
|
|
|
|
Re: shell-Problem when using SWT 3.1 Mx [message #443843 is a reply to message #443833] |
Sun, 03 October 2004 03:17 |
Benjamin Pasero Messages: 337 Registered: July 2009 |
Senior Member |
|
|
Ok, the bug report dealing with this problem was already opened
some time ago:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=71975
The solution seems to set the size of the Shell after all controls
have been placed (thus, calling setSize() directly before open()).
> Steve, should'nt we open a bug report on this item? Sounds critical to me.
> Ben
> > Me too, I have just downloaded 3.1 M2 and I'm supprised that my project is
> > not working (doesn't show it's content unless I resize), not only that, I
> > have build a Date picker of mine, and it open a small shell (with a focus
> > listener), it closes and throw an exception with the new M2.
> > I think this is a bug in the latest release.
> > "Benjamin Pasero" <bpasero@rssowl.org> wrote in message
> > news:cjkqvl$cdt$1@eclipse.org...
> > >I should add that I am having exactly the same problems on Mac OS X for a
> > > Shell that is not showing its content unless resized.
> > >
> > >> I am a bit confused that a bugfix in 3.1x series of SWT causes Shells to
> > >> not show their content unless resized on any OS than Windows. Did I get
> > >> something wrong, what do to about it?
> > >
> > >
|
|
|
Re: shell-Problem when using SWT 3.1 Mx [message #443902 is a reply to message #443843] |
Mon, 04 October 2004 14:13 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
To be clear. The bug was on Windows where an extra resize was sent despite
the fact that the shell did not change size. Windows has been fixed to
throw away the extra resize and behave like the rest of the platforms.
"Benjamin Pasero" <bpasero@rssowl.org> wrote in message
news:cjnqvf$213$1@eclipse.org...
> Ok, the bug report dealing with this problem was already opened
> some time ago:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=71975
>
> The solution seems to set the size of the Shell after all controls
> have been placed (thus, calling setSize() directly before open()).
>
> > Steve, should'nt we open a bug report on this item? Sounds critical to
me.
>
> > Ben
>
> > > Me too, I have just downloaded 3.1 M2 and I'm supprised that my
project is
> > > not working (doesn't show it's content unless I resize), not only
that, I
> > > have build a Date picker of mine, and it open a small shell (with a
focus
> > > listener), it closes and throw an exception with the new M2.
> > > I think this is a bug in the latest release.
>
> > > "Benjamin Pasero" <bpasero@rssowl.org> wrote in message
> > > news:cjkqvl$cdt$1@eclipse.org...
> > > >I should add that I am having exactly the same problems on Mac OS X
for a
> > > > Shell that is not showing its content unless resized.
> > > >
> > > >> I am a bit confused that a bugfix in 3.1x series of SWT causes
Shells to
> > > >> not show their content unless resized on any OS than Windows. Did I
get
> > > >> something wrong, what do to about it?
> > > >
> > > >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03728 seconds