Results 1 to 3 of 3
  1. #1
    Marty is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default Inheritance in GUI

    Inheritance(Heredity) in swt
    I would like to have some additional functionality in the controls of swt.

    P.e. autocompleted, user's safety control for if same or "autoconcealment" depending on certain parameters or circunstances.
    The case is that not as(like) focusing it since not if it is possible to inherit of the classes of swt (is the well-read one something of that not) or simply that everything what I want already exists.
    Can you help me?
    thanks
    Marty
    Last edited by Marty; 06-01-2007 at 04:31 PM.

  2. #2
    goldhouse is offline Senior Member
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

    Default

    Almost all the basic controls in SWT is declared final , So the approach I followed was creating a Class SWTTextbox which has a field Text (the text box of SWT) and including the additional features .
    My purpose was to bind each control to a field of the DB. This worked fine.
    I couldn't make out clearly your purpose.

  3. #3
    Freddie is offline Member
    Join Date
    May 2007
    Posts
    41
    Rep Power
    0

    Default

    You can inherit any (visual / public) class of swt.
    I think that the only exception is the Browser
    I would recommend you, if you are going to do your own visual components that you inherit from Composite and assign to this one layouts and children who correspond(fit) to the representation of your widget especially. If it is a widget that interacts directly with the agent of windows you might inherit also of the class Shell.

    Regards and good luck! ; P
    Last edited by Freddie; 06-01-2007 at 03:28 PM.

Similar Threads

  1. inheritance and aggregation
    By java_fun2007 in forum New To Java
    Replies: 3
    Last Post: 12-13-2007, 02:36 PM
  2. Delegation vs inheritance
    By javaplus in forum Advanced Java
    Replies: 1
    Last Post: 12-07-2007, 10:07 PM
  3. Inheritance
    By mew in forum New To Java
    Replies: 1
    Last Post: 12-07-2007, 07:08 PM
  4. Multiple Inheritance
    By mew in forum New To Java
    Replies: 1
    Last Post: 12-01-2007, 11:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •