Source for org.jfree.ui.about.ContributorsPanel

   1: /* ========================================================================
   2:  * JCommon : a free general purpose class library for the Java(tm) platform
   3:  * ========================================================================
   4:  *
   5:  * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
   6:  * 
   7:  * Project Info:  http://www.jfree.org/jcommon/index.html
   8:  *
   9:  * This library is free software; you can redistribute it and/or modify it 
  10:  * under the terms of the GNU Lesser General Public License as published by 
  11:  * the Free Software Foundation; either version 2.1 of the License, or 
  12:  * (at your option) any later version.
  13:  *
  14:  * This library is distributed in the hope that it will be useful, but 
  15:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
  16:  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
  17:  * License for more details.
  18:  *
  19:  * You should have received a copy of the GNU Lesser General Public
  20:  * License along with this library; if not, write to the Free Software
  21:  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
  22:  * USA.  
  23:  *
  24:  * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
  25:  * in the United States and other countries.]
  26:  * 
  27:  * ----------------------
  28:  * ContributorsPanel.java
  29:  * ----------------------
  30:  * (C) Copyright 2001-2004, by Object Refinery Limited.
  31:  *
  32:  * Original Author:  David Gilbert (for Object Refinery Limited);
  33:  * Contributor(s):   -;
  34:  *
  35:  * $Id: ContributorsPanel.java,v 1.5 2007/11/02 17:50:36 taqua Exp $
  36:  *
  37:  * Changes
  38:  * -------
  39:  * 10-Dec-2001 : Version 1 (DG);
  40:  * 28-Feb-2002 : Moved into package com.jrefinery.ui.about.  Changed import statements and
  41:  *               updated Javadoc comments (DG);
  42:  * 08-Oct-2002 : Fixed errors reported by Checkstyle (DG);
  43:  *
  44:  */
  45: 
  46: package org.jfree.ui.about;
  47: 
  48: import java.awt.BorderLayout;
  49: import java.util.List;
  50: import javax.swing.JPanel;
  51: import javax.swing.JScrollPane;
  52: import javax.swing.JTable;
  53: import javax.swing.table.TableModel;
  54: 
  55: /**
  56:  * A panel containing a table that lists the contributors to a project.
  57:  * <P>
  58:  * Used in the AboutFrame class.
  59:  *
  60:  * @author David Gilbert
  61:  */
  62: public class ContributorsPanel extends JPanel {
  63: 
  64:     /** The table. */
  65:     private JTable table;
  66: 
  67:     /** The data. */
  68:     private TableModel model;
  69: 
  70:     /**
  71:      * Creates a new contributors panel.
  72:      *
  73:      * @param contributors  a list of contributors (represented by Contributor objects).
  74:      */
  75:     public ContributorsPanel(final List contributors) {
  76: 
  77:         setLayout(new BorderLayout());
  78:         this.model = new ContributorsTableModel(contributors);
  79:         this.table = new JTable(this.model);
  80:         add(new JScrollPane(this.table));
  81: 
  82:     }
  83: 
  84: }