flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [02/62] [abbrv] [partial] Merged Apache Flex 4.9.0 release branch
Date Tue, 08 Oct 2013 14:03:17 GMT
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGPaint.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGPaint.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGPaint.java
index 0bd1748..3f7bb2c 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGPaint.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGPaint.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -25,16 +26,16 @@ import org.apache.flex.forks.batik.util.CSSConstants;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.css.CSSPrimitiveValue;
 import org.w3c.dom.css.CSSValue;
-import org.w3c.flex.forks.dom.svg.SVGPaint;
+import org.w3c.dom.svg.SVGPaint;
 
 /**
  * This class implements the {@link SVGPaint} interface.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSOMSVGPaint.java,v 1.6 2005/03/15 11:24:35 deweese Exp $
+ * @version $Id: CSSOMSVGPaint.java 476924 2006-11-19 21:13:26Z dvholten $
  */
 public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
-    
+
     /**
      * Creates a new CSSOMSVGPaint.
      */
@@ -54,7 +55,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
 
     /**
      * <b>DOM</b>: Implements {@link
-     * org.w3c.flex.forks.dom.svg.SVGColor#getColorType()}.
+     * org.w3c.dom.svg.SVGColor#getColorType()}.
      */
     public short getColorType() {
         throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
@@ -62,7 +63,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
 
     /**
      * <b>DOM</b>: Implements {@link
-     * org.w3c.flex.forks.dom.svg.SVGPaint#getPaintType()}.
+     * org.w3c.dom.svg.SVGPaint#getPaintType()}.
      */
     public short getPaintType() {
         Value value = valueProvider.getValue();
@@ -121,7 +122,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
     }
 
     /**
-     * <b>DOM</b>: Implements {@link org.w3c.flex.forks.dom.svg.SVGPaint#getUri()}.
+     * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGPaint#getUri()}.
      */
     public String getUri() {
         switch (getPaintType()) {
@@ -138,37 +139,37 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
     }
 
     /**
-     * <b>DOM</b>: Implements {@link org.w3c.flex.forks.dom.svg.SVGPaint#setUri(String)}.
+     * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGPaint#setUri(String)}.
      */
     public void setUri(String uri) {
-	if (handler == null) {
+        if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
-	} else {
+        } else {
             ((PaintModificationHandler)handler).uriChanged(uri);
-	}
+        }
     }
 
     /**
      * <b>DOM</b>: Implements {@link
-     * org.w3c.flex.forks.dom.svg.SVGPaint#setPaint(short,String,String,String)}.
+     * org.w3c.dom.svg.SVGPaint#setPaint(short,String,String,String)}.
      */
     public void setPaint(short paintType, String uri,
                          String rgbColor, String iccColor) {
-	if (handler == null) {
+        if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
-	} else {
+        } else {
             ((PaintModificationHandler)handler).paintChanged
                 (paintType, uri, rgbColor, iccColor);
-	}
+        }
     }
 
     /**
      * To manage the modifications on a SVGPaint value.
      */
     public interface PaintModificationHandler extends ModificationHandler {
-        
+
         /**
          * Called when the URI has been modified.
          */
@@ -196,11 +197,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
          */
         public void redTextChanged(String text) throws DOMException {
             switch (getPaintType()) {
-            case SVG_PAINTTYPE_RGBCOLOR: 
+            case SVG_PAINTTYPE_RGBCOLOR:
                 text = "rgb(" +
                     text + ", " +
                     getValue().getGreen().getCssText() + ", " +
-                    getValue().getBlue().getCssText() + ")";
+                    getValue().getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
@@ -216,7 +217,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                     " rgb(" +
                     text + ", " +
                     getValue().item(1).getGreen().getCssText() + ", " +
-                    getValue().item(1).getBlue().getCssText() + ")";
+                    getValue().item(1).getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
@@ -242,11 +243,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
             throws DOMException {
             String text;
             switch (getPaintType()) {
-            case SVG_PAINTTYPE_RGBCOLOR: 
+            case SVG_PAINTTYPE_RGBCOLOR:
                 text = "rgb(" +
                     FloatValue.getCssText(unit, value) + ", " +
                     getValue().getGreen().getCssText() + ", " +
-                    getValue().getBlue().getCssText() + ")";
+                    getValue().getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
@@ -262,7 +263,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                     " rgb(" +
                     FloatValue.getCssText(unit, value) + ", " +
                     getValue().item(1).getGreen().getCssText() + ", " +
-                    getValue().item(1).getBlue().getCssText() + ")";
+                    getValue().item(1).getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
@@ -286,11 +287,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
          */
         public void greenTextChanged(String text) throws DOMException {
             switch (getPaintType()) {
-            case SVG_PAINTTYPE_RGBCOLOR: 
+            case SVG_PAINTTYPE_RGBCOLOR:
                 text = "rgb(" +
                     getValue().getRed().getCssText() + ", " +
                     text + ", " +
-                    getValue().getBlue().getCssText() + ")";
+                    getValue().getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
@@ -306,7 +307,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                     " rgb(" +
                     getValue().item(1).getRed().getCssText() + ", " +
                     text + ", " +
-                    getValue().item(1).getBlue().getCssText() + ")";
+                    getValue().item(1).getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
@@ -332,11 +333,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
             throws DOMException {
             String text;
             switch (getPaintType()) {
-            case SVG_PAINTTYPE_RGBCOLOR: 
+            case SVG_PAINTTYPE_RGBCOLOR:
                 text = "rgb(" +
                     getValue().getRed().getCssText() + ", " +
                     FloatValue.getCssText(unit, value) + ", " +
-                    getValue().getBlue().getCssText() + ")";
+                    getValue().getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
@@ -352,7 +353,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                     " rgb(" +
                     getValue().item(1).getRed().getCssText() + ", " +
                     FloatValue.getCssText(unit, value) + ", " +
-                    getValue().item(1).getBlue().getCssText() + ")";
+                    getValue().item(1).getBlue().getCssText() + ')';
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
@@ -376,11 +377,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
          */
         public void blueTextChanged(String text) throws DOMException {
             switch (getPaintType()) {
-            case SVG_PAINTTYPE_RGBCOLOR: 
+            case SVG_PAINTTYPE_RGBCOLOR:
                 text = "rgb(" +
                     getValue().getRed().getCssText() + ", " +
                     getValue().getGreen().getCssText() + ", " +
-                    text + ")";
+                    text + ')';
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
@@ -422,11 +423,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
             throws DOMException {
             String text;
             switch (getPaintType()) {
-            case SVG_PAINTTYPE_RGBCOLOR: 
+            case SVG_PAINTTYPE_RGBCOLOR:
                 text = "rgb(" +
                     getValue().getRed().getCssText() + ", " +
                     getValue().getGreen().getCssText() + ", " +
-                    FloatValue.getCssText(unit, value) + ")";
+                    FloatValue.getCssText(unit, value) + ')';
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
@@ -442,7 +443,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                     " rgb(" +
                     getValue().item(1).getRed().getCssText() + ", " +
                     getValue().item(1).getGreen().getCssText() + ", " +
-                    FloatValue.getCssText(unit, value) + ")";
+                    FloatValue.getCssText(unit, value) + ')';
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
@@ -460,7 +461,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
             }
             textChanged(text);
         }
-        
+
         /**
          * Called when the RGBColor text has changed.
          */
@@ -474,11 +475,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR:
-                text = getValue().item(0).getCssText() + " " + text;
+                text = getValue().item(0).getCssText() + ' ' + text;
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
-                text = getValue().item(0).getCssText() + " " + text + " " +
+                text = getValue().item(0).getCssText() + ' ' + text + ' ' +
                     getValue().item(2).getCssText();
                 break;
 
@@ -496,12 +497,12 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
             throws DOMException {
             switch (getPaintType()) {
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
-                textChanged(rgb + " " + icc);
+                textChanged(rgb + ' ' + icc);
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
-                textChanged(getValue().item(0).getCssText() + " " +
-                            rgb + " " + icc);
+                textChanged(getValue().item(0).getCssText() + ' ' +
+                            rgb + ' ' + icc);
                 break;
 
             default:
@@ -525,7 +526,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
-                textChanged(rgb + " " + icc);
+                textChanged(rgb + ' ' + icc);
                 break;
 
             default:
@@ -545,25 +546,25 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 sb.append(cp);
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 for (int i = 0; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 sb.append(cp);
                 iccc = (ICCColor)getValue().item(1);
                 for (int i = 0; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -584,18 +585,18 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 sb.append(" icc-color(");
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -616,22 +617,22 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 sb.append(" icc-color(");
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -653,37 +654,37 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < idx; i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
                 for (int i = idx; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < idx; i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
                 for (int i = idx; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -705,37 +706,37 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < idx; i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
                 for (int i = idx + 1; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < idx; i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
                 for (int i = idx + 1; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -757,33 +758,33 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < idx; i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
                 for (int i = idx + 1; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < idx; i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
                 for (int i = idx + 1; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -805,29 +806,29 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 ICCColor iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                 sb = new StringBuffer(getValue().item(0).getCssText());
-                sb.append(" ");
+                sb.append( ' ' );
                 sb.append(getValue().item(1).getCssText());
                 sb.append(" icc-color(");
                 iccc = (ICCColor)getValue().item(1);
                 sb.append(iccc.getColorProfile());
                 for (int i = 0; i < iccc.getLength(); i++) {
-                    sb.append(",");
+                    sb.append( ',' );
                     sb.append(iccc.getColor(i));
                 }
-                sb.append(",");
+                sb.append( ',' );
                 sb.append(f);
-                sb.append(")");
+                sb.append( ')' );
                 textChanged(sb.toString());
                 break;
 
@@ -863,11 +864,11 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 break;
 
             case SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
-                textChanged(rgb + " " + icc);
+                textChanged(rgb + ' ' + icc);
                 break;
 
             case SVG_PAINTTYPE_URI:
-                textChanged("url(" + uri + ")");
+                textChanged("url(" + uri + ')' );
                 break;
 
             case SVG_PAINTTYPE_URI_NONE:
@@ -883,7 +884,7 @@ public class CSSOMSVGPaint extends CSSOMSVGColor implements SVGPaint {
                 break;
 
             case SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
-                textChanged("url(" + uri + ") " + rgb + " " + icc);
+                textChanged("url(" + uri + ") " + rgb + ' ' + icc);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGStyleDeclaration.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGStyleDeclaration.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGStyleDeclaration.java
index 566eaaa..ade5535 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGStyleDeclaration.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGStyleDeclaration.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -30,7 +31,7 @@ import org.w3c.dom.css.CSSValue;
  * This class represents a SVG style declaration.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSOMSVGStyleDeclaration.java,v 1.6 2004/08/18 07:12:47 vhardy Exp $
+ * @version $Id: CSSOMSVGStyleDeclaration.java 475477 2006-11-15 22:44:28Z cam $
  */
 public class CSSOMSVGStyleDeclaration extends CSSOMStyleDeclaration {
     
@@ -171,5 +172,4 @@ public class CSSOMSVGStyleDeclaration extends CSSOMStyleDeclaration {
         }
 
     }
-    
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGViewCSS.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGViewCSS.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGViewCSS.java
index 22f95d1..78f684e 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGViewCSS.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMSVGViewCSS.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -27,7 +28,7 @@ import org.w3c.dom.css.CSSStyleDeclaration;
  * of the elements of a SVG document.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSOMSVGViewCSS.java,v 1.4 2004/08/18 07:12:47 vhardy Exp $
+ * @version $Id: CSSOMSVGViewCSS.java 475477 2006-11-15 22:44:28Z cam $
  */
 public class CSSOMSVGViewCSS extends CSSOMViewCSS {
     

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStoredStyleDeclaration.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStoredStyleDeclaration.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStoredStyleDeclaration.java
new file mode 100644
index 0000000..e97483f
--- /dev/null
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStoredStyleDeclaration.java
@@ -0,0 +1,115 @@
+/*
+
+   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.flex.forks.batik.css.dom;
+
+import org.apache.flex.forks.batik.css.engine.CSSEngine;
+import org.apache.flex.forks.batik.css.engine.StyleDeclaration;
+import org.apache.flex.forks.batik.css.engine.StyleDeclarationProvider;
+import org.apache.flex.forks.batik.css.engine.value.Value;
+
+/**
+ * A class for SVG style declarations that store their properties in a
+ * {@link org.apache.flex.forks.batik.css.engine.StyleDeclaration}.
+ *
+ * @author <a href="mailto:cam%40mcc%2eid%2eau">Cameron McCormack</a>
+ * @version $Id: CSSOMStoredStyleDeclaration.java 475477 2006-11-15 22:44:28Z cam $
+ */
+public abstract class CSSOMStoredStyleDeclaration
+    extends CSSOMSVGStyleDeclaration
+    implements CSSOMStyleDeclaration.ValueProvider,
+               CSSOMStyleDeclaration.ModificationHandler,
+               StyleDeclarationProvider {
+
+    /**
+     * The object storing the properties.
+     */
+    protected StyleDeclaration declaration;
+
+    /**
+     * Creates a new CSSOMStoredStyleDeclaration.
+     */
+    public CSSOMStoredStyleDeclaration(CSSEngine eng) {
+        super(null, null, eng);
+        valueProvider = this;
+        setModificationHandler(this);
+    }
+
+    /**
+     * Returns the object storing the properties of this style declaration.
+     */
+    public StyleDeclaration getStyleDeclaration() {
+        return declaration;
+    }
+
+    /**
+     * Sets the object storing the properties of this style declaration.
+     */
+    public void setStyleDeclaration(StyleDeclaration sd) {
+        declaration = sd;
+    }
+
+    // ValueProvider /////////////////////////////////////////////////////////
+
+    /**
+     * Returns the current value associated with this object.
+     */
+    public Value getValue(String name) {
+        int idx = cssEngine.getPropertyIndex(name);
+        for (int i = 0; i < declaration.size(); i++) {
+            if (idx == declaration.getIndex(i)) {
+                return declaration.getValue(i);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Tells whether the given property is important.
+     */
+    public boolean isImportant(String name) {
+        int idx = cssEngine.getPropertyIndex(name);
+        for (int i = 0; i < declaration.size(); i++) {
+            if (idx == declaration.getIndex(i)) {
+                return declaration.getPriority(i);
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Returns the text of the declaration.
+     */
+    public String getText() {
+        return declaration.toString(cssEngine);
+    }
+
+    /**
+     * Returns the length of the declaration.
+     */
+    public int getLength() {
+        return declaration.size();
+    }
+
+    /**
+     * Returns the value at the given.
+     */
+    public String item(int idx) {
+        return cssEngine.getPropertyName(declaration.getIndex(idx));
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStyleDeclaration.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStyleDeclaration.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStyleDeclaration.java
index 768e3d2..0cad0bf 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStyleDeclaration.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMStyleDeclaration.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -30,7 +31,7 @@ import org.w3c.dom.css.CSSValue;
  * This class represents a style declaration.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSOMStyleDeclaration.java,v 1.7 2004/08/18 07:12:47 vhardy Exp $
+ * @version $Id: CSSOMStyleDeclaration.java 475685 2006-11-16 11:16:05Z cam $
  */
 public class CSSOMStyleDeclaration implements CSSStyleDeclaration {
 
@@ -82,13 +83,13 @@ public class CSSOMStyleDeclaration implements CSSStyleDeclaration {
      * org.w3c.dom.css.CSSStyleDeclaration#setCssText(String)}.
      */
     public void setCssText(String cssText) throws DOMException {
-	if (handler == null) {
+        if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
-	} else {
+        } else {
             values = null;
             handler.textChanged(cssText);
-	}
+        }
     }
 
     /**
@@ -148,7 +149,7 @@ public class CSSOMStyleDeclaration implements CSSStyleDeclaration {
      * org.w3c.dom.css.CSSStyleDeclaration#setProperty(String,String,String)}.
      */
     public void setProperty(String propertyName, String value, String prio)
-	throws DOMException {
+        throws DOMException {
         if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
@@ -235,7 +236,6 @@ public class CSSOMStyleDeclaration implements CSSStyleDeclaration {
          * Returns the value at the given.
          */
         String item(int idx);
-
     }
 
     /**
@@ -258,7 +258,6 @@ public class CSSOMStyleDeclaration implements CSSStyleDeclaration {
          */
         void propertyChanged(String name, String value, String prio)
             throws DOMException;
-
     }
 
     /**
@@ -307,6 +306,5 @@ public class CSSOMStyleDeclaration implements CSSStyleDeclaration {
         public Value getValue() {
             return CSSOMStyleDeclaration.this.valueProvider.getValue(property);
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMValue.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMValue.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMValue.java
index 772507d..f09d9d0 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMValue.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMValue.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -35,7 +36,7 @@ import org.w3c.dom.css.Rect;
  * {@link org.w3c.dom.css.CSSValueList} interfaces.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSOMValue.java,v 1.5 2004/08/18 07:12:47 vhardy Exp $
+ * @version $Id: CSSOMValue.java 504107 2007-02-06 12:32:18Z dvholten $
  */
 public class CSSOMValue
     implements CSSPrimitiveValue,
@@ -43,7 +44,7 @@ public class CSSOMValue
                Counter,
                Rect,
                RGBColor {
-    
+
     /**
      * The associated value.
      */
@@ -120,12 +121,12 @@ public class CSSOMValue
      * org.w3c.dom.css.CSSValue#setCssText(String)}.
      */
     public void setCssText(String cssText) throws DOMException {
-	if (handler == null) {
+        if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
-	} else {
+        } else {
             handler.textChanged(cssText);
-	}
+        }
     }
 
     /**
@@ -150,12 +151,12 @@ public class CSSOMValue
      */
     public void setFloatValue(short unitType, float floatValue)
         throws DOMException {
-	if (handler == null) {
+        if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
-	} else {
+        } else {
             handler.floatValueChanged(unitType, floatValue);
-	}
+        }
     }
 
     /**
@@ -170,42 +171,42 @@ public class CSSOMValue
      * Converts the actual float value to the given unit type.
      */
     public static float convertFloatValue(short unitType, Value value) {
-	switch (unitType) {
-	case CSSPrimitiveValue.CSS_NUMBER:
-	case CSSPrimitiveValue.CSS_PERCENTAGE:
-	case CSSPrimitiveValue.CSS_EMS:
-	case CSSPrimitiveValue.CSS_EXS:
-	case CSSPrimitiveValue.CSS_DIMENSION:
-	case CSSPrimitiveValue.CSS_PX:
-	    if (value.getPrimitiveType() == unitType) {
-		return value.getFloatValue();
-	    }
-	    break;
-	case CSSPrimitiveValue.CSS_CM:
-	    return toCentimeters(value);
-	case CSSPrimitiveValue.CSS_MM:
-	    return toMillimeters(value);
-	case CSSPrimitiveValue.CSS_IN:
-	    return toInches(value);
-	case CSSPrimitiveValue.CSS_PT:
-	    return toPoints(value);
-	case CSSPrimitiveValue.CSS_PC:
-	    return toPicas(value);
-	case CSSPrimitiveValue.CSS_DEG:
-	    return toDegrees(value);
-	case CSSPrimitiveValue.CSS_RAD:
-	    return toRadians(value);
-	case CSSPrimitiveValue.CSS_GRAD:
-	    return toGradians(value);
-	case CSSPrimitiveValue.CSS_MS:
-	    return toMilliseconds(value);
-	case CSSPrimitiveValue.CSS_S:
-	    return toSeconds(value);
-	case CSSPrimitiveValue.CSS_HZ:
-	    return toHertz(value);
-	case CSSPrimitiveValue.CSS_KHZ:
-	    return tokHertz(value);
-	}
+        switch (unitType) {
+        case CSSPrimitiveValue.CSS_NUMBER:
+        case CSSPrimitiveValue.CSS_PERCENTAGE:
+        case CSSPrimitiveValue.CSS_EMS:
+        case CSSPrimitiveValue.CSS_EXS:
+        case CSSPrimitiveValue.CSS_DIMENSION:
+        case CSSPrimitiveValue.CSS_PX:
+            if (value.getPrimitiveType() == unitType) {
+                return value.getFloatValue();
+            }
+            break;
+        case CSSPrimitiveValue.CSS_CM:
+            return toCentimeters(value);
+        case CSSPrimitiveValue.CSS_MM:
+            return toMillimeters(value);
+        case CSSPrimitiveValue.CSS_IN:
+            return toInches(value);
+        case CSSPrimitiveValue.CSS_PT:
+            return toPoints(value);
+        case CSSPrimitiveValue.CSS_PC:
+            return toPicas(value);
+        case CSSPrimitiveValue.CSS_DEG:
+            return toDegrees(value);
+        case CSSPrimitiveValue.CSS_RAD:
+            return toRadians(value);
+        case CSSPrimitiveValue.CSS_GRAD:
+            return toGradians(value);
+        case CSSPrimitiveValue.CSS_MS:
+            return toMilliseconds(value);
+        case CSSPrimitiveValue.CSS_S:
+            return toSeconds(value);
+        case CSSPrimitiveValue.CSS_HZ:
+            return toHertz(value);
+        case CSSPrimitiveValue.CSS_KHZ:
+            return tokHertz(value);
+        }
         throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
     }
 
@@ -213,204 +214,204 @@ public class CSSOMValue
      * Converts the current value into centimeters.
      */
     protected static float toCentimeters(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_CM:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_MM:
-	    return (value.getFloatValue() / 10);
-	case CSSPrimitiveValue.CSS_IN:
-	    return (value.getFloatValue() * 2.54f);
-	case CSSPrimitiveValue.CSS_PT:
-	    return (value.getFloatValue() * 2.54f / 72);
-	case CSSPrimitiveValue.CSS_PC:
-	    return (value.getFloatValue() * 2.54f / 6);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_CM:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_MM:
+            return (value.getFloatValue() / 10);
+        case CSSPrimitiveValue.CSS_IN:
+            return (value.getFloatValue() * 2.54f);
+        case CSSPrimitiveValue.CSS_PT:
+            return (value.getFloatValue() * 2.54f / 72);
+        case CSSPrimitiveValue.CSS_PC:
+            return (value.getFloatValue() * 2.54f / 6);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into inches.
      */
     protected static float toInches(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_CM:
-	    return (value.getFloatValue() / 2.54f);
-	case CSSPrimitiveValue.CSS_MM:
-	    return (value.getFloatValue() / 25.4f);
-	case CSSPrimitiveValue.CSS_IN:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_PT:
-	    return (value.getFloatValue() / 72);
-	case CSSPrimitiveValue.CSS_PC:
-	    return (value.getFloatValue() / 6);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_CM:
+            return (value.getFloatValue() / 2.54f);
+        case CSSPrimitiveValue.CSS_MM:
+            return (value.getFloatValue() / 25.4f);
+        case CSSPrimitiveValue.CSS_IN:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_PT:
+            return (value.getFloatValue() / 72);
+        case CSSPrimitiveValue.CSS_PC:
+            return (value.getFloatValue() / 6);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into millimeters.
      */
     protected static float toMillimeters(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_CM:
-	    return (value.getFloatValue() * 10);
-	case CSSPrimitiveValue.CSS_MM:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_IN:
-	    return (value.getFloatValue() * 25.4f);
-	case CSSPrimitiveValue.CSS_PT:
-	    return (value.getFloatValue() * 25.4f / 72);
-	case CSSPrimitiveValue.CSS_PC:
-	    return (value.getFloatValue() * 25.4f / 6);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_CM:
+            return (value.getFloatValue() * 10);
+        case CSSPrimitiveValue.CSS_MM:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_IN:
+            return (value.getFloatValue() * 25.4f);
+        case CSSPrimitiveValue.CSS_PT:
+            return (value.getFloatValue() * 25.4f / 72);
+        case CSSPrimitiveValue.CSS_PC:
+            return (value.getFloatValue() * 25.4f / 6);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into points.
      */
     protected static float toPoints(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_CM:
-	    return (value.getFloatValue() * 72 / 2.54f);
-	case CSSPrimitiveValue.CSS_MM:
-	    return (value.getFloatValue() * 72 / 25.4f);
-	case CSSPrimitiveValue.CSS_IN:
-	    return (value.getFloatValue() * 72);
-	case CSSPrimitiveValue.CSS_PT:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_PC:
-	    return (value.getFloatValue() * 12);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_CM:
+            return (value.getFloatValue() * 72 / 2.54f);
+        case CSSPrimitiveValue.CSS_MM:
+            return (value.getFloatValue() * 72 / 25.4f);
+        case CSSPrimitiveValue.CSS_IN:
+            return (value.getFloatValue() * 72);
+        case CSSPrimitiveValue.CSS_PT:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_PC:
+            return (value.getFloatValue() * 12);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into picas.
      */
     protected static float toPicas(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_CM:
-	    return (value.getFloatValue() * 6 / 2.54f);
-	case CSSPrimitiveValue.CSS_MM:
-	    return (value.getFloatValue() * 6 / 25.4f);
-	case CSSPrimitiveValue.CSS_IN:
-	    return (value.getFloatValue() * 6);
-	case CSSPrimitiveValue.CSS_PT:
-	    return (value.getFloatValue() / 12);
-	case CSSPrimitiveValue.CSS_PC:
-	    return value.getFloatValue();
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_CM:
+            return (value.getFloatValue() * 6 / 2.54f);
+        case CSSPrimitiveValue.CSS_MM:
+            return (value.getFloatValue() * 6 / 25.4f);
+        case CSSPrimitiveValue.CSS_IN:
+            return (value.getFloatValue() * 6);
+        case CSSPrimitiveValue.CSS_PT:
+            return (value.getFloatValue() / 12);
+        case CSSPrimitiveValue.CSS_PC:
+            return value.getFloatValue();
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into degrees.
      */
     protected static float toDegrees(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_DEG:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_RAD:
-	    return (float)(value.getFloatValue() * 180 / Math.PI);
-	case CSSPrimitiveValue.CSS_GRAD:
-	    return (value.getFloatValue() * 9 / 5);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_DEG:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_RAD:
+            return (float) Math.toDegrees( value.getFloatValue() );
+        case CSSPrimitiveValue.CSS_GRAD:
+            return (value.getFloatValue() * 9 / 5);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into radians.
      */
     protected static float toRadians(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_DEG:
-	    return (value.getFloatValue() * 5 / 9);
-	case CSSPrimitiveValue.CSS_RAD:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_GRAD:
-	    return (float)(value.getFloatValue() * 100 / Math.PI);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_DEG:
+            return (value.getFloatValue() * 5 / 9);      // todo ??
+        case CSSPrimitiveValue.CSS_RAD:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_GRAD:
+            return (float)(value.getFloatValue() * 100 / Math.PI);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into gradians.
      */
     protected static float toGradians(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_DEG:
-	    return (float)(value.getFloatValue() * Math.PI / 180);
-	case CSSPrimitiveValue.CSS_RAD:
-	    return (float)(value.getFloatValue() * Math.PI / 100);
-	case CSSPrimitiveValue.CSS_GRAD:
-	    return value.getFloatValue();
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_DEG:
+            return (float)(value.getFloatValue() * Math.PI / 180);   // todo ????
+        case CSSPrimitiveValue.CSS_RAD:
+            return (float)(value.getFloatValue() * Math.PI / 100);
+        case CSSPrimitiveValue.CSS_GRAD:
+            return value.getFloatValue();
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into milliseconds.
      */
     protected static float toMilliseconds(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_MS:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_S:
-	    return (value.getFloatValue() * 1000);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_MS:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_S:
+            return (value.getFloatValue() * 1000);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
-	
+
     /**
      * Converts the current value into seconds.
      */
     protected static float toSeconds(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_MS:
-	    return (value.getFloatValue() / 1000);
-	case CSSPrimitiveValue.CSS_S:
-	    return value.getFloatValue();
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_MS:
+            return (value.getFloatValue() / 1000);
+        case CSSPrimitiveValue.CSS_S:
+            return value.getFloatValue();
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
-	
+
     /**
      * Converts the current value into Hertz.
      */
     protected static float toHertz(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_HZ:
-	    return value.getFloatValue();
-	case CSSPrimitiveValue.CSS_KHZ:
-	    return (value.getFloatValue() / 1000);
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_HZ:
+            return value.getFloatValue();
+        case CSSPrimitiveValue.CSS_KHZ:
+            return (value.getFloatValue() / 1000);
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
     /**
      * Converts the current value into kHertz.
      */
     protected static float tokHertz(Value value) {
-	switch (value.getPrimitiveType()) {
-	case CSSPrimitiveValue.CSS_HZ:
-	    return (value.getFloatValue() * 1000);
-	case CSSPrimitiveValue.CSS_KHZ:
-	    return value.getFloatValue();
-	default:
+        switch (value.getPrimitiveType()) {
+        case CSSPrimitiveValue.CSS_HZ:
+            return (value.getFloatValue() * 1000);
+        case CSSPrimitiveValue.CSS_KHZ:
+            return value.getFloatValue();
+        default:
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
-	}
+        }
     }
 
    /**
@@ -419,12 +420,12 @@ public class CSSOMValue
      */
     public void setStringValue(short stringType, String stringValue)
         throws DOMException {
-	if (handler == null) {
+        if (handler == null) {
             throw new DOMException
                 (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
-	} else {
+        } else {
             handler.stringValueChanged(stringType, stringValue);
-	}
+        }
     }
 
     /**
@@ -480,9 +481,7 @@ public class CSSOMValue
             items = new CSSValue[valueProvider.getValue().getLength()];
         } else if (items.length < len) {
             CSSValue[] nitems = new CSSValue[len];
-            for (int i = 0; i < items.length; i++) {
-                nitems[i] = items[i];
-            }
+            System.arraycopy( items, 0, nitems, 0, items.length );
             items = nitems;
         }
         CSSValue result = items[index];
@@ -531,7 +530,7 @@ public class CSSOMValue
     /**
      * <b>DOM</b>: Implements {@link org.w3c.dom.css.Rect#getRight()}.
      */
-    public CSSPrimitiveValue getRight() { 
+    public CSSPrimitiveValue getRight() {
         valueProvider.getValue().getRight();
         if (rightComponent == null) {
             rightComponent = new RightComponent();
@@ -755,11 +754,12 @@ public class CSSOMValue
          * Called when the left value text has changed.
          */
         public void leftTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rect(" +
-                getValue().getTop().getCssText() + ", " +
-                getValue().getRight().getCssText() + ", " +
-                getValue().getBottom().getCssText() + ", " +
-                text + ")";
+                val.getTop().getCssText() + ", " +
+                val.getRight().getCssText() + ", " +
+                val.getBottom().getCssText() + ", " +
+                text + ')';
             textChanged(text);
         }
 
@@ -768,11 +768,12 @@ public class CSSOMValue
          */
         public void leftFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rect(" +
-                getValue().getTop().getCssText() + ", " +
-                getValue().getRight().getCssText() + ", " +
-                getValue().getBottom().getCssText() + ", " +
-                FloatValue.getCssText(unit, value) + ")";
+                val.getTop().getCssText() + ", " +
+                val.getRight().getCssText() + ", " +
+                val.getBottom().getCssText() + ", " +
+                FloatValue.getCssText(unit, value) + ')';
             textChanged(text);
         }
 
@@ -780,11 +781,12 @@ public class CSSOMValue
          * Called when the top value text has changed.
          */
         public void topTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rect(" +
                 text + ", " +
-                getValue().getRight().getCssText() + ", " +
-                getValue().getBottom().getCssText() + ", " +
-                getValue().getLeft().getCssText() + ")";
+                val.getRight().getCssText() + ", " +
+                val.getBottom().getCssText() + ", " +
+                val.getLeft().getCssText() + ')';
             textChanged(text);
         }
 
@@ -793,11 +795,12 @@ public class CSSOMValue
          */
         public void topFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rect(" +
                 FloatValue.getCssText(unit, value) + ", " +
-                getValue().getRight().getCssText() + ", " +
-                getValue().getBottom().getCssText() + ", " +
-                getValue().getLeft().getCssText() + ")";
+                val.getRight().getCssText() + ", " +
+                val.getBottom().getCssText() + ", " +
+                val.getLeft().getCssText() + ')';
             textChanged(text);
         }
 
@@ -805,11 +808,12 @@ public class CSSOMValue
          * Called when the right value text has changed.
          */
         public void rightTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rect(" +
-                getValue().getTop().getCssText() + ", " +
+                val.getTop().getCssText() + ", " +
                 text + ", " +
-                getValue().getBottom().getCssText() + ", " +
-                getValue().getLeft().getCssText() + ")";
+                val.getBottom().getCssText() + ", " +
+                val.getLeft().getCssText() + ')';
             textChanged(text);
         }
 
@@ -818,11 +822,12 @@ public class CSSOMValue
          */
         public void rightFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rect(" +
-                getValue().getTop().getCssText() + ", " +
+                val.getTop().getCssText() + ", " +
                 FloatValue.getCssText(unit, value) + ", " +
-                getValue().getBottom().getCssText() + ", " +
-                getValue().getLeft().getCssText() + ")";
+                val.getBottom().getCssText() + ", " +
+                val.getLeft().getCssText() + ')';
             textChanged(text);
         }
 
@@ -830,11 +835,12 @@ public class CSSOMValue
          * Called when the bottom value text has changed.
          */
         public void bottomTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rect(" +
-                getValue().getTop().getCssText() + ", " +
-                getValue().getRight().getCssText() + ", " +
+                val.getTop().getCssText() + ", " +
+                val.getRight().getCssText() + ", " +
                 text + ", " +
-                getValue().getLeft().getCssText() + ")";
+                val.getLeft().getCssText() + ')';
             textChanged(text);
         }
 
@@ -843,11 +849,12 @@ public class CSSOMValue
          */
         public void bottomFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rect(" +
-                getValue().getTop().getCssText() + ", " +
-                getValue().getRight().getCssText() + ", " +
+                val.getTop().getCssText() + ", " +
+                val.getRight().getCssText() + ", " +
                 FloatValue.getCssText(unit, value) + ", " +
-                getValue().getLeft().getCssText() + ")";
+                val.getLeft().getCssText() + ')';
             textChanged(text);
         }
 
@@ -855,10 +862,11 @@ public class CSSOMValue
          * Called when the red value text has changed.
          */
         public void redTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rgb(" +
                 text + ", " +
-                getValue().getGreen().getCssText() + ", " +
-                getValue().getBlue().getCssText() + ")";
+                val.getGreen().getCssText() + ", " +
+                val.getBlue().getCssText() + ')';
             textChanged(text);
         }
 
@@ -867,10 +875,11 @@ public class CSSOMValue
          */
         public void redFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rgb(" +
                 FloatValue.getCssText(unit, value) + ", " +
-                getValue().getGreen().getCssText() + ", " +
-                getValue().getBlue().getCssText() + ")";
+                val.getGreen().getCssText() + ", " +
+                val.getBlue().getCssText() + ')';
             textChanged(text);
         }
 
@@ -878,10 +887,11 @@ public class CSSOMValue
          * Called when the green value text has changed.
          */
         public void greenTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rgb(" +
-                getValue().getRed().getCssText() + ", " +
+                val.getRed().getCssText() + ", " +
                 text + ", " +
-                getValue().getBlue().getCssText() + ")";
+                val.getBlue().getCssText() + ')';
             textChanged(text);
         }
 
@@ -890,10 +900,11 @@ public class CSSOMValue
          */
         public void greenFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rgb(" +
-                getValue().getRed().getCssText() + ", " +
+                val.getRed().getCssText() + ", " +
                 FloatValue.getCssText(unit, value) + ", " +
-                getValue().getBlue().getCssText() + ")";
+                val.getBlue().getCssText() + ')';
             textChanged(text);
         }
 
@@ -901,10 +912,11 @@ public class CSSOMValue
          * Called when the blue value text has changed.
          */
         public void blueTextChanged(String text) throws DOMException {
+            final Value val = getValue();
             text = "rgb(" +
-                getValue().getRed().getCssText() + ", " +
-                getValue().getGreen().getCssText() + ", " +
-                text + ")";
+                val.getRed().getCssText() + ", " +
+                val.getGreen().getCssText() + ", " +
+                text + ')';
             textChanged(text);
         }
 
@@ -913,10 +925,11 @@ public class CSSOMValue
          */
         public void blueFloatValueChanged(short unit, float value)
             throws DOMException {
+            final Value val = getValue();
             String text = "rgb(" +
-                getValue().getRed().getCssText() + ", " +
-                getValue().getGreen().getCssText() + ", " +
-                FloatValue.getCssText(unit, value) + ")";
+                val.getRed().getCssText() + ", " +
+                val.getGreen().getCssText() + ", " +
+                FloatValue.getCssText(unit, value) + ')';
             textChanged(text);
         }
 
@@ -925,13 +938,13 @@ public class CSSOMValue
          */
         public void listTextChanged(int idx, String text) throws DOMException {
             ListValue lv = (ListValue)getValue();
-            StringBuffer sb = new StringBuffer();
+            int len = lv.getLength();
+            StringBuffer sb = new StringBuffer( len * 8 );
             for (int i = 0; i < idx; i++) {
                 sb.append(lv.item(i).getCssText());
                 sb.append(lv.getSeparatorChar());
             }
             sb.append(text);
-            int len = lv.getLength();
             for (int i = idx + 1; i < len; i++) {
                 sb.append(lv.getSeparatorChar());
                 sb.append(lv.item(i).getCssText());
@@ -946,13 +959,13 @@ public class CSSOMValue
         public void listFloatValueChanged(int idx, short unit, float value)
             throws DOMException {
             ListValue lv = (ListValue)getValue();
-            StringBuffer sb = new StringBuffer();
+            int len = lv.getLength();
+            StringBuffer sb = new StringBuffer( len * 8 );
             for (int i = 0; i < idx; i++) {
                 sb.append(lv.item(i).getCssText());
                 sb.append(lv.getSeparatorChar());
             }
             sb.append(FloatValue.getCssText(unit, value));
-            int len = lv.getLength();
             for (int i = idx + 1; i < len; i++) {
                 sb.append(lv.getSeparatorChar());
                 sb.append(lv.item(i).getCssText());
@@ -966,13 +979,13 @@ public class CSSOMValue
         public void listStringValueChanged(int idx, short unit, String value)
             throws DOMException {
             ListValue lv = (ListValue)getValue();
-            StringBuffer sb = new StringBuffer();
+            int len = lv.getLength();
+            StringBuffer sb = new StringBuffer( len * 8 );
             for (int i = 0; i < idx; i++) {
                 sb.append(lv.item(i).getCssText());
                 sb.append(lv.getSeparatorChar());
             }
             sb.append(StringValue.getCssText(unit, value));
-            int len = lv.getLength();
             for (int i = idx + 1; i < len; i++) {
                 sb.append(lv.getSeparatorChar());
                 sb.append(lv.item(i).getCssText());
@@ -1030,7 +1043,7 @@ public class CSSOMValue
         public String getStringValue() throws DOMException {
             return valueProvider.getValue().getStringValue();
         }
-        
+
         /**
          * <b>DOM</b>: Implements {@link
          * org.w3c.dom.css.CSSPrimitiveValue#getCounterValue()}.
@@ -1038,7 +1051,7 @@ public class CSSOMValue
         public Counter getCounterValue() throws DOMException {
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
         }
-        
+
         /**
          * <b>DOM</b>: Implements {@link
          * org.w3c.dom.css.CSSPrimitiveValue#getRectValue()}.
@@ -1064,7 +1077,7 @@ public class CSSOMValue
         public int getLength() {
             throw new DOMException(DOMException.INVALID_ACCESS_ERR, "");
         }
-        
+
         /**
          * <b>DOM</b>: Implements {@link
          * org.w3c.dom.css.CSSValueList#item(int)}.
@@ -1093,7 +1106,7 @@ public class CSSOMValue
      * To represents a left component.
      */
     protected class LeftComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1136,7 +1149,7 @@ public class CSSOMValue
      * To represents a top component.
      */
     protected class TopComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1179,7 +1192,7 @@ public class CSSOMValue
      * To represents a right component.
      */
     protected class RightComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1223,7 +1236,7 @@ public class CSSOMValue
      * To represents a bottom component.
      */
     protected class BottomComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1267,7 +1280,7 @@ public class CSSOMValue
      * To represents a red component.
      */
     protected class RedComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1311,7 +1324,7 @@ public class CSSOMValue
      * To represents a green component.
      */
     protected class GreenComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1354,7 +1367,7 @@ public class CSSOMValue
      * To represents a blue component.
      */
     protected class BlueComponent extends FloatComponent {
-        
+
         /**
          * The returns the actual value of this component.
          */
@@ -1397,7 +1410,7 @@ public class CSSOMValue
      * To represents a List component.
      */
     protected class ListComponent extends AbstractComponent {
-        
+
         /**
          * The index of this component.
          */

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMViewCSS.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMViewCSS.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMViewCSS.java
index a0ad842..d33aa1d 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMViewCSS.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/dom/CSSOMViewCSS.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 1999-2003  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -30,7 +31,7 @@ import org.w3c.dom.views.DocumentView;
  * of the elements of a document.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSOMViewCSS.java,v 1.4 2004/10/30 18:38:04 deweese Exp $
+ * @version $Id: CSSOMViewCSS.java 475477 2006-11-15 22:44:28Z cam $
  */
 public class CSSOMViewCSS implements ViewCSS {
     

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/CSSContext.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/CSSContext.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/CSSContext.java
index f27624c..4460bfc 100644
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/CSSContext.java
+++ b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/CSSContext.java
@@ -1,10 +1,11 @@
 /*
 
-   Copyright 2002-2004  The Apache Software Foundation 
-
-   Licensed 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
+   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
 
@@ -26,10 +27,10 @@ import org.w3c.dom.Element;
  * informations.
  *
  * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSContext.java,v 1.11 2005/03/27 08:58:31 cam Exp $
+ * @version $Id: CSSContext.java 478160 2006-11-22 13:35:06Z dvholten $
  */
 public interface CSSContext {
-    
+
     /**
      * Returns the Value corresponding to the given system color.
      */
@@ -82,30 +83,30 @@ public interface CSSContext {
     /**
      * This method should throw a SecurityException if the resource
      * found at url and referenced from docURL should not be loaded.
-     * 
+     *
      * @param resourceURL url for the resource, as defined in
      *        the resource's xlink:href attribute. If that
      *        attribute was empty, then this parameter should
      *        be null
-     * @param docURL url for the document into which the 
+     * @param docURL url for the document into which the
      *        resource was found.
      */
-    public void 
+    void
         checkLoadExternalResource(ParsedURL resourceURL,
                                   ParsedURL docURL) throws SecurityException;
 
     /**
      * Returns true if the document is dynamic, false otherwise.
      */
-    public boolean isDynamic();
+    boolean isDynamic();
 
     /**
      * Returns true if the document is interactive, false otherwise.
      */
-    public boolean isInteractive();
+    boolean isInteractive();
 
     /**
      * Returns the CSS engine associated with given element.
      */
-    public CSSEngine getCSSEngineForElement(Element e);
+    CSSEngine getCSSEngineForElement(Element e);
 }


Mime
View raw message