Basic methods to help AsWing UI construction.
static public function createTiledPanel(caption:String, margin:Number):JPanelCreates a new JPanel with TiledBorder
static public function createTiledBorder(caption:String, margin:Number):BorderCreates a tiled border.
static public function createButton(caption:String, icon:Icon):JButtonCreates and returns new JButton using passed-in arguments.
caption | Button's label. |
icon | Button's icon |
static public function createLabel(caption:String):JLabel
Creates and returns a JLabel with passed-in caption
Horizontal alignment is set to JLabel.LEFT
static public function createLabelWidth(width:Number, caption:String):JLabel
Creates and returns a JLabel with passed-in caption
Horizontal alignment is set to JLabel.LEFT
static public function createListeneableTextField(func:Function, context):JTextFieldCreates and returns new JTextField with text change listener.
func | Handler to call when text change |
context | Handler scope |
static public function createListeneableTextArea(func:Function, context):JTextAreaCreates and returns new JTextArea with text change listener.
func | Handler to call when text change |
context | Handler scope |
static public function createActionListeneableTextField(func:Function, context):JTextFieldCreates and returns new JTextField with text actions listener.
Change event is broadcasted only when user press Enter button or when textfield loose focus.
Use createListeneableTextField() method to listen text change event.
func | Handler to call when text change |
context | Handler scope |