summaryrefslogtreecommitdiff
path: root/gnu/javax/swing/text/html/css/BorderWidth.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/javax/swing/text/html/css/BorderWidth.java')
-rw-r--r--gnu/javax/swing/text/html/css/BorderWidth.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/javax/swing/text/html/css/BorderWidth.java b/gnu/javax/swing/text/html/css/BorderWidth.java
index b717020e3..ae64c2110 100644
--- a/gnu/javax/swing/text/html/css/BorderWidth.java
+++ b/gnu/javax/swing/text/html/css/BorderWidth.java
@@ -63,4 +63,16 @@ public class BorderWidth
floatValue = 3.F;
}
+ /**
+ * Checks if the specified value makes up a valid border-width value.
+ *
+ * @param value the value to check
+ *
+ * @return <code>true</code> if the value is a valid border-width
+ */
+ public static boolean isValid(String value)
+ {
+ return value.equals("thin") || value.equals("medium")
+ || value.equals("thick") || Length.isValid(value);
+ }
}