Hi Sergiu,
Sergiu Dumitriu wrote:
mflorea (SVN) wrote:
Author: mflorea
Date: 2009-04-21 18:38:10 +0200 (Tue, 21 Apr 2009)
New Revision: 18914
Modified:
platform/web/trunk/xwiki-gwt-dom/src/main/java/org/xwiki/gwt/dom/client/Style.java
Log:
XWIKI-3442: Review the font plugin
* Added the font-size property
Modified:
platform/web/trunk/xwiki-gwt-dom/src/main/java/org/xwiki/gwt/dom/client/Style.java
===================================================================
---
platform/web/trunk/xwiki-gwt-dom/src/main/java/org/xwiki/gwt/dom/client/Style.java 2009-04-21
16:35:19 UTC (rev 18913)
+++
platform/web/trunk/xwiki-gwt-dom/src/main/java/org/xwiki/gwt/dom/client/Style.java 2009-04-21
16:38:10 UTC (rev 18914)
@@ -86,6 +86,11 @@
/**
+ * The font-size property sets the size of a font.
+ */
+ public static final class FontSize
+ {
+ /**
+ * Default value.
+ */
+ public static final String MEDIUM = "medium";
Can GWT code use java5 enums?
Yes it can,
http://tinyurl.com/cnfkzb , but I'm not sure what are the
benefits of using enums in this case since I have to handle all property
values uniformly:
Style#setProperty(String name, String value)
I don't think I can have a strong-typed API like:
Range#compareBoundaryPoints(RangeCompare how, Range sourceRange)
and using FontSize.MEDIUM.toString() seems like an overhead to me.
Thanks,
Marius