1 /* 2 Copyright aswing.org, see the LICENCE.txt. 3 */ 4 5 import org.aswing.*; 6 import org.aswing.plaf.*; 7 import org.aswing.plaf.basic.*; 8 9 /** 10 * Basic CheckBox implementation. 11 * To implement a Diff CheckBox UI, generally you should: 12 * <ul> 13 * <li>extends your RadioButtonUI to inherite diff features of buttons. 14 * <li>implement a diff Icon for it, and put it into UI defaults with "CheckBox.icon" as key. 15 * <li>initialize differnt UI defaults for buttons in your LAF class, for example: Button.border, 16 * Button.font, ToggleButton.backgound XXXButton.foreground... 17 * </ul> 18 * @author iiley 19 */ 20 class org.aswing.plaf.basic.BasicCheckBoxUI extends BasicRadioButtonUI{ 21 22 private static var propertyPrefix:String = "CheckBox" + "."; 23 private static var checkBoxUI:ComponentUI; 24 25 // ******************************** 26 // Create PLAF 27 // ******************************** 28 public static function createInstance(c:Component):ComponentUI { 29 if(checkBoxUI == null){ 30 checkBoxUI = new BasicCheckBoxUI(); 31 } 32 return checkBoxUI; 33 } 34 35 private function getPropertyPrefix():String { 36 return propertyPrefix; 37 } 38 39 public function BasicCheckBoxUI() { 40 super(); 41 } 42 } 43