Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » shell-Problem when using SWT 3.1 Mx
shell-Problem when using SWT 3.1 Mx [message #443758] Thu, 30 September 2004 09:08 Go to next message
Dominik Niehus is currently offline Dominik NiehusFriend
Messages: 4
Registered: July 2009
Junior Member
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 #443796 is a reply to message #443758] Thu, 30 September 2004 17:30 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
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 #443800 is a reply to message #443796] Thu, 30 September 2004 19:53 Go to previous messageGo to next message
Michal Bergmann is currently offline Michal BergmannFriend
Messages: 19
Registered: July 2009
Junior Member
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 #443823 is a reply to message #443800] Fri, 01 October 2004 17:46 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
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 #443829 is a reply to message #443823] Fri, 01 October 2004 23:57 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
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 #443830 is a reply to message #443829] Fri, 01 October 2004 23:58 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
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 #443832 is a reply to message #443830] Sat, 02 October 2004 13:02 Go to previous messageGo to next message
Ali Z. Anwar is currently offline Ali Z. AnwarFriend
Messages: 14
Registered: July 2009
Junior Member
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 #443833 is a reply to message #443832] Sat, 02 October 2004 13:27 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
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 #443843 is a reply to message #443833] Sun, 03 October 2004 03:17 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
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 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
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?
> > > >
> > > >
>
>
Previous Topic:Any connection between GC and Dispose()?
Next Topic:identifying Control from Shell coordinate
Goto Forum:
  


Current Time: Thu Apr 25 08:02:56 GMT 2024

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

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

Back to the top