You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by hi...@apache.org on 2002/03/26 15:56:53 UTC

cvs commit: xml-batik/sources/org/apache/batik/util/gui JErrorPane.java

hillion     02/03/26 06:56:53

  Modified:    .        build.xml
               resources/org/apache/batik/util/gui/resources
                        JErrorPane.properties
               sources/org/apache/batik/bridge
                        AbstractGraphicsNodeBridge.java
               sources/org/apache/batik/css/engine CSSEngine.java
               sources/org/apache/batik/util/gui JErrorPane.java
  Removed:     resources/org/apache/batik/css/resources Messages.properties
  Log:
  - Unknown CSS properties or rules are now ignored,
  - improved handling of errors that happen in a CSS update event listener.
  
  Revision  Changes    Path
  1.105     +13 -11    xml-batik/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/build.xml,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- build.xml	11 Mar 2002 15:22:56 -0000	1.104
  +++ build.xml	26 Mar 2002 14:56:52 -0000	1.105
  @@ -47,7 +47,7 @@
     [win32] .\build.bat help
   
    
  - $Id: build.xml,v 1.104 2002/03/11 15:22:56 hillion Exp $
  + $Id: build.xml,v 1.105 2002/03/26 14:56:52 hillion Exp $
   
   -->
   
  @@ -471,18 +471,22 @@
     <target name="css-jar" depends="compile, prepare-build">
       <jar jarfile="${build}/lib/${project}-css.jar">
         <fileset dir="${dest}">
  -        <include name="${package-prefix}/css/*.class"/>
  -        <include name="${package-prefix}/css/event/*.class"/>
  +        <include name="${package-prefix}/css/dom/*.class"/>
  +        <include name="${package-prefix}/css/engine/*.class"/>
  +        <include name="${package-prefix}/css/engine/sac/*.class"/>
  +        <include name="${package-prefix}/css/engine/value/*.class"/>
  +        <include name="${package-prefix}/css/engine/value/css2/*.class"/>
  +        <include name="${package-prefix}/css/engine/value/svg/*.class"/>
           <include name="${package-prefix}/css/parser/*.class"/>
  -        <include name="${package-prefix}/css/sac/*.class"/>
  -        <include name="${package-prefix}/css/value/*.class"/>
         </fileset>
         <fileset dir="${resources}" excludes="${resources}/**/CVS">
  -        <include name="${package-prefix}/css/resources/**"/>
  -        <include name="${package-prefix}/css/event/resources/**"/>
  -        <include name="${package-prefix}/css/parser/resources/**"/>
  +        <include name="${package-prefix}/css/dom/resources/**"/>
           <include name="${package-prefix}/css/sac/resources/**"/>
  -        <include name="${package-prefix}/css/value/resources/**"/>
  +        <include name="${package-prefix}/css/parser/resources/**"/>
  +        <include name="${package-prefix}/css/engine/resources/**"/>
  +        <include name="${package-prefix}/css/engine/value/resources/**"/>
  +        <include name="${package-prefix}/css/engine/value/css2/resources/**"/>
  +        <include name="${package-prefix}/css/engine/value/svg/resources/**"/>
         </fileset>
       </jar>
     </target>
  @@ -492,11 +496,9 @@
       <jar jarfile="${build}/lib/${project}-svg-dom.jar">
         <fileset dir="${dest}">
           <include name="${package-prefix}/dom/svg/*.class"/>
  -        <include name="${package-prefix}/css/svg/*.class"/>
         </fileset>
         <fileset dir="${resources}" excludes="${resources}/**/CVS">
           <include name="${package-prefix}/dom/svg/resources/**"/>
  -        <include name="${package-prefix}/css/svg/resources/**"/>
         </fileset>
       </jar>
     </target>
  
  
  
  1.3       +3 -1      xml-batik/resources/org/apache/batik/util/gui/resources/JErrorPane.properties
  
  Index: JErrorPane.properties
  ===================================================================
  RCS file: /home/cvs/xml-batik/resources/org/apache/batik/util/gui/resources/JErrorPane.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JErrorPane.properties	29 Nov 2001 09:17:41 -0000	1.2
  +++ JErrorPane.properties	26 Mar 2002 14:56:53 -0000	1.3
  @@ -9,8 +9,10 @@
   # The resources for the JErrorPane
   #
   # Author: tkormann@ilog.fr
  -# $Id: JErrorPane.properties,v 1.2 2001/11/29 09:17:41 tkormann Exp $
  +# $Id: JErrorPane.properties,v 1.3 2002/03/26 14:56:53 hillion Exp $
   #
  +
  +Heading.text = SVG Error:
   
   ShowDetailButton.text     = Show Details
   ShowDetailButton.text2     = Hide Details
  
  
  
  1.20      +8 -4      xml-batik/sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java
  
  Index: AbstractGraphicsNodeBridge.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- AbstractGraphicsNodeBridge.java	21 Mar 2002 18:03:00 -0000	1.19
  +++ AbstractGraphicsNodeBridge.java	26 Mar 2002 14:56:53 -0000	1.20
  @@ -44,7 +44,7 @@
    * </ul>
    *
    * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
  - * @version $Id: AbstractGraphicsNodeBridge.java,v 1.19 2002/03/21 18:03:00 tkormann Exp $
  + * @version $Id: AbstractGraphicsNodeBridge.java,v 1.20 2002/03/26 14:56:53 hillion Exp $
    */
   public abstract class AbstractGraphicsNodeBridge extends AbstractSVGBridge
       implements SVGContext, 
  @@ -211,9 +211,13 @@
        * Invoked when an CSSEngineEvent is fired.
        */
       public void handleCSSEngineEvent(CSSEngineEvent evt) {
  -        int [] properties = evt.getProperties();
  -        for (int i=0; i < properties.length; ++i) {
  -            handleCSSPropertyChanged(properties[i]);
  +        try {
  +            int [] properties = evt.getProperties();
  +            for (int i=0; i < properties.length; ++i) {
  +                handleCSSPropertyChanged(properties[i]);
  +            }
  +        } catch (Exception ex) {
  +            ctx.getUserAgent().displayError(ex);
           }
       }
   
  
  
  
  1.6       +7 -19     xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java
  
  Index: CSSEngine.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CSSEngine.java	25 Mar 2002 11:02:22 -0000	1.5
  +++ CSSEngine.java	26 Mar 2002 14:56:53 -0000	1.6
  @@ -58,7 +58,7 @@
    * This is the base class for all the CSS engines.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: CSSEngine.java,v 1.5 2002/03/25 11:02:22 hillion Exp $
  + * @version $Id: CSSEngine.java,v 1.6 2002/03/26 14:56:53 hillion Exp $
    */
   public abstract class CSSEngine {
   
  @@ -1000,11 +1000,8 @@
               if (i == -1) {
                   i = getShorthandIndex(name);
                   if (i == -1) {
  -                    String s = Messages.formatMessage("invalid.property",
  -                                                  new Object[] {
  -                                                      documentURI,
  -                                                      name });
  -                    throw new DOMException(DOMException.SYNTAX_ERR, s);
  +                    // Unknown property
  +                    return;
                   }
                   shorthandManagers[i].setValues(CSSEngine.this,
                                                  this,
  @@ -1048,7 +1045,6 @@
            * org.w3c.css.sac.DocumentHandler#ignorableAtRule(String)}.
            */
           public void ignorableAtRule(String atRule) throws CSSException {
  -            throw new CSSException("!!! TODO");
           }
       
           /**
  @@ -1095,7 +1091,6 @@
            */    
           public void startPage(String name, String pseudo_page)
               throws CSSException {
  -            throw new CSSException("!!! TODO");
           }
       
           /**
  @@ -1111,7 +1106,6 @@
            * org.w3c.css.sac.DocumentHandler#startFontFace()}.
            */
           public void startFontFace() throws CSSException {
  -            throw new CSSException("!!! TODO");
           }
       
           /**
  @@ -1152,11 +1146,8 @@
               if (i == -1) {
                   i = getShorthandIndex(name);
                   if (i == -1) {
  -                    String s = Messages.formatMessage("invalid.property",
  -                                                      new Object[] {
  -                                                          documentURI,
  -                                                          name });
  -                    throw new DOMException(DOMException.SYNTAX_ERR, s);
  +                    // Unknown property
  +                    return;
                   }
                   shorthandManagers[i].setValues(CSSEngine.this,
                                                  this,
  @@ -1601,11 +1592,8 @@
               if (i == -1) {
                   i = getShorthandIndex(name);
                   if (i == -1) {
  -                    String s = Messages.formatMessage("invalid.property",
  -                                                  new Object[] {
  -                                                      documentURI,
  -                                                      name });
  -                    throw new DOMException(DOMException.SYNTAX_ERR, s);
  +                    // Unknown property
  +                    return;
                   }
                   shorthandManagers[i].setValues(CSSEngine.this,
                                                  this,
  
  
  
  1.4       +2 -2      xml-batik/sources/org/apache/batik/util/gui/JErrorPane.java
  
  Index: JErrorPane.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/util/gui/JErrorPane.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JErrorPane.java	29 Nov 2001 09:17:41 -0000	1.3
  +++ JErrorPane.java	26 Mar 2002 14:56:53 -0000	1.4
  @@ -49,7 +49,7 @@
    * This class represents a dialog to display an error (message + Exception).
    *
    * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
  - * @version $Id: JErrorPane.java,v 1.3 2001/11/29 09:17:41 tkormann Exp $
  + * @version $Id: JErrorPane.java,v 1.4 2002/03/26 14:56:53 hillion Exp $
    */
   public class JErrorPane extends JPanel implements ActionMap {
   
  @@ -122,7 +122,7 @@
   
           listeners.put("ShowDetailButtonAction", new ShowDetailButtonAction());
           listeners.put("OKButtonAction", new OKButtonAction());
  -        this.msg = th.getMessage();
  +        this.msg = bundle.getString("Heading.text") + "\n\n" + th.getMessage();
   
           StringWriter writer = new StringWriter();
           th.printStackTrace(new PrintWriter(writer));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org