Clover coverage report -
Coverage timestamp: Sun Apr 18 2004 21:32:30 EDT
file stats: LOC: 82   Methods: 2
NCLOC: 24   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
FontDialog.java - 100% 100% 100%
coverage
 1   
 /*
 2   
  * SimplyHTML, a word processor based on Java, HTML and CSS
 3   
  * Copyright (C) 2002 Ulrich Hilger
 4   
  *
 5   
  * This program is free software; you can redistribute it and/or
 6   
  * modify it under the terms of the GNU General Public License
 7   
  * as published by the Free Software Foundation; either version 2
 8   
  * of the License, or (at your option) any later version.
 9   
  *
 10   
  * This program is distributed in the hope that it will be useful,
 11   
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12   
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13   
  * GNU General Public License for more details.
 14   
  *
 15   
  * You should have received a copy of the GNU General Public License
 16   
  * along with this program; if not, write to the Free Software
 17   
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 18   
  */
 19   
 
 20   
 import java.awt.event.ActionListener;
 21   
 import java.awt.AWTEvent;
 22   
 import java.awt.event.WindowEvent;
 23   
 import java.awt.event.ActionEvent;
 24   
 import javax.swing.JDialog;
 25   
 import javax.swing.JButton;
 26   
 import javax.swing.JPanel;
 27   
 import java.awt.Frame;
 28   
 import java.awt.BorderLayout;
 29   
 import java.awt.FlowLayout;
 30   
 import java.awt.Container;
 31   
 import javax.swing.text.AttributeSet;
 32   
 
 33   
 /**
 34   
  * Dialog to show and manipulate font attributes.
 35   
  *
 36   
  * @author Ulrich Hilger
 37   
  * @author Light Development
 38   
  * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
 39   
  * @author <a href="mailto:info@lightdev.com">info@lightdev.com</a>
 40   
  * @author published under the terms and conditions of the
 41   
  *      GNU General Public License,
 42   
  *      for details see file gpl.txt in the distribution
 43   
  *      package of this software
 44   
  *
 45   
  * @version stage 11, April 27, 2003
 46   
  */
 47   
 
 48   
 public class FontDialog extends DialogShell {
 49   
 
 50   
   /** the font panel to use in this dialog */
 51   
   private FontPanel fontPanel;
 52   
 
 53   
   /**
 54   
    * constructor
 55   
    *
 56   
    * @param parent  the main frame having the ResourceBundle
 57   
    * @param title  the title for this dialog
 58   
    * @param a  the set of attributes to show and manipulate
 59   
    */
 60  2
   public FontDialog(Frame parent, String title, AttributeSet a) {
 61  2
     super(parent, title);
 62   
 
 63   
     // construct font panel
 64  2
     fontPanel = new FontPanel(a);
 65   
 
 66   
     // add font panel to content pane of DialogShell
 67  2
     Container contentPane = super.getContentPane();
 68  2
     contentPane.add(fontPanel, BorderLayout.CENTER);
 69   
 
 70   
     // cause optimal placement of all elements
 71  2
     pack();
 72   
   }
 73   
 
 74   
   /**
 75   
    * get the set of attributes set in this dialog
 76   
    *
 77   
    * @return the attributes set in this dialog
 78   
    */
 79  2
   public AttributeSet getAttributes() {
 80  2
     return fontPanel.getAttributes();
 81   
   }
 82   
 }