• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need advice in creating custom control

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I need advice.
I want to make my own control, which will be able to get
data from database, allow user to change columns to show,
allow to add filters, show total amounts e.t.c.
In SWT I have such hierarhy:

I have two choices - I can use Composite or Canvas, and I should
decide "subclass or not subclass". I can just aggregate Canvas or
Composite in my class and implement needed functionality.
Here is description of Canvas:
This class may be subclassed by custom control implementors who are building controls that are not constructed from aggregates of other controls. That is, they are either painted using SWT graphics calls or are handled by native methods.
and Composite:
This class may be subclassed by custom control implementors who are building controls that are constructed from aggregates of other controls.
I can't understand difference and make decision.
If I said somth not clear, please excuse me, it's not clear even
in my head
If you how how I should do that in Swing or awt it can be usefull for me too.
[ July 04, 2002: Message edited by: Vladimir Kvassov ]
 
What's that smell? I think this tiny ad may have stepped in something.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic