1 /* 2 Copyright aswing.org, see the LICENCE.txt. 3 */ 4 5 import org.aswing.Component; 6 import org.aswing.IEventDispatcher; 7 8 /** 9 * @author iiley 10 */ 11 interface org.aswing.ComboBoxEditor extends IEventDispatcher{ 12 13 /** 14 * Return the component that should be added to the tree hierarchy for 15 * this editor. 16 * <p> 17 * The editor component should can accept normal component event listeners such as 18 * Component.ON_RELEASE, Component.ON_PRESS ... 19 */ 20 public function getEditorComponent():Component; 21 22 /** 23 * Sets whether the editor is editable now. 24 */ 25 public function setEditable(b:Boolean):Void; 26 27 /** 28 * Returns whether the editor is editable now. 29 */ 30 public function isEditable():Boolean; 31 32 /** 33 * Add a listener to listen the editor event when the edited item changes. 34 * <p> 35 * addChangeListener(func:Function)<br> 36 * addChangeListener(func:Function, obj:Object) 37 * <p> 38 * @return the listener added. 39 * @see org.aswing.EventDispatcher#ON_ACT 40 * @see org.aswing.IEventDispatcher#addEventListener() 41 * @see org.aswing.IEventDispatcher#removeEventListener() 42 */ 43 public function addActionListener(func:Function, obj:Object):Object; 44 45 /** 46 * Set the item that should be edited. Cancel any editing if necessary. 47 */ 48 public function setValue(value:Object):Void; 49 50 /** 51 * Return the edited item. 52 */ 53 public function getValue():Object; 54 55 /** 56 * Ask the editor to start editing and to select everything in the editor. 57 */ 58 public function selectAll():Void; 59 } 60