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: KLabel.java,v $
023   Revision 1.10  2004/05/12 18:57:32  markl
024   comment block updates
025
026   Revision 1.9  2003/01/19 09:50:53  markl
027   Javadoc & comment header updates.
028
029   Revision 1.8  2001/03/12 09:27:09  markl
030   New class.
031   ----------------------------------------------------------------------------
032*/
033
034package kiwi.ui;
035
036import java.awt.*;
037import java.util.*;
038import javax.swing.*;
039import javax.swing.plaf.ComponentUI;
040
041import kiwi.util.*;
042
043/** A trivial extension to <code>JLabel</code> that performs some simple
044 * customizations.
045 *
046 * @since Kiwi 1.3
047 *
048 * @author Mark Lindner
049 */
050
051public class KLabel extends JLabel
052  {
053  /** Construct a new <code>KLabel</code>.
054   */
055  
056  public KLabel()
057    {
058    super();
059
060    _init();
061    }
062
063  /** Construct a new <code>KLabel</code> with the specified image.
064   *
065   * @param image The image.
066   */
067  
068  public KLabel(Icon image)
069    {
070    super(image);
071
072    _init();
073    }
074
075  /** Construct a new <code>KLabel</code> with the specified image and
076   * horizontal alignment.
077   *
078   * @param image The image.
079   * @param horizontalAlignment The horizontal alignment.
080   */
081  
082  public KLabel(Icon image, int horizontalAlignment)
083    {
084    super(image, horizontalAlignment);
085    
086    _init();
087    }
088
089  /** Construct a new <code>KLabel</code> with the specified text.
090   *
091   * @param text The text.
092   */
093  
094  public KLabel(String text)
095    {
096    super(text);
097
098    _init();
099    }
100
101  /** Construct a new <code>KLabel</code> with the specified text, icon and
102   * horizontal alignment.
103   *
104   * @param text The text.
105   * @param icon The icon.
106   * @param horizontalAlignment The horizontal alignment.
107   */
108  
109  public KLabel(String text, Icon icon, int horizontalAlignment)
110    {
111    super(text, icon, horizontalAlignment);
112
113    _init();
114    }
115
116  /** Construct a new <code>KLabel</code> with the specified text and
117   * horizontal alignment.
118   *
119   * @param text The text.
120   * @param horizontalAlignment The horizontal alignment.
121   */
122  
123  public KLabel(String text, int horizontalAlignment)
124    {
125    super(text, horizontalAlignment);
126
127    _init();
128    }
129
130  /*
131   */
132
133  private void _init()
134    {
135    setOpaque(false);
136    setForeground(Color.black);
137    }
138  
139  }
140
141/* end of source file */