View Javadoc

1   package net.sf.tomp.xtcl.filter;
2   
3   import javax.xml.transform.Transformer;
4   import javax.xml.transform.sax.TransformerHandler;
5   
6   import java.util.Properties;
7   
8   /***
9    * DOCUMENT ME!
10   * 
11   * @author tomp
12   */
13  public class HasOutputPropertiesWrapper implements HasOutputProperties {
14      /*** DOCUMENT ME! */
15      protected Transformer tr;
16  
17      /*** DOCUMENT ME! */
18      protected HasOutputProperties outputPropertiesListener;
19  
20      /***
21       * Creates a new HasOutputPropertiesWrapper object.
22       * 
23       * @param th DOCUMENT ME!
24       */
25      public HasOutputPropertiesWrapper(TransformerHandler th) {
26          tr = th.getTransformer();
27      }
28  
29      /***
30       * DOCUMENT ME!
31       * 
32       * @return DOCUMENT ME!
33       */
34      public Properties getOutputProperties() {
35          return tr.getOutputProperties();
36      }
37  
38      /***
39       * DOCUMENT ME!
40       * 
41       * @param p DOCUMENT ME!
42       */
43      public void setOutputProperties(Properties p) {
44          if (p != null) {
45              tr.setOutputProperties(p);
46          }
47      }
48  
49      /***
50       * DOCUMENT ME!
51       * 
52       * @param l DOCUMENT ME!
53       */
54      public void setOutputPropertiesListener(HasOutputProperties l) {
55          outputPropertiesListener = l;
56      }
57  }
58  
59  /*
60   * The contents of this file are subject to the Mozilla Public License Version
61   * 1.1 (the "License"); you may not use this file except in compliance with the
62   * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
63   * Software distributed under the License is distributed on an "AS IS" basis,
64   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
65   * the specific language governing rights and limitations under the License. The
66   * Original Code is: all this file. The Initial Developer of the Original Code
67   * is: Tomas Pitner, Masaryk University in Brno, Czech Republic. Contributor(s):
68   */