Coverage Report - org.xmlhammer.gui.util.ParametersDialog
 
Classes in this File Line Coverage Branch Coverage Complexity
ParametersDialog
100% 
100% 
0
 
 1  
 /*
 2  
  * $Id$
 3  
  *
 4  
  * The contents of this file are subject to the Mozilla Public License 
 5  
  * Version 1.1 (the "License"); you may not use this file except in 
 6  
  * compliance with the License. You may obtain a copy of the License at 
 7  
  * http://www.mozilla.org/MPL/ 
 8  
  *
 9  
  * Software distributed under the License is distributed on an "AS IS" basis, 
 10  
  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
 11  
  * for the specific language governing rights and limitations under the License.
 12  
  *
 13  
  * The Original Code is XML Hammer code. (org.xmlhammer.*)
 14  
  *
 15  
  * The Initial Developer of the Original Code is Edwin Dankert. Portions created 
 16  
  * by the Initial Developer are Copyright (C) 2005 - 2006 the Initial Developer. 
 17  
  * All Rights Reserved.
 18  
  *
 19  
  * Contributor(s): Edwin Dankert <edankert@gmail.com>
 20  
  */
 21  
 
 22  
 
 23  
 package org.xmlhammer.gui.util;
 24  
 
 25  
 import java.awt.Frame;
 26  
 import java.util.List;
 27  
 
 28  
 import javax.swing.event.TreeSelectionListener;
 29  
 
 30  
 import org.xmlhammer.gui.preferences.JAXPPropertiesDialog;
 31  
 import org.xmlhammer.gui.preferences.ParametersPanel;
 32  
 import org.xmlhammer.gui.util.preferences.HelpEnabledPreferencesPage;
 33  
 import org.xmlhammer.model.project.Parameter;
 34  
 
 35  
 /**
 36  
  * Put comment...
 37  
  * 
 38  
  * @version $Revision$, $Date$
 39  
  * @author Edwin Dankert <edankert@gmail.com>
 40  
  */
 41  
 
 42  
 public class ParametersDialog extends JAXPPropertiesDialog implements TreeSelectionListener {
 43  
     private static final long serialVersionUID = 2673193241652494262L;
 44  
     
 45  22
     private ParametersPanel parametersPanel = null;
 46  
         
 47  
         /**
 48  
          * @param parent the underlying frame
 49  
          */
 50  
         public ParametersDialog(Frame parent) {
 51  22
                 super(parent, "Properties");
 52  
 
 53  22
                 add((HelpEnabledPreferencesPage)null, getParametersPanel());
 54  22
         }
 55  
         
 56  
         protected ParametersPanel getParametersPanel() {
 57  66
                 if (parametersPanel == null) {
 58  22
             parametersPanel = new ParametersPanel(null, "Parameters", "project.trax.parameters", false);
 59  
                 }
 60  
                 
 61  66
                 return parametersPanel;
 62  
         }
 63  
                 
 64  
         /**
 65  
          * @return the SAXParserfactory settings, 
 66  
          *                    null if global settings should be used.
 67  
          */
 68  
         public List<Parameter> getParameters( ) {
 69  22
         return getParametersPanel().getParameters();
 70  
         }
 71  
         
 72  
     /**
 73  
      * @return the SAXParserfactory settings, 
 74  
      *         null if global settings should be used.
 75  
      */
 76  
     public void setParameters(List<Parameter> parameters) {
 77  22
         getParametersPanel().setParameters(parameters);
 78  22
     }
 79  
 }