OFLA2 AsWing seesion Record
iiley June 16th, 2007
It’s avaliable here now : https://breeze.itap.purdue.edu/p20838194/
For other projects, here: http://osflash.org/ofla2
:)
iiley June 16th, 2007
It’s avaliable here now : https://breeze.itap.purdue.edu/p20838194/
For other projects, here: http://osflash.org/ofla2
:)
iiley June 14th, 2007
Had been released when AsWing A3 presented, the major change from 0.9 version is :
1. SkinBuilderLAF become completed and stable, a fla based skin Aoen skin example included. For flash cs3 compile tweaked, AsWing A3 is full compatible with Flash CS3.
2. JLabelButton and Form component is added.
3. Auto Drag and Drop support for JList is not included in this release, however, infact you can implement it by self based on current DragAndDrop system easily. We plan a better auto support for JList and JTree, so a major improvement would be done at next release.
Download it here : http://code.google.com/p/aswing/downloads/list
Alva Sun June 7th, 2007
A simple tutorial for using AsWing A3 in Flash CS3.
1.Select “Edit” -> “Proferences…”, open “Proferences” pane.
2.Select “ActionScript” in “Category”, press the “ActionScript 3.0 Settings…” button, open “ActionScript 3.0 Settings” pane.
Continue Reading »
iiley June 6th, 2007
When you want to make a form panel, i mean a table with row and columns, it’s not easy to layout them well with basic layout managers, like this example:
With the new extension class org.aswing.ext.Form(on svn now), you can easily create that form by such code:
private var form:Form;
private var frame:JFrame;
public function Form1(){
super();
AsWingManager.initAsStandard(this);
form = new Form();
form.addRow(createRightAlignLabel("ID:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("NickName:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Email:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Password:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Repeat Password:"), new JTextField("", 8));
frame = new JFrame(null, "Form1");
frame.setContentPane(form);
frame.pack();
frame.show();
}
private function createRightAlignLabel(text:String):JLabel{
return new JLabel(text, null, JLabel.RIGHT);
}
Maybe you’ll say it is not hard to layout that with GridLayout or BoxLayout/SoftBoxLayout, yes, it is for that simple case, but how abou this:
It is not that easy as the first, but with Form class, it’s same easy:
private var form:Form;
private var frame:JFrame;
public function Form2(){
super();
AsWingManager.initAsStandard(this);
form = new Form();
form.setBorder(new EmptyBorder(null, new Insets(2, 2, 2, 2)));
var label:JLabel;
form.addRow(createRightAlignLabel("ID:"), new JTextField("", 8));
label = createLeftAlignLabel("Must be 4-14 letters or numbers");
//label will sit 1 and 2 columns(0 column blank)
form.addRow(null, label, label);
form.addRow(createRightAlignLabel("NickName:"), new JTextField("", 8));
form.addRow(
createRightAlignLabel("Sex:"),
form.flowLeftHold(4, new JRadioButton("Female"), new JRadioButton("Male")));
form.addRow(createRightAlignLabel("Email:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Password:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Repeat Password:"), new JTextField("", 8));
//Conform button sit at center of number 1 column(0 and 2 column blank)
form.addRow(null, form.centerHold(new JButton("Conform")), null);
frame = new JFrame(null, "Form2");
frame.setContentPane(form);
frame.pack();
frame.show();
}
private function createRightAlignLabel(text:String):JLabel{
return new JLabel(text, null, JLabel.RIGHT);
}
private function createLeftAlignLabel(text:String):JLabel{
return new JLabel(text, null, JLabel.LEFT);
}
Wow, not super hard to layout that, i did that before, well, how about this:
With Form class, it is as easy as last, just a little line code added, here:
private var form:Form;
private var frame:JFrame;
public function Form3(){
super();
AsWingManager.initAsStandard(this);
form = new Form();
form.setBorder(new EmptyBorder(null, new Insets(2, 2, 2, 2)));
var label:JLabel;
form.addRow(createRightAlignLabel("ID:"), new JTextField("", 8), createLeftAlignLabel("Case sensitive"));
label = createLeftAlignLabel("Must be 4-14 letters or numbers");
//label will sit 1 and 2 columns(0 column blank)
form.addRow(null, label, label);
form.addRow(createRightAlignLabel("NickName:"), new JTextField("", 8), createLeftAlignLabel("Case sensitive"));
form.addRow(
createRightAlignLabel("Sex:"),
form.flowLeftHold(4, new JRadioButton("Female"), new JRadioButton("Male")), new JRadioButton("Both?"));
//add a separator
form.addSeparator();
form.addRow(createRightAlignLabel("Email:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Password:"), new JTextField("", 8));
form.addRow(createRightAlignLabel("Repeat Password:"), new JTextField("", 8));
//add a separator
form.addSeparator();
//use append to make it sit the whole row
form.append(form.flowLeftHold(2, new JCheckBox("I Accept"), new JLabelButton(" The licence")));
//Conform button sit at center of number 1 column(0 and 2 column blank)
form.addRow(null, form.centerHold(new JButton("Conform")), null);
frame = new JFrame(null, "Form3");
frame.setContentPane(form);
frame.pack();
frame.show();
}
private function createRightAlignLabel(text:String):JLabel{
return new JLabel(text, null, JLabel.RIGHT);
}
private function createLeftAlignLabel(text:String):JLabel{
return new JLabel(text, null, JLabel.LEFT);
}
Is that make you easier layout such style tables for you? Hope so.
iiley June 3rd, 2007
Igor Sadovskiy has implemented event bubbling for mouse event of AsWing A2 these days, the details are:
This week we made significant improvement in the AsWing A2 event dispatching engine. Currently all mouse events (ON_CLICK, ON_PRESS, ON_RELEASE, ON_RELEASE_OUTSIDE, ON_ROLL_OVER, ON_ROLL_OUT, ON_DRAG_OVER and ON_DRAG_OUT) are bubble-based. It means once event will be captured by some component and dispatched to all its listeners, event will be passed to its parent for dispatching and so on until the top level container will be reached. It means you don’t need to care about preventing event capturing by children components using setTriggerEnabled(false) in order to capture event by parent component. So currently AsWing A2 event model is similar to AsWing A3 or Flex2, but more simpler. There is only one phase – dispatching events from child to parents. Also bubble event can be canceled by any listener to prevent further dispatching to parent containers.
The updated version is available in the SVN so you can update your sources and try it. Please let us know if you will recognize any problems with your AsWing application after migration to new event dispatching engine.