I rather hoped we can take care of this now rather than later.
Two reasons:1) Basic units like percent and pixels aren't CSS specific 2) There isn't any real ambiguity about how to design this and how it should work. The basic unit types are documented very clearly here: http://www.htmlref.com/reference/appb/measurements.htm and all we'd have to do is create a very simple class structure to back it up. The only thing I'm looking for now is: [Type of MeasurementUnit, Measurement Value] so really your design could be something like this: public abstract class MeasurementUnit { private int value; protected MeasurementUnit() {}; public int getValue() { return value; } } public class PixelUnit extends MeasurementUnit { protected MeasurementUnit() {}; // Returns PixelUnit of the specified value public PixelUnit valueOf(int value); } and so on... very similar to class Number, Integer, etc where you try to share immutable values across your system. Typesafe, lightweight and ready to go :) Just clean it up with some interfaces which I didn't bother with. Anyway, that's just my 2 cents. Gili On Wed, 09 Mar 2005 19:29:27 -0800, Jonathan Locke wrote: >sounds like something we could address when we get to CSS stuff since >it's related. > >Gili wrote: > >> We need a class associated with HTML "units". For example, I >>should be able to construct "12 px" as new PixelUnit(12); The same >>should go for percentage sizes, etc and they should all inherit from >>wicket.markup.html.MeasurementUnit >> >> Right now I am forced to allow users to pass in Strings in >>place of sizes and I'd prefer strong-typing. >> >>Gili >> >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from real users. >>Discover which products truly live up to the hype. Start reading now. >>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>_______________________________________________ >>Wicket-develop mailing list >>[email protected] >>https://lists.sourceforge.net/lists/listinfo/wicket-develop >> >> >> > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Wicket-develop mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/wicket-develop > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
