< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/synth/SynthParser.java

Print this page


   1 /*
   2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1228             getHandler().endElement(uri, local, name);
1229             _depth--;
1230             if (!isForwarding()) {
1231                 getHandler().startDocument();
1232             }
1233         }
1234         else {
1235             name = name.intern();
1236             if (name == ELEMENT_STYLE) {
1237                 endStyle();
1238             }
1239             else if (name == ELEMENT_STATE) {
1240                 endState();
1241             }
1242             else if (name == ELEMENT_INPUT_MAP) {
1243                 endInputMap();
1244             }
1245         }
1246     }
1247 
1248     public void characters(char ch[], int start, int length)
1249                            throws SAXException {
1250         if (isForwarding()) {
1251             getHandler().characters(ch, start, length);
1252         }
1253     }
1254 
1255     public void ignorableWhitespace (char ch[], int start, int length)
1256         throws SAXException {
1257         if (isForwarding()) {
1258             getHandler().ignorableWhitespace(ch, start, length);
1259         }
1260     }
1261 
1262     public void processingInstruction(String target, String data)
1263                                      throws SAXException {
1264         if (isForwarding()) {
1265             getHandler().processingInstruction(target, data);
1266         }
1267     }
1268 
1269     public void warning(SAXParseException e) throws SAXException {
1270         if (isForwarding()) {
1271             getHandler().warning(e);
1272         }
1273     }
1274 
1275     public void error(SAXParseException e) throws SAXException {


   1 /*
   2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1228             getHandler().endElement(uri, local, name);
1229             _depth--;
1230             if (!isForwarding()) {
1231                 getHandler().startDocument();
1232             }
1233         }
1234         else {
1235             name = name.intern();
1236             if (name == ELEMENT_STYLE) {
1237                 endStyle();
1238             }
1239             else if (name == ELEMENT_STATE) {
1240                 endState();
1241             }
1242             else if (name == ELEMENT_INPUT_MAP) {
1243                 endInputMap();
1244             }
1245         }
1246     }
1247 
1248     public void characters(char[] ch, int start, int length)
1249                            throws SAXException {
1250         if (isForwarding()) {
1251             getHandler().characters(ch, start, length);
1252         }
1253     }
1254 
1255     public void ignorableWhitespace (char[] ch, int start, int length)
1256         throws SAXException {
1257         if (isForwarding()) {
1258             getHandler().ignorableWhitespace(ch, start, length);
1259         }
1260     }
1261 
1262     public void processingInstruction(String target, String data)
1263                                      throws SAXException {
1264         if (isForwarding()) {
1265             getHandler().processingInstruction(target, data);
1266         }
1267     }
1268 
1269     public void warning(SAXParseException e) throws SAXException {
1270         if (isForwarding()) {
1271             getHandler().warning(e);
1272         }
1273     }
1274 
1275     public void error(SAXParseException e) throws SAXException {


< prev index next >