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.4 2005/11/16 15:58:41 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: 
  51: import javax.swing.JPanel;
  52: import javax.swing.JScrollPane;
  53: import javax.swing.JTable;
  54: import javax.swing.table.TableModel;
  55: 
  56: /**
  57:  * A panel containing a table that lists the contributors to a project.
  58:  * <P>
  59:  * Used in the AboutFrame class.
  60:  *
  61:  * @author David Gilbert
  62:  */
  63: public class ContributorsPanel extends JPanel {
  64: 
  65:     /** The table. */
  66:     private JTable table;
  67: 
  68:     /** The data. */
  69:     private TableModel model;
  70: 
  71:     /**
  72:      * Creates a new contributors panel.
  73:      *
  74:      * @param contributors  a list of contributors (represented by Contributor objects).
  75:      */
  76:     public ContributorsPanel(final List contributors) {
  77: 
  78:         setLayout(new BorderLayout());
  79:         this.model = new ContributorsTableModel(contributors);
  80:         this.table = new JTable(this.model);
  81:         add(new JScrollPane(this.table));
  82: 
  83:     }
  84: 
  85: }