That is built-in already...
Any class (but most likely an extended Swing class) can be registered with
the Swix Engine, but registration has to be done before parsing/rendering.
The registration takes the TAG name and the class, i.e. register(mytag,
com.company.myclass.class). Attributes are determined through reflection.
If the class has a setter method, say "setAsset(Asset a);" then Asset
becomes a valid attribute name.
All you need to do is implement a converter class that is able to convert a
String into an Asset, i.e.




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Tim Colson
Sent: Wednesday, January 08, 2003 2:30 PM
To: [email protected]
Subject: [Forum] Custom Widgets?


Say - have you thought about how custom widgets might be described in the
XML?

I think that's an important potential differentiator from some of the other
engines. Yes, the basics must be provided in the core... but that will take
a lot of time. And for me, even if all of the basic widgets were perfect,
the first custom widget that my users "MUST HAVE" makes the engine useless.

However, if the engine enabled me to use my custom widgets, then that
flexibility would sell me... even if all of the basics weren't quite done
yet. I know that in time, they will be complete...whereas with the other
engines, I don't know if I'll ever be able to use the "MUST HAVE" widget.

Some ideas:
Could a separate namespace be useful for custom widgets?
Would custom widgets still be able to embed standard widgets?
Would widgets 'extend' other widgets like in thinlets where most extend
'component'?

<?xml version="1.0" encoding="UTF-8"?>
<frame>
   <panel background="6699cc" constraints="BorderLayout.CENTER">
     <label text="Custom Tree Table - one part tree, one part table"/>
     <colson:treetable stayinsync="true" width="80">
        <colson:tree>tree stuff here</colson:tree>
        <colson:table>table stuff here</colson:table>
     <colson:treetable>
   </panel>
</frame>

Tim






_______________________________________________
Forum mailing list
[email protected]
http://jupiter.lunarpages.com/mailman/listinfo/forum_carlsbadcubes.com


Reply via email to