Clover coverage report -
Coverage timestamp: Sun Apr 18 2004 21:32:30 EDT
file stats: LOC: 74   Methods: 2
NCLOC: 25   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
MarginPanel.java - 80% 50% 75%
coverage 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.*;
 21   
 import javax.swing.border.*;
 22   
 import javax.swing.*;
 23   
 import javax.swing.text.html.*;
 24   
 
 25   
 /**
 26   
  * Panel to set text margin attributes.
 27   
  *
 28   
  * @author Ulrich Hilger
 29   
  * @author Light Development
 30   
  * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
 31   
  * @author <a href="mailto:info@lightdev.com">info@lightdev.com</a>
 32   
  * @author published under the terms and conditions of the
 33   
  *      GNU General Public License,
 34   
  *      for details see file gpl.txt in the distribution
 35   
  *      package of this software
 36   
  *
 37   
  * @version stage 11, April 27, 2003
 38   
  */
 39   
 
 40   
 public class MarginPanel extends AttributePanel {
 41   
 
 42   
   private BoundariesPanel margin;
 43   
   private BoundariesPanel padding;
 44   
 
 45  3
   public MarginPanel() {
 46  3
     super();
 47   
 
 48   
     // margin/padding panel
 49  3
     setLayout(new GridLayout(2, 1, 3, 3));
 50   
 
 51   
     // construct margin panel
 52  3
     margin = new BoundariesPanel(CSS.Attribute.MARGIN);
 53   
 
 54   
     // set border and title and add margin panel
 55  3
     margin.setBorder(new TitledBorder(new EtchedBorder(
 56   
         EtchedBorder.LOWERED),
 57   
         FrmMain.dynRes.getResourceString(FrmMain.resources, "marginLabel")));
 58  3
     this.add(margin);
 59   
 
 60   
     // construct padding panel
 61  3
     padding = new BoundariesPanel(CSS.Attribute.PADDING);
 62   
 
 63   
     // set border and title adn add padding panel
 64  3
     padding.setBorder(new TitledBorder(new EtchedBorder(
 65   
         EtchedBorder.LOWERED),
 66   
         FrmMain.dynRes.getResourceString(FrmMain.resources, "paddingLabel")));
 67  3
     this.add(padding);
 68   
   }
 69   
 
 70  0
   public void reset() {
 71  0
     margin.reset();
 72  0
     padding.reset();
 73   
   }
 74   
 }