Save This Page
Home » openjdk-7 » net.sourceforge » mflow » ui » [javadoc | source]
    1   /*
    2    *   (C) 2002 David Carr  david@carr.name
    3    *
    4    *   This program is free software; you can redistribute it and/or modify
    5    *   it under the terms of the GNU General Public License as published by
    6    *   the Free Software Foundation; either version 2 of the License, or
    7    *   (at your option) any later version.
    8    *
    9    *   This program 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
   12    *   GNU General Public License for more details.
   13    *
   14    *   You should have received a copy of the GNU General Public License
   15    *   along with this program; if not, write to the Free Software
   16    *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   17    *
   18    */
   19   
   20   package net.sourceforge.mflow.ui;
   21   
   22   import javax.swing;
   23   import java.awt.event;
   24   import net.sourceforge.mflow;
   25   
   26   /**
   27    * Component to display a Contact
   28    *
   29    * @author <a href="mailto:david@carr.name">David Carr</a>
   30    */
   31   public class ContactComponent extends JLabel {
   32   	/**
   33   	 * Private reference to the Contact
   34   	 */
   35   	private Contact mContact;
   36   
   37   	/**
   38   	 * Constructor taking a Contact
   39   	 *
   40   	 * @param c the Contact
   41   	 */
   42   	public ContactComponent(Contact c) {
   43   		super(c.getName());
   44   	}
   45   
   46   	/**
   47   	 * Returns the Contact
   48   	 *
   49   	 * @return the Contact
   50   	 */
   51   	public Contact getContact() {
   52   		return mContact;
   53   	}
   54   
   55   	/**
   56   	 * Sets the Contact
   57   	 *
   58   	 * @param c the new Contact
   59   	 */
   60   	public void setContact(Contact c) {
   61   		mContact = c;
   62   		setText(c.getName());
   63   	}
   64   }

Save This Page
Home » openjdk-7 » net.sourceforge » mflow » ui » [javadoc | source]