xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hill...@apache.org
Subject cvs commit: xml-batik/sources/org/apache/batik/apps/svgbrowser JSVGViewerFrame.java
Date Mon, 12 Nov 2001 15:59:35 GMT
hillion     01/11/12 07:59:35

  Modified:    sources/org/apache/batik/apps/svgbrowser
                        JSVGViewerFrame.java
  Log:
  Now nnly scans the document prolog when searching for alternate stylesheets.
  
  Revision  Changes    Path
  1.64      +4 -12     xml-batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java
  
  Index: JSVGViewerFrame.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/svgbrowser/JSVGViewerFrame.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- JSVGViewerFrame.java	2001/10/24 14:52:35	1.63
  +++ JSVGViewerFrame.java	2001/11/12 15:59:35	1.64
  @@ -143,10 +143,6 @@
   import org.w3c.dom.stylesheets.DocumentStyle;
   import org.w3c.dom.stylesheets.StyleSheetList;
    
  -import org.w3c.dom.traversal.DocumentTraversal;
  -import org.w3c.dom.traversal.NodeFilter;
  -import org.w3c.dom.traversal.TreeWalker;
  -
   import org.w3c.dom.css.CSSStyleSheet;
   
   import org.w3c.dom.css.ViewCSS;
  @@ -157,7 +153,7 @@
    * This class represents a SVG viewer swing frame.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: JSVGViewerFrame.java,v 1.63 2001/10/24 14:52:35 tkormann Exp $
  + * @version $Id: JSVGViewerFrame.java,v 1.64 2001/11/12 15:59:35 hillion Exp $
    */
   public class JSVGViewerFrame
       extends    JFrame
  @@ -1207,14 +1203,10 @@
                   stylesheetMenu.setEnabled(false);
   
                   ButtonGroup buttonGroup = new ButtonGroup();
  -                TreeWalker tw;
  -                tw = ((DocumentTraversal)doc).createTreeWalker
  -                    (doc,
  -                     NodeFilter.SHOW_PROCESSING_INSTRUCTION,
  -                     null,
  -                     true);
   
  -                for (Node n = tw.nextNode(); n != null; n = tw.nextNode()) {
  +                for (Node n = doc.getFirstChild();
  +                     n != null && n.getNodeType() != n.ELEMENT_NODE;
  +                     n = n.getNextSibling()) {
                       if (n instanceof StyleSheetProcessingInstruction) {
                           StyleSheetProcessingInstruction sspi;
                           sspi = (StyleSheetProcessingInstruction)n;
  
  
  

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


Mime
View raw message