[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Custom Composites
|
- From: Kai Meder <kai@xxxxxxxxxx>
- Date: Tue, 14 Nov 2006 13:33:11 +0100
- Newsgroups: eclipse.platform.swt
- Organization: EclipseCorner
- User-agent: Thunderbird 1.5.0.8 (Windows/20061025)
hello,
are there any guides on how to create custom composites?
im currently extending composite and as my "components" are special
composites, they do something like this:
// PanelComponents is-a Compositum, it contains several Copoments
// but adds a panel-look, statusbar, etc..
class PanelComponent extends Composite {
public void init() {
content = new Group(this, SWT.NONE);
content.setText(getLabel());
status = new Group(this, SWT.NONE);
RowLayout statusLayout = new RowLayout(SWT.HORIZONTAL);
status.setLayout(statusLayout);
}
}
class ScaleComponent extends Composite {
public void init() {
scale = new Scale(this, SWT.HORIZONTAL);
}
}
i want these components to be used like this:
PanelComponent panel = new PanelComponent(some-parent-composite, style);
ScaleComponent scale = new ScaleComponent(panel, style);
FoobarComponent foobar = new FoobarComponent(panel, style);
so the components like scale and foobar should be registered into the
panel-component (compositum) and displayed in the panel's content-group.
how to achieve this?
any advice?
thanks,
kai