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: KCheckBox.java,v $ 023 Revision 1.2 2004/05/12 18:55:21 markl 024 comment block updates 025 026 Revision 1.1 2003/11/07 19:11:05 markl 027 new class 028 ---------------------------------------------------------------------------- 029*/ 030 031package kiwi.ui; 032 033import javax.swing.*; 034 035import kiwi.util.KiwiUtils; 036 037/** A trivial extension to <code>JCheckBox</code> that performs some simple 038 * customizations. 039 * 040 * @see javax.swing.JCheckBox 041 * 042 * @author Mark Lindner 043 * 044 * @since Kiwi 1.4.3 045 */ 046 047public class KCheckBox extends JCheckBox 048 { 049 050 /** Construct a new <code>KCheckBox</code>. A new, transparent checkbox 051 * will be created. 052 * 053 * @param text The text to display for the checkbox. 054 */ 055 056 public KCheckBox(String text) 057 { 058 super(text); 059 060 setOpaque(!UIChangeManager.getInstance().getButtonsAreTransparent()); 061 } 062 063 /** Construct a new <code>KCheckBox</code>. A new, transparent checkbox 064 * will be created. 065 * 066 * @param text The text to display for the checkbox. 067 * @param icon The icon to display for the checkbox. 068 */ 069 070 public KCheckBox(String text, Icon icon) 071 { 072 super(text, icon); 073 074 setOpaque(!UIChangeManager.getInstance().getButtonsAreTransparent()); 075 } 076 077 /** Construct a new <code>KCheckBox</code>. A new, transparent checkbox 078 * will be created. 079 * 080 * @param icon The icon to display in the button. 081 */ 082 083 public KCheckBox(Icon icon) 084 { 085 super(icon); 086 087 setOpaque(!UIChangeManager.getInstance().getButtonsAreTransparent()); 088 } 089 090 } 091 092/* end of source file */