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: KRadioButton.java,v $
023   Revision 1.4  2004/05/12 18:37:15  markl
024   comment block updates
025
026   Revision 1.3  2004/03/20 05:14:47  markl
027   code cleanup
028
029   Revision 1.2  2003/01/19 09:50:53  markl
030   Javadoc & comment header updates.
031
032   Revision 1.1  2002/08/11 09:52:07  markl
033   New class.
034   ----------------------------------------------------------------------------
035*/
036
037package kiwi.ui;
038
039import javax.swing.*;
040
041import kiwi.util.KiwiUtils;
042
043/** A trivial extension to <code>KRadioButton</code> that performs some simple
044 * customizations.
045 *
046 * @author Mark Lindner
047 */
048
049public class KRadioButton extends JRadioButton
050  {
051
052  /** Construct a new <code>KRadioButton</code>.
053   *
054   * @param text The text to display in the button.
055   */
056
057  public KRadioButton(String text)
058    {
059    super(text);
060    _init();
061    }
062
063  /** Construct a new <code>KRadioButton</code>.
064   *
065   * @param text The text to display in the button.
066   * @param icon The icon to display in the button.
067   */
068
069  public KRadioButton(String text, Icon icon)
070    {
071    super(text, icon);
072    _init();
073    }
074
075  /** Construct a new <code>KRadioButton</code>.
076   *
077   * @param icon The icon to display in the button.
078   */
079
080  public KRadioButton(Icon icon)
081    {
082    super(icon);
083    _init();
084    }
085
086  /*
087   */
088  
089  private void _init()
090    {
091    setOpaque(! UIChangeManager.getInstance().getButtonsAreTransparent());
092    }
093
094  }
095
096/* end of source file */