2002/css-validator/org/w3c/css/properties/aural ACssPitch.java,1.4,1.5

Update of /sources/public/2002/css-validator/org/w3c/css/properties/aural
In directory hutz:/tmp/cvs-serv28946/aural

Modified Files:
	ACssPitch.java 
Log Message:
work continuing on background, fixed background-position

Index: ACssPitch.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/aural/ACssPitch.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ACssPitch.java	5 Jan 2010 13:49:36 -0000	1.4
+++ ACssPitch.java	7 Jan 2010 20:21:37 -0000	1.5
@@ -16,16 +16,16 @@
 import org.w3c.css.values.CssValue;
 
 /**
- *  &nbsp;&nbsp; 'pitch' <span>(or 'average pitch'
+ * &nbsp;&nbsp; 'pitch' <span>(or 'average pitch'
  * ?, what is the relationship with voice-family?)</span>
- *
- * <P>
+ * <p/>
+ * <p/>
  * <EM>Value: </EM>&lt;hertz&gt; | x-low | low | medium | high | x-high<BR>
  * <EM>Initial:</EM> medium<BR>
  * <EM>Applies to:</EM> all elements<BR>
  * <EM>Inherited:</EM> yes<BR>
  * <EM>Percentage values:</EM> NA
- *
+ * <p/>
  * <p>Specifies the average pitch of the speaking voice in hertz (Hz).
  *
  * @version $Revision$
@@ -37,8 +37,8 @@
 
     private static int[] hash_values;
 
-    private static String[] PITCH = { "x-low", "low", "medium",
-				      "high", "x-high" };
+    private static String[] PITCH = {"x-low", "low", "medium",
+            "high", "x-high"};
 
     private static CssIdent defaultValue = new CssIdent(PITCH[2]);
 
@@ -46,52 +46,52 @@
      * Create a new ACssPitch
      */
     public ACssPitch() {
-	value = defaultValue;
+        value = defaultValue;
     }
 
     /**
      * Creates a new ACssPitch
      *
      * @param expression The expression for this property
-     * @exception InvalidParamException Values are incorrect
+     * @throws InvalidParamException Values are incorrect
      */
     public ACssPitch(ApplContext ac, CssExpression expression,
-	    boolean check) throws InvalidParamException {
-	this();
+                     boolean check) throws InvalidParamException {
+        this();
 
-	if(check && expression.getCount() > 1) {
-	    throw new InvalidParamException("unrecognize", ac);
-	}
+        if (check && expression.getCount() > 1) {
+            throw new InvalidParamException("unrecognize", ac);
+        }
 
-	CssValue val = expression.getValue();
+        CssValue val = expression.getValue();
 
-	setByUser();
+        setByUser();
 
-	if (val.equals(inherit)) {
-	    val = inherit;
-	} else if (val instanceof CssIdent) {
-	    value = checkIdent(ac,(CssIdent) val);
-	} else if (val instanceof CssFrequency) {
-	    value = val;
-	} else {
-	    throw new InvalidParamException("value",
-					    expression.getValue().toString(),
-					    getPropertyName(), ac);
-	}
+        if (val.equals(inherit)) {
+            value = inherit;
+        } else if (val instanceof CssIdent) {
+            value = checkIdent(ac, (CssIdent) val);
+        } else if (val instanceof CssFrequency) {
+            value = val;
+        } else {
+            throw new InvalidParamException("value",
+                    expression.getValue().toString(),
+                    getPropertyName(), ac);
+        }
 
-	expression.next();
+        expression.next();
     }
 
     public ACssPitch(ApplContext ac, CssExpression expression)
-	    throws InvalidParamException {
-	this(ac, expression, false);
+            throws InvalidParamException {
+        this(ac, expression, false);
     }
 
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return value;
+        return value;
     }
 
 
@@ -99,21 +99,21 @@
      * Returns some usable value of this property...
      */
     public int getValue() { // vm
-	return ((Float) value.get()).intValue();
+        return ((Float) value.get()).intValue();
     }
 
     /**
      * Returns the name of this property
      */
     public String getPropertyName() {
-	return "pitch";
+        return "pitch";
     }
 
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return value.toString();
+        return value.toString();
     }
 
     /**
@@ -122,9 +122,9 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	if (((ACssStyle) style).acssPitch != null)
-	    style.addRedefinitionWarning(ac, this);
-	((ACssStyle) style).acssPitch = this;
+        if (((ACssStyle) style).acssPitch != null)
+            style.addRedefinitionWarning(ac, this);
+        ((ACssStyle) style).acssPitch = this;
     }
 
     /**
@@ -133,41 +133,41 @@
      * @param property The other property.
      */
     public boolean equals(CssProperty property) {
-	return (property instanceof ACssPitch &&
-		value.equals(((ACssPitch) property).value));
+        return (property instanceof ACssPitch &&
+                value.equals(((ACssPitch) property).value));
     }
 
     private CssIdent checkIdent(ApplContext ac, CssIdent ident) throws InvalidParamException {
-	int hash = ident.hashCode();
-	for (int i = 0; i < PITCH.length; i++) {
-	    if (hash_values[i] == hash) {
-		return ident;
-	    }
-	}
+        int hash = ident.hashCode();
+        for (int i = 0; i < PITCH.length; i++) {
+            if (hash_values[i] == hash) {
+                return ident;
+            }
+        }
 
-	throw new InvalidParamException("value",
-					ident.toString(),
-					getPropertyName(), ac);
+        throw new InvalidParamException("value",
+                ident.toString(),
+                getPropertyName(), ac);
     }
 
     /**
      * Get this property in the style.
      *
-     * @param style The style where the property is
+     * @param style   The style where the property is
      * @param resolve if true, resolve the style to find this property
      */
     public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-	if (resolve) {
-	    return ((ACssStyle) style).getPitch();
-	} else {
-	    return ((ACssStyle) style).acssPitch;
-	}
+        if (resolve) {
+            return ((ACssStyle) style).getPitch();
+        } else {
+            return ((ACssStyle) style).acssPitch;
+        }
     }
 
     static {
-	hash_values = new int[PITCH.length];
-	for (int i = 0; i < PITCH.length; i++)
-	    hash_values[i] = PITCH[i].hashCode();
+        hash_values = new int[PITCH.length];
+        for (int i = 0; i < PITCH.length; i++)
+            hash_values[i] = PITCH[i].hashCode();
     }
 }
 

Received on Thursday, 7 January 2010 20:21:40 UTC