package com.rle.monitor; /* * RLE Surface Crack Detector Graphing Software * * Copyright (C) 2002 RLE Technologies * For more information visit http://www.rletech.com/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ /** * @author Andy Goth * @author Eric Peterson * @author Matt Lane * @version 0.1 */ import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.plaf.*; /** Checkbox with a more compact layout. */ public class MyCheckBox extends JCheckBox { private static final EventListenerList nullListenerList = new EventListenerList(); public MyCheckBox() {this(null, null, false);} public MyCheckBox(Icon icon) {this(null, icon, false);} public MyCheckBox(Icon icon, boolean sel) {this(null, icon, sel);} public MyCheckBox(String text) {this(text, null, false);} public MyCheckBox(String text, boolean sel) {this(text, null, sel);} public MyCheckBox(String text, Icon icon, boolean sel) { super(text, icon, sel); ComponentUI ui; ui = MyCheckBoxUI.createUI(this); ui.installUI(this); setUI(ui); } /** Sets the checkbox's value without sending event notifications. */ public void setSelectedQuiet(boolean sel) { EventListenerList listenerList = this.listenerList; this.listenerList = nullListenerList; super.setSelected(sel); this.listenerList = listenerList; } public boolean isFocusTraversable() {return isEnabled();} }