[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: PGroup not displaying content when Shell size is set

Hi Todd,

I think the ClassCastException for WSDLPostProcessor is a problem in your code. Regarding the expand/selection listener, yes it should be an expand listener and if you download the latest version from the Nebula website it is an expand listener. It was a mistake/bug in a previous version.

Regards,
-Chris

Todd Chambery wrote:
Hi all,

I'm replacing a Group with a TextArea with PGroup, and would like to make the Shell expand when the PGroup is expanded.

I've added an ExpandListener:

group.addExpandListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if(group.getExpanded()) {
sShell.setSize(428, 325);
sShell.update();
} else {
sShell.setSize(428, 234);
sShell.update(); }
}
});


When I click the PGroup bar to expand, I'm getting a ClassCastException:

Exception in thread "main" java.lang.ClassCastException: tools.WSDLPostProcessor$9
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:191)


....

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2842)
    at com.bac.cbl.tools.WSDLPostProcessor.main(WSDLPostProcessor.java:381)


Seems like this should take an ExpandListener/Adapter.

Any ideas appreciated,

Todd