Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] JVE Model for ui composites

Joe
 
We thought of doing this, but then we decided that the user is responsible to get the components in the right order when adding components to extended containers.
 
However, not having the components of extended containers in the model has another drawback:
 
E.g. put a table in MyPanel (which extends JPanel). This class then shows the table with the default table model. If I add MyPanel to a JFrame (using choose Beans) the table is not visible because the model is not set. From a users point of view I find this rather confusing.
 
So what we did was to access the components of container through the BeanProxy API and set the default table model if no other model is set. This works for first level components but not if these contains other components one of it might be a table. And it has rather the state of a workaround.
 
Have you planned any solution for this problem?
 
regards
sibylle
 -----Original Message-----
From: ve-dev-admin@xxxxxxxxxxx [mailto:ve-dev-admin@xxxxxxxxxxx]On Behalf Of Joe Winchester
Sent: Dienstag, 19. Oktober 2004 12:40
To: ve-dev@xxxxxxxxxxx
Subject: Re: [ve-dev] JVE Model for ui composites


Sibyllem

>We have two visual components, ULCFrame and MyBox extending ULCBoxPane. In
>MyBox we have various ULCComponents. (Similar to having a MyPanel class
>extending JPanel and containing many components).
>If we add MyBox to ULCFrame using chooseBeans then the original
>ULCComponents of MyBox are not visible in the model (Similar to when the
>MyPanel bean is added to JFrame).


Gili is right that the API of the MyBox and its components is not accessible to you in the VE model.  However you can still access them through the BeanProxy API.  You can get the adapter and then reflect in to get something like getComponents() or getComponent(int) and find the bean proxies and then manipulate them directly.  Would this be enough for you or do you need anything more ?  We have thought about allowing things like positioning and ordering components within the children (i.e. generate something like )

container.addComponent(component,constrint,int),

although doing the GEF feedback for this and making it work might be more trouble that we gain.  It wouldn't be straightforward.

Best regards,

Joe

Back to the top