myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1702512 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago: layout/Overflow.java renderkit/css/Style.java
Date Fri, 11 Sep 2015 16:26:41 GMT
Author: lofwyr
Date: Fri Sep 11 16:26:41 2015
New Revision: 1702512

URL: http://svn.apache.org/r1702512
Log:
TOBAGO-1489: Optimize enums used for attributes in taglib.
* Overflow

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Overflow.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Overflow.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Overflow.java?rev=1702512&r1=1702511&r2=1702512&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Overflow.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/Overflow.java
Fri Sep 11 16:26:41 2015
@@ -21,17 +21,29 @@ package org.apache.myfaces.tobago.layout
 
 public enum Overflow {
 
-  AUTO("auto"),
-  HIDDEN("hidden"),
-  SCROLL("scroll");
+  auto,
+  hidden,
+  scroll;
 
-  private String value;
+  /**
+   * @deprecated Since Tobago 3.0.0 Please use {@link Overflow#auto}
+   */
+  public static final Overflow AUTO = auto;
 
-  Overflow(final String value) {
-    this.value = value;
-  }
+  /**
+   * @deprecated Since Tobago 3.0.0 Please use {@link Overflow#hidden}
+   */
+  public static final Overflow HIDDEN=hidden;
+
+  /**
+   * @deprecated Since Tobago 3.0.0 Please use {@link Overflow#scroll}
+   */
+  public static final Overflow SCROLL=scroll;
 
+  /**
+   * @deprecated Since Tobago 3.0.0 Please use {@link Overflow:name}
+   */
   public String getValue() {
-    return value;
+    return name();
   }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java?rev=1702512&r1=1702511&r2=1702512&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java
Fri Sep 11 16:26:41 2015
@@ -106,8 +106,8 @@ public class Style implements Serializab
     }
 
     if (layout instanceof LayoutContainer) {
-      overflowX = ((LayoutContainer) layout).isOverflowX() ? Overflow.AUTO : null;
-      overflowY = ((LayoutContainer) layout).isOverflowY() ? Overflow.AUTO : null;
+      overflowX = ((LayoutContainer) layout).isOverflowX() ? Overflow.auto : null;
+      overflowY = ((LayoutContainer) layout).isOverflowY() ? Overflow.auto : null;
     }
   }
 



Mime
View raw message