[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] kombining GLCanvas/Composite and Button classes into one class
|
Hi Peter,
as a general rule you should not subclass Button (or so say the Button javadocs), so option II is the way to go.
However you cannot implement Button; you should just subclass Composite, and pretend you are implementing Button (just the methods you are interested in: I imagine you'll want addSelectionListener, for instance).
peto <peter.fodrek@xxxxxxxx> wrote:
Dear conference,
I am t o to design own class for openGL rendered Button. I am to combine
Button and Composite and add GLCanvas object into Composite part of me class.
I was metioned two way to do so
I.
OglButton extends Buttton implements Composite{
private Composite LocalComposite;
void changed(Control[] changed)
{
LocalComposite.changed(changed);
}
.......
}
or II.
OglButton extends
Composite implements Button{
// same binding as above
.......
}
Could anyone reply me which is recomended way to create such new widget,
please? (I know about paint listener)
I look forward heraing from you
Yours faithfully
Peter Fodrek
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.
Try it now.