Q re order of execution in construcing the design view. [message #607755] |
Fri, 13 May 2005 14:07 |
Eclipse User |
|
|
|
I need to better understand how VE is working to construct the design
view. Specifically, it appears that VE is evaluating statements to
create the design view in a significantly different order than presented
in my code.
Here is the source of my test routine and log traces that show the order
of evaluation/execution.
www.certiv.net/download/VETest4.java
www.certiv.net/download/DesignViewTrace.txt
www.certiv.net/download/ExecutionTrace.txt
The source references two custom components: JDecorator is a minor
JLabel extension; JFormPanel extends JPanel and overrides addImpl(...)
method in order to tweak the layout constraints of components as they
are added to the JFormPanel.
To initialize the JFormPanel to enable correct tweaking, the
setColumnSpec(...), setRowSpec(...), setSlotSpec(...), and setFormLayout
(true) statements *must* be executed before components are added to the
panel. When I use VE to initially drop components on the JFormPanel,
the code in the VETest4#getJFormPanel() method is created in the correct
ordering.
The execution trace shows the actual order of statement execution - the
executed app has the correct, tweaked appearance.
The problem becomes evident when I close and reopen the design view: the
design view representation of the JFormPanel is empty of the contained
components. The contained components are correctly shown in VE's Java
Bean view. There are no errors in the log files.
The design view trace produced when VE is loading the JFormPanel to
create the design view indicates that all components are added *before*
VE executes the various setColumnSpec, etc statements to initialize the
JFormPanel. (Also, the components are added using a method signature
(add(Component)) that is different from the actual code statement (add
(Component, Object)); I am overriding that method too, so it causes no
harm in this case - but it is unexpected.)
Is this the intended behavior? Is there something that can be done or
that I need to do to correct VE's order of evaluating statements in
constructing the design view?
Thanks,
Gerald
|
|
|
Powered by
FUDForum. Page generated in 0.06423 seconds