import javax.swing.*;
import java.awt.*;
/**
* GenTextPanel - Class with factory methods used to generate graphics objects
* for our message area.
*
* @author Jayme Manning
* @author Paul Kronenwetter
* @version $Revision: 1.1 $
* $Date: 1998/12/17 17:14:45 $
*
*
* $Log: GenTextPanel.java,v $
* Revision 1.1 1998/12/17 17:14:45 cps606
* Factory class for producing JTextAreas
*
*
*
*
* Paul Kronenwetter
* Jayme Manning
* Trade Secrets and/or Confidential
* Commercial or Financial Information
* Exempt From Disclosure Under the Freedom
* of Information Act (5 USC 552(b)(3)
* and 5 USC 552(b)(4)) and Under 18 USC 1905
*
*
* Proprietary Information Notice
*
* This document contains information proprietary to, and is the
* sole property of, Paul Kronenwetter and Jayme Manning. It shall not
* be reproduced, used or disclosed in any manner or for any purpose
* not authorized in writing by both Paul Kronenwetter and
* Jayme Manning, and except, as retention may be so authorized, it
* shall be returned to Paul Kronenwetter or Jayme Manning upon
* request.
* © 1998 by Paul Kronenwetter and Jayme
* Manning
All Rights Reserved
*
*/
public class GenTextPanel
{
/**
* genUserMessage - Factory method used to produce a list label
* for user messages. The foreground for these messages is black.
*
* @param x Text for JLabel.
*
* @return JLabel - The label to be included in the list.
*/
public static JLabel genUserMessage(String x)
{
JLabel y = new JLabel(x);
y.setForeground(Color.black);
y.setBackground(Color.white);
return y;
}
/**
* genDirectMessage - Factory method used to produce a list label
* for Direct messages. The foreground for these messages is red.
*
* @param x Text for JLabel.
*
* @return JLabel - The label to be included in the list.
*/
public static JLabel genDirectMessage(String x)
{
JLabel y = new JLabel(x);
y.setForeground(Color.red);
y.setBackground(Color.white);
return y;
}
/**
* genBroadcastMessage - Factory method used to produce a list label
* for Broadcast messages. The foreground for these messages is blue.
*
* @param x Text for JLabel.
*
* @return JLabel - The label to be included in the list.
*/
public static JLabel genBroadcastMessage(String x)
{
JLabel y = new JLabel(x);
y.setForeground(Color.blue);
y.setBackground(Color.white);
return y;
}
}