Clover coverage report - Maven Clover report
Coverage timestamp: Thu Oct 11 2007 08:41:48 CEST
file stats: LOC: 71   Methods: 4
NCLOC: 40   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
LinkUpdatePanel.java - 0% 0% 0%
coverage
 1    /*
 2    * Copyright (C) 2007 Eric MIGNOT - mignots.eric@free.fr
 3    *
 4    * This library is free software; you can redistribute it and/or
 5    * modify it under the terms of the GNU Lesser General Public
 6    * License as published by the Free Software Foundation; either
 7    * version 2.1 of the License, or (at your option) any later version.
 8    *
 9    * This library is distributed in the hope that it will be useful,
 10    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 12    * Lesser General Public License for more details.
 13    *
 14    * You should have received a copy of the GNU Lesser General Public
 15    * License along with this library; if not, write to the Free Software
 16    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 17    */
 18    package org.ericmignot.modeler.gui.palette;
 19   
 20    import java.awt.BorderLayout;
 21    import java.util.HashMap;
 22    import java.util.Map;
 23   
 24    import javax.swing.JLabel;
 25    import javax.swing.JPanel;
 26    import javax.swing.JTextField;
 27   
 28    import org.ericmignot.modeler.data.Link;
 29    import org.ericmignot.modeler.gui.StaticValues;
 30   
 31    public class LinkUpdatePanel extends UpdatePanel
 32    {
 33    private JTextField linkLabelField;
 34   
 35  0 private Link getLink()
 36    {
 37  0 return (Link) this.getBusinessObject();
 38    }
 39   
 40  0 public JTextField getLinkLabelField()
 41    {
 42  0 return linkLabelField;
 43    }
 44   
 45  0 protected JPanel getSpecificPanel()
 46    {
 47  0 JLabel linkLabel = new JLabel(StaticValues.getInstance().get("Design.Link.LabelFieldName", "Label") + " : ");
 48  0 this.linkLabelField = new JTextField(this.getLink().getLabel(), 20);
 49   
 50  0 JPanel toReturn = new JPanel(new BorderLayout());
 51   
 52  0 JPanel fieldsLabelPanel = new JPanel(new BorderLayout());
 53  0 fieldsLabelPanel.add(linkLabel, BorderLayout.NORTH);
 54   
 55  0 JPanel fieldsValuePanel = new JPanel(new BorderLayout());
 56  0 fieldsValuePanel.add(linkLabelField, BorderLayout.NORTH);
 57   
 58  0 toReturn.add(fieldsLabelPanel, BorderLayout.WEST);
 59  0 toReturn.add(fieldsValuePanel, BorderLayout.CENTER);
 60  0 return toReturn;
 61    }
 62   
 63  0 protected Map getNewValues()
 64    {
 65  0 Map toReturn = new HashMap();
 66  0 toReturn.put (Link.FIELD_LABEL, this.linkLabelField.getText());
 67  0 return toReturn;
 68    }
 69   
 70   
 71    }