Hi Stefan, Please look at: http://ulc-community.canoo.com/snipsnap/space/JGraph+Extension You can take hints from the source code. For detailed information on extending ULC please refer to ULC Extension Guide that is part of the ULC release.
Thanks and regards, Janak ----------------------------------------- Janak Mulani email: [EMAIL PROTECTED] url: http://www.canoo.com <http://www.canoo.com/> Beyond AJAX - Java Rich Internet Applications http://www.canoo.com/ulc ----------------------------------------- _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of stefan ge Sent: Thursday, September 04, 2008 6:47 PM To: [email protected] Subject: RE: [ULC-developer] draw shapes hello, So for example if i want make a paint programm in ulc. do i have to write for each shape an extension? And is there a container that i can use to draw them? thanks regards stefan > Subject: Re: [ULC-developer] draw shapes > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: [email protected] > Date: Thu, 4 Sep 2008 15:05:37 +0200 > > > Hello, > > is it possible to draw a lines or other shapes (like java.awt.graphics) > > with ulc components? In swing i can overwrite the paintComponent > > function. > > From what I remember you have to write an ULC extension for that. The idea > for that is rather simple and I'll outline it based on an example. Maybe > you want a custom drawn textfield. You'd have to extend the classes > ULCTextField (servert side) and UITextField (client side) and name them > something like ULCMyTextField (again server) and UIMyTextField (client). > If you take a look at the extension guide you'll quickly find out how to > do so. Now you only need to override 2 methods: > > ULCMyTextField: > String typeString(); > Should return the full qualified class name of UIMyTextField > > UIMyTextField > Object createBasicObject(Object[] args); > Should create your custom text field with your custom paint method, > something like : return new MyTextFieldWidget(); > > I'm not sure if I got all the things right here since it's been a while > since I did similar. But it should answer your question on how to do it. > > Regards, > Christoph Brill > _______________________________________________ > ULC-developer mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/ulc-developer _____ Windows Live Messenger jetzt gratis upgraden! Hier klicken! <http://get.live.com>
