Custom header and footer within Dialog [message #72803] |
Thu, 02 June 2005 15:56 |
Eclipse User |
|
|
|
Originally posted by: freshtasty.hotmail.com
Hi,
I'm making custom dialogs for users to type in information. I'd like
all my dialogs to have the same custom header and footer. An idea I had was
the following :
1- Make a base dialog class extending jface Dialog. Within createDialogArea
method of this base class, put all the controls that I want, eg a Group for
the header and a Group for the footer. Between each group, I dropt in a
Composite that I called "DataArea". I then created a method called
getDataArea that return the DataArea Composite.
2- Make a custom dialog class extending my base dialog class. In the
createDialogArea method of this class, I call the getDataArea method of the
super that returns me the DataArea Composite. I then add my Text and Label
to the DataArea and I have a custom dialog.
It works and it even looks good but, I've bin coding with SWT for a few days
now and, am I on the right track or am I completely of the track with my
idea ?
If you have any ideas how to make better customs dialog, or know basic
design patterns for that matter, please share the information with the
group. I don't know if Canvas can help, I've haven't had a look at it yet.
Thanks
Sebastien
|
|
|
Powered by
FUDForum. Page generated in 0.09607 seconds