001/* ----------------------------------------------------------------------------
002   The Kiwi Toolkit - A Java Class Library
003   Copyright (C) 1998-2004 Mark A. Lindner
004
005   This library is free software; you can redistribute it and/or
006   modify it under the terms of the GNU General Public License as
007   published by the Free Software Foundation; either version 2 of the
008   License, or (at your option) any later version.
009
010   This library is distributed in the hope that it will be useful,
011   but WITHOUT ANY WARRANTY; without even the implied warranty of
012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013   General Public License for more details.
014
015   You should have received a copy of the GNU General Public License
016   along with this library; if not, write to the Free Software
017   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
018   02111-1307, USA.
019 
020   The author may be contacted at: mark_a_lindner@yahoo.com
021   ----------------------------------------------------------------------------
022   $Log: ColoredString.java,v $
023   Revision 1.5  2004/05/12 19:11:04  markl
024   comment block updates
025
026   Revision 1.4  2003/01/19 09:50:53  markl
027   Javadoc & comment header updates.
028
029   Revision 1.3  2001/03/12 09:27:53  markl
030   Source code and Javadoc cleanup.
031
032   Revision 1.2  1999/01/10 01:00:58  markl
033   added GPL header & RCS tag
034   ----------------------------------------------------------------------------
035*/
036
037package kiwi.ui;
038
039import java.awt.Color;
040
041/** A class that represents a colored string.
042  *
043  * @author Mark Lindner
044  */
045
046public class ColoredString 
047  {
048  private String string = "";
049  private Color color = Color.black;
050
051  /** Construct a new colored string.
052    *
053    * @param string The string.
054    * @param color The color.
055    */
056
057  public ColoredString(String string, Color color)
058    {
059    this.string = string;
060    this.color = color;
061    }
062
063  /** Construct a new colored string. The string is set to "" and the color
064    * is set to black.
065    */
066
067  public ColoredString()
068    {
069    }
070
071  /** Get the string.
072    *
073    * @return The string.
074    * @see #setString
075    */
076
077  public String getString()
078    {
079    return(string);
080    }
081
082  /** Set the string.
083    *
084    * @param string The new string.
085    * @see #getString
086    */
087
088  public void setString(String string)
089    {
090    this.string = string;;
091    }
092  
093  /** Get the color.
094    *
095    * @return The color.
096    * @see #setColor
097    */
098
099  public Color getColor()
100    {
101    return(color);
102    }
103
104  /** Set the color.
105    *
106    * @param color The new color.
107    * @see #getColor
108    */
109
110  public void setColor(Color color)
111    {
112    this.color = color;
113    }
114
115  }
116
117/* end of source file */