You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/02/18 00:15:39 UTC
svn commit: r1730974 - in
/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src:
main/java/org/apache/myfaces/tobago/internal/taglib/component/
main/java/org/apache/myfaces/tobago/layout/
main/java/org/apache/myfaces/tobago/renderkit/css/ test/java/org...
Author: lofwyr
Date: Wed Feb 17 23:15:38 2016
New Revision: 1730974
URL: http://svn.apache.org/viewvc?rev=1730974&view=rev
Log:
TOBAGO-1501: Refactoring: using further enums
* simplify name tests
Added:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OverflowUnitTest.java
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java
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
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrderByUnitTest.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrientationUnitTest.java
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java?rev=1730974&r1=1730973&r2=1730974&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java Wed Feb 17 23:15:38 2016
@@ -212,7 +212,7 @@ public interface StyleTagDeclaration ext
@TagAttribute()
@UIComponentTagAttribute(
type = "org.apache.myfaces.tobago.layout.Overflow",
- allowedValues = {Overflow.STRING_AUTO, Overflow.STRING_SCROLL, Overflow.STRING_HIDDEN})
+ allowedValues = {Overflow.AUTO, Overflow.SCROLL, Overflow.HIDDEN})
void setOverflowX(String overflowX);
/**
@@ -222,7 +222,7 @@ public interface StyleTagDeclaration ext
@TagAttribute()
@UIComponentTagAttribute(
type = "org.apache.myfaces.tobago.layout.Overflow",
- allowedValues = {Overflow.STRING_AUTO, Overflow.STRING_SCROLL, Overflow.STRING_HIDDEN})
+ allowedValues = {Overflow.AUTO, Overflow.SCROLL, Overflow.HIDDEN})
void setOverflowY(String overflowY);
/**
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=1730974&r1=1730973&r2=1730974&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 Wed Feb 17 23:15:38 2016
@@ -26,39 +26,18 @@ public enum Overflow {
scroll;
/**
- * @deprecated Since Tobago 3.0.0 Please use {@link Overflow#auto}
- */
- public static final Overflow AUTO = auto;
-
- /**
- * @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;
-
- /**
* Internal constant to use in annotations. Please use {@link Overflow#auto}
*/
- public static final String STRING_AUTO = "auto";
+ public static final String AUTO = "auto";
/**
* Internal constant to use in annotations. Please use {@link Overflow#hidden}
*/
- public static final String STRING_HIDDEN = "hidden";
+ public static final String HIDDEN = "hidden";
/**
* Internal constant to use in annotations. Please use {@link Overflow#scroll}
*/
- public static final String STRING_SCROLL = "scroll";
+ public static final String SCROLL = "scroll";
- /**
- * @deprecated Since Tobago 3.0.0 Please use {@link Overflow:name}
- */
- public String getValue() {
- 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=1730974&r1=1730973&r2=1730974&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 Wed Feb 17 23:15:38 2016
@@ -257,12 +257,12 @@ public class Style implements Serializab
}
if (overflowX != null) {
buf.append("overflow-x:");
- buf.append(overflowX.getValue());
+ buf.append(overflowX.name());
buf.append(';');
}
if (overflowY != null) {
buf.append("overflow-y:");
- buf.append(overflowY.getValue());
+ buf.append(overflowY.name());
buf.append(';');
}
if (display != null) {
@@ -393,12 +393,12 @@ public class Style implements Serializab
}
if (overflowX != null) {
buf.append("\"overflowX\":\"");
- buf.append(overflowX.getValue());
+ buf.append(overflowX.name());
buf.append("\",");
}
if (overflowY != null) {
buf.append("\"overflowY\":\"");
- buf.append(overflowY.getValue());
+ buf.append(overflowY.name());
buf.append("\",");
}
if (display != null) {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrderByUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrderByUnitTest.java?rev=1730974&r1=1730973&r2=1730974&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrderByUnitTest.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrderByUnitTest.java Wed Feb 17 23:15:38 2016
@@ -28,4 +28,4 @@ public class OrderByUnitTest extends Enu
public void testNames() throws IllegalAccessException, NoSuchFieldException {
testNames(OrderBy.class);
}
-}
\ No newline at end of file
+}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrientationUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrientationUnitTest.java?rev=1730974&r1=1730973&r2=1730974&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrientationUnitTest.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OrientationUnitTest.java Wed Feb 17 23:15:38 2016
@@ -28,4 +28,4 @@ public class OrientationUnitTest extends
public void testNames() throws IllegalAccessException, NoSuchFieldException {
testNames(Orientation.class);
}
-}
\ No newline at end of file
+}
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OverflowUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OverflowUnitTest.java?rev=1730974&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OverflowUnitTest.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/OverflowUnitTest.java Wed Feb 17 23:15:38 2016
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.layout;
+
+import org.apache.myfaces.tobago.util.EnumUnitTest;
+import org.junit.Test;
+
+public class OverflowUnitTest extends EnumUnitTest {
+
+ @Test
+ public void testNames() throws IllegalAccessException, NoSuchFieldException {
+ testNames(Overflow.class);
+ }
+}