Hi Gjivo,

For ULCTable, ULCTree and ULCTableTree, the visual editor sets a default
model on the corresponding bean in target JVM (and not in generated code)
just so that the widget (ULCTable, ULCTree, ULCTableTree) can be seen on the
canvas, otherwise you will see an empty rectangle.

You can subsequently set your own model:

private ULCTree getUlcTree() {
                if (ulcTree == null) {
                        ulcTree = new ULCTree();
                        ulcTree.setModel(new MyTreeModel());
                }
                return ulcTree;
        }


Where MyTreeModel is a separate class, e.g.:

public class MyTreeModel extends DefaultTreeModel {
.....
}

Please keep in mind:

1. You cannot manipulate/interact with the widget on the canvas as you would
in an application. The widget on the canavas is just an image of the bean
and not the bean itself.

2. The Visual Editor is mainly used for screen layouts and hence it doesnot
matter if you set your own model in the Visual Class. You can set your own
model in a helper class. In fact, the suggested pattern for using ULC VE is
that just create the View with the Visual Editor. Setting of Model and
Controllers should be done in a Helper class. This way you will avoid
editing the generated code.

I hope this helps.

Thanks and regards,

Janak

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Gjivo Tikvica
Sent: Friday, December 29, 2006 4:48 PM
To: [EMAIL PROTECTED]
Subject: [ULC-developer] ULCTree component


I have a problem with implementation of ULCTree component. When I put
ULCTree on ULCBoxPane I've got default tree in wich I can't  change nothing.
I need to ask is it possible to do anyithing with it, or I need to make
changes inside the component? My version of ULC is 6.1.1 and visual editor
is 5.1.1.

Gjivo Tikvica
ICQ : 101-357-587



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.28/606 - Release Date: 28.12.2006
0:22

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to