|
|
How does the Designer work? |
| I've been converting some of my
existing code to display properly in the designer. Between the FAQs and
release notes, and the behavior I'm seeing in the designer, here's the
way I think it really works:
You open the java source file and click on 'Design'.
Designer looks at the source file and identifies:
1) The parent class
2) The class fields (which have initializers)
3) The jbInit() method
Designer then instantiates an object of the PARENT class and displays its outline in the designer pane. This is designer's model of your object.
Designer then inserts the class fields into the structure pane.
Designer then reads through jbInit() looking for statements which affect any of the items Designer has already created within its model. Excess stuff is simply ignored. Identifiable stuff is reflected in the design pane and the structure pane.
The constructor is NOT executed, Designer simply verifies that it exists and that it calls jbInit().
So, Designer is reading the source code and FAKING the object. It's
impossible to use the new object's constructor, class (static) methods, or
instance methods to affect anything visible within the designer. You can
call methods in the parent class, or methods in other classes, but nothing in
the class-under-construction is accessible. If your object's parent class is an abstract class, the Designer displays a "red bean" because it can't instantiate an instance of the abstract parent class for its model.
| |
| Actually the designer can handle public static methods for the class under design once they have been compiled. It cannot be tell the difference between them or any other public static method.
2001-Sep-04 11:39am ghamer@troikanetworks.com | |
| [Append to This Answer] | |
| 2001-Sep-04 11:39am |
| Previous: |
|
| Next: |
|
| ||||||||
|
Java Community
Java Tools |
Code Central JB OpenTools |
Community Recent Threads |
Borland Chat Chat FAQ |
||||||||||||||
|
Feature Matrices 3.0 | 3.5 | 4.0 5.0 | 6.0 | 7.0 |
Shop for JBuilder |
JBuilder Downloads and reg keys |
Report Piracy | ||||||||||||||
|
Online Manuals 4.0 | 5.0 | 6.0 7.0 |
Borland DevSupport's Bug/RFE Form Quality Central Client |
JB Patches & Updates |
JBuilder FAQs TIs | ||||||||||||||
|
JBuilder Newsgroups |
Tamaracka's News Archive |
Mr. Haki's JBuilder Machine |
JGuru's JBuilder FAQ |
||||||||||||||
|
Sun's Bug Parade |
|||||||||||||||||
|
|||||||||||||||||