1  /*
     2   Copyright aswing.org, see the LICENCE.txt.
     3  */
     4  
     5  import org.aswing.*;
     6  import org.aswing.plaf.*;
     7  
     8  /**
     9   * An implementation of a two-state button.  
    10   * The <code>JRadioButton</code> and <code>JCheckBox</code> classes
    11   * are subclasses of this class.
    12   * @author iiley
    13   */
    14  class org.aswing.JToggleButton extends AbstractButton{
    15  	/**
    16       * JToggleButton(text:String, icon:Icon)<br>
    17       * JToggleButton(text:String)<br>
    18       * JToggleButton(icon:Icon)
    19       * <p>
    20  	 */
    21  	public function JToggleButton(text, icon:Icon){
    22  		super(text, icon);
    23  		setName("JToggleButton");
    24      	setModel(new ToggleButtonModel());
    25  		updateUI();
    26  	}
    27  	
    28  	public function updateUI():Void{
    29      	setUI(ButtonUI(UIManager.getUI(this)));
    30      }
    31      
    32  	public function getUIClassID():String{
    33  		return "ToggleButtonUI";
    34  	}
    35  }
    36