Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Some questions for the SWT developers


1) There is no support for true MDI like with Swings JInternalFrame. Will it
stay this way or is this maybe planned for a later version? If this is not
planned, then why? Too difficult to implement on non-Windows platforms and/or
too time consuming? (And _please_, don't tell me to use tabs or something
similar limited, since this is no replacement for MDI.)

        The requirements of Eclipse drive what the SWT team works on,
        and Eclipse does not use MDI. The open-source community is
        certainly welcome to submit an implementation of MDI for
        possible inclusion in SWT. It's just that it hasn't been
        a priority for the SWT team.

2) What is the relation between SWT and JFace? Eclipse seems to use JFace
intensively (Or am I wrong?), so will SWT be supported/developed in the future?


        JFace is written on top of SWT. It basically adds a "model layer"
        to the (model-independent) SWT widgets. Eclipse uses JFace, which
        uses SWT. Sometimes Eclipse uses SWT directly.
        SWT will definitely be supported & developed in the future -
        both Eclipse and JFace need it.

3) Why is the parent property in SWT widgets implemented in such an (sorry)
odd way by using an argument in the constructor methods, like in e.g.
text(Composite parent, int style)? This prevents using them as beans and with visual
tools, I think. Why is it not implemented like in Swing where the parent
property is set when the widget gets added to its parent?


        Swing widgets are "lightweight", which means that they are drawn
        by the widget toolkit when they need to be displayed. They can be
        created without a parent and passed around, etc., but they don't
        need to have a platform handle until the moment when they are drawn.

        SWT widgets are real platform widgets. Each widget has a platform
        handle from the moment it is created, which means it needs a parent.
        Most platforms do not support creating a widget without specifying
        its parent. Perhaps it is better explained in this SWT FAQ entry:

        Q: Will or can SWT be enhanced to include support for JavaBeans?  

       A: To the extent that it makes sense, given the constraints of operating system compatibility, SWT already mirrors the beans behavior. An example of this is the use of standard beans mechanisms for event dispatch (EventListener, EventObject and adapter classes). Some aspects of the beans paradigm, such as the ability to create beans with null constructors, run counter to the constraints of the underlying operating systems that SWT runs on.  For example, operating systems do not typically support creating a widget without specifying its parent.


The essence of the problem is, if you allow a widget to be created with a null constructor, then you can't actually create the o/s resources at the time the constructor runs (you would have to wait until later, after the parent has been set). We just can not do this, since we *always* create the o/s resources in the constructor, and for performance/efficiency/consistancy reasons do not even keep slots in the object to hold whatever state would be required so that the object *could* be created later.


4) Why is there no addNotify method for the SWT widgets? (I'm using it to
extend the Swing widgets with necessary extensions.)


        I will leave this question to one of the other members of the team.

Hope this helps,
Carolyn



dr_seltsam@xxxxxx
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

04/19/02 06:16 PM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-swt-dev] Some questions for the SWT developers


Hello!


I'm evaluating SWT for our company and have a few questions regarding to it:

1) There is no support for true MDI like with Swings JInternalFrame. Will it
stay this way or is this maybe planned for a later version? If this is not
planned, then why? Too difficult to implement on non-Windows platforms and/or
too time consuming? (And _please_, don't tell me to use tabs or something
similar limited, since this is no replacement for MDI.)

2) What is the relation between SWT and JFace? Eclipse seems to use JFace
intensively (Or am I wrong?), so will SWT be supported/developed in the future?

3) Why is the parent property in SWT widgets implemented in such an (sorry)
odd way by using an argument in the constructor methods, like in e.g.
text(Composite parent, int style)? This prevents using them as beans and with visual
tools, I think. Why is it not implemented like in Swing where the parent
property is set when the widget gets added to its parent?

4) Why is there no addNotify method for the SWT widgets? (I'm using it to
extend the Swing widgets with necessary extensions.)

I hope you could answer some of these questions since I'm trying to decide
wether or not we will be able to switch our framework from Swing to SWT.


Many thanks in advance,
Dr. Seltsam

--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top