Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » buf or feature? empty window
buf or feature? empty window [message #131128] Wed, 20 September 2006 18:06 Go to next message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
hello all,

try the following with sdk 3.3M1:
- create an empty java project
- create a visual class, choose swt shell and let it create a main method
- put a composite on the shell in the java beans view
-> the shell window visually changes its' position (why that?)
this only happens if u add the composite in the bean view
- put a label in the composite
- start the little app with alt+shift+x j
-> an empty shell shows up (where is my label?)

is this caused by wrong use?

cu,
michael
Re: buf or feature? empty window [message #131224 is a reply to message #131128] Thu, 21 September 2006 14:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Could you please append the generated code?
Re: buf or feature? empty window [message #131312 is a reply to message #131224] Fri, 22 September 2006 07:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.dev.NO_SPAM.gmx.de

Hello Rich,

thanks for your answer. One more idea I have for ve. Normally I work wth
ve and code in separate tabs instead of a split pane. I think this is even
a better default, because in my opinion a split pane neither gives you
enough space for visual editing nor for code. The idea is, if you double
click on an event in the java beans view it should switch to the source
tab and jump to the code position of the according event. In a preference
you could even define an option to jump to the code section and the source
tab when an event is added (this should be really an option not a general
behaviour).

On Thu, 21 Sep 2006 10:19:34 -0400, Rich Kulp wrote:

> Could you please append the generated code?

Here you are (I removed the comments but everything
else is pure class wizard & ve generated):

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;

public class MissingLabelSample {

private Shell sShell = null;
private Composite composite = null;
private Label label = null;

private void createComposite() {
composite = new Composite(sShell, SWT.NONE);
composite.setLayout(new GridLayout());
label = new Label(composite, SWT.NONE);
label.setText("Run the app and you won't see me");
}

public static void main(String[] args) {
Display display = Display.getDefault();
MissingLabelSample thisClass = new MissingLabelSample();
thisClass.createSShell();
thisClass.sShell.open();

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

private void createSShell() {
sShell = new Shell();
sShell.setText("Shell");
createComposite();
sShell.setSize(new Point(300, 200));
sShell.setLayout(new GridLayout());
}

}
Re: buf or feature? empty window [message #131336 is a reply to message #131312] Fri, 22 September 2006 08:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.dev.NO_SPAM.gmx.de

Here it is again... better formatted

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;

public class MissingLabelSample {

private Shell sShell = null;
private Composite composite = null;
private Label label = null;

private void createComposite() {
composite = new Composite(sShell, SWT.NONE); composite.setLayout(new
GridLayout()); label = new Label(composite, SWT.NONE);
label.setText("Run the app and you won't see me");
}

public static void main(String[] args) {
Display display = Display.getDefault(); MissingLabelSample thisClass =
new MissingLabelSample(); thisClass.createSShell();
thisClass.sShell.open();

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

private void createSShell() {
sShell = new Shell();
sShell.setText("Shell");
createComposite();
sShell.setSize(new Point(300, 200));
sShell.setLayout(new GridLayout());
}


}
Re: buf or feature? empty window [message #131367 is a reply to message #131312] Fri, 22 September 2006 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Two windows are already available. There is a VE option on the
Window->Preferences->Java->Visual Editor to switch to using a tab pane
with two windows instead of a split pane.
Re: buf or feature? empty window [message #131378 is a reply to message #131336] Fri, 22 September 2006 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

I don't know how it happened, but switch the order of the setLayout and
setSize in the createShell() method.
Re: buf or feature? empty window [message #131414 is a reply to message #131367] Mon, 25 September 2006 06:45 Go to previous messageGo to next message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Rich Kulp wrote:
> Two windows are already available. There is a VE option on the
> Window->Preferences->Java->Visual Editor to switch to using a tab pane
> with two windows instead of a split pane.
I know that thank you. I was just thinking it is a better default setting.
Re: buf or feature? empty window [message #131426 is a reply to message #131414] Mon, 25 September 2006 15:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

It depends on who you talk to. :-) In the beginning we had the two panes
as the default. We were asked over and over to make the split pane the
default, so we did.

Michael wrote:
> Rich Kulp wrote:
>
>> Two windows are already available. There is a VE option on the
>> Window->Preferences->Java->Visual Editor to switch to using a tab pane
>> with two windows instead of a split pane.
>
> I know that thank you. I was just thinking it is a better default setting.
Re: buf or feature? empty window [message #131452 is a reply to message #131426] Tue, 26 September 2006 12:04 Go to previous message
Eclipse UserFriend
Originally posted by: michael.dev.NO_SPAM.gmx.de

On Mon, 25 Sep 2006 11:08:31 -0400, Rich Kulp wrote:

> It depends on who you talk to. :-) In the beginning we had the two panes
> as the default. We were asked over and over to make the split pane the
> default, so we did.
Ok, convinced.. :)
Re: buf or feature? empty window [message #614641 is a reply to message #131128] Thu, 21 September 2006 14:19 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Could you please append the generated code?
Re: buf or feature? empty window [message #614648 is a reply to message #131224] Fri, 22 September 2006 07:02 Go to previous message
Michael Maluck is currently offline Michael MaluckFriend
Messages: 9
Registered: July 2009
Junior Member
Hello Rich,

thanks for your answer. One more idea I have for ve. Normally I work wth
ve and code in separate tabs instead of a split pane. I think this is even
a better default, because in my opinion a split pane neither gives you
enough space for visual editing nor for code. The idea is, if you double
click on an event in the java beans view it should switch to the source
tab and jump to the code position of the according event. In a preference
you could even define an option to jump to the code section and the source
tab when an event is added (this should be really an option not a general
behaviour).

On Thu, 21 Sep 2006 10:19:34 -0400, Rich Kulp wrote:

> Could you please append the generated code?

Here you are (I removed the comments but everything
else is pure class wizard & ve generated):

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;

public class MissingLabelSample {

private Shell sShell = null;
private Composite composite = null;
private Label label = null;

private void createComposite() {
composite = new Composite(sShell, SWT.NONE);
composite.setLayout(new GridLayout());
label = new Label(composite, SWT.NONE);
label.setText("Run the app and you won't see me");
}

public static void main(String[] args) {
Display display = Display.getDefault();
MissingLabelSample thisClass = new MissingLabelSample();
thisClass.createSShell();
thisClass.sShell.open();

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

private void createSShell() {
sShell = new Shell();
sShell.setText("Shell");
createComposite();
sShell.setSize(new Point(300, 200));
sShell.setLayout(new GridLayout());
}

}
Re: buf or feature? empty window [message #614650 is a reply to message #131312] Fri, 22 September 2006 08:42 Go to previous message
Michael Maluck is currently offline Michael MaluckFriend
Messages: 9
Registered: July 2009
Junior Member
Here it is again... better formatted

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;

public class MissingLabelSample {

private Shell sShell = null;
private Composite composite = null;
private Label label = null;

private void createComposite() {
composite = new Composite(sShell, SWT.NONE); composite.setLayout(new
GridLayout()); label = new Label(composite, SWT.NONE);
label.setText("Run the app and you won't see me");
}

public static void main(String[] args) {
Display display = Display.getDefault(); MissingLabelSample thisClass =
new MissingLabelSample(); thisClass.createSShell();
thisClass.sShell.open();

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

private void createSShell() {
sShell = new Shell();
sShell.setText("Shell");
createComposite();
sShell.setSize(new Point(300, 200));
sShell.setLayout(new GridLayout());
}


}
Re: buf or feature? empty window [message #614653 is a reply to message #131312] Fri, 22 September 2006 14:42 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Two windows are already available. There is a VE option on the
Window->Preferences->Java->Visual Editor to switch to using a tab pane
with two windows instead of a split pane.
Re: buf or feature? empty window [message #614654 is a reply to message #131336] Fri, 22 September 2006 14:48 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

I don't know how it happened, but switch the order of the setLayout and
setSize in the createShell() method.
Re: buf or feature? empty window [message #614657 is a reply to message #131367] Mon, 25 September 2006 06:45 Go to previous message
Michael is currently offline MichaelFriend
Messages: 40
Registered: July 2009
Member
Rich Kulp wrote:
> Two windows are already available. There is a VE option on the
> Window->Preferences->Java->Visual Editor to switch to using a tab pane
> with two windows instead of a split pane.
I know that thank you. I was just thinking it is a better default setting.
Re: buf or feature? empty window [message #614658 is a reply to message #131414] Mon, 25 September 2006 15:08 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

It depends on who you talk to. :-) In the beginning we had the two panes
as the default. We were asked over and over to make the split pane the
default, so we did.

Michael wrote:
> Rich Kulp wrote:
>
>> Two windows are already available. There is a VE option on the
>> Window->Preferences->Java->Visual Editor to switch to using a tab pane
>> with two windows instead of a split pane.
>
> I know that thank you. I was just thinking it is a better default setting.
Re: buf or feature? empty window [message #614660 is a reply to message #131426] Tue, 26 September 2006 12:04 Go to previous message
Michael Maluck is currently offline Michael MaluckFriend
Messages: 9
Registered: July 2009
Junior Member
On Mon, 25 Sep 2006 11:08:31 -0400, Rich Kulp wrote:

> It depends on who you talk to. :-) In the beginning we had the two panes
> as the default. We were asked over and over to make the split pane the
> default, so we did.
Ok, convinced.. :)
Previous Topic:verticalIndent missing for GridData (SWT)
Next Topic:VE failed to parse public final static Dimention() const of base class
Goto Forum:
  


Current Time: Thu Apr 25 08:28:26 GMT 2024

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

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

Back to the top