Re: addressing xul elements in java code
Gerald Bauer <[email protected]>
| Newsgroups | gmane.comp.java.luxor-xul.user |
|---|---|
| Message-ID | <[email protected]> |
Servus Tzanko, > Here are few things > that I have problem with: > 1) When you display the value in display input text > you address the > display component in yor java code. > JTextField jdisplay = (JTextField) > _display.getJComponent(); > jdisplay.setHorizontalAlignment(JTextField.RIGHT); > setValue(String.valueOf((double) 0)); I agree this is a horrible gludge and will get fixed. Idealy you can set all attributes in XUL. For now, however, because Luxor isn't complete yet you can fallback to Swing and hardcode stuff in Java. In the future once Luxor progesses I hope there's less and less a need to do it. > The hole idea of having things in an XML for me is > that the programing > implemenation is not aware of what are the form > components. It is rather > the xml element definition and the engine to be > responsible for invoking > the objects that will produce the values for the > graphical component. > 2) The same thing with the button. You address all > the buttons in CalsForm. > new EnterDigit(logic, "0"); > If tomorrow I remove a button from the XML or add > new one, I have to > recompile my CalcForm class. The advantage of having > things defined in > meta data is that your immplemetation is not aware > of what is in that > XML as long as it has means to handle the > components. You're right. Dynamic forms and dynamic event binding and so on is currently missing. It's a high priority and I plan to add it in stages over the next couple of Betas. > I am not criticizing here. XUL and Luxor spare you > from working directly with Swing. I am just exposing > my point of view looking for solution to > my problem. I appreciate your honest opinion. > If you could recommend me what to do I > will appreciate it a > lot. Maybe Luxor and XUL are not good for me? 10x > guys. I usually recommend starting with Thinlets - http://www.thinlet.com- a tiny XUL motor - that's easy to set up (just a single jar) and quite powerful for some XUL experimentation. Later you can move on to more "hard-core" stuff like Mozilla or Luxor or Jelly or whatever XUL/XML UI motor best fits your need. - Gerald ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf