Warning: include_once(/home/aswing/aswing.org/home/wp-content/plugins/wordpress-support/wordpress-support.php): failed to open stream: Permission denied in /home/aswing/aswing.org/home/wp-settings.php on line 261

Warning: include_once(): Failed opening '/home/aswing/aswing.org/home/wp-content/plugins/wordpress-support/wordpress-support.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/aswing/aswing.org/home/wp-settings.php on line 261
AsWing » 2007 » June

Archive for June, 2007

OFLA2 AsWing seesion Record

June 16th, 2007

It’s avaliable here now : https://breeze.itap.purdue.edu/p20838194/

For other projects, hemorrhoids here: http://osflash.org/ofla2

:)

AsWing A3 1.0 was released during the OFLA2

June 14th, 2007

5
Had been released when AsWing A3 presented, more about
the major change from 0.9 version is :

1. SkinBuilderLAF become completed and stable, this
a fla based skin Aoen skin example included. For flash cs3 compile tweaked, visit
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

Flash CS3 with AsWing A3 tutorial

June 7th, 2007

A simple tutorial for using AsWing A3 in Flash CS3.

1.Select “Edit” -> “Proferences…”, here
  open “Proferences” pane.

1

2.Select “ActionScript” in “Category”, press the “ActionScript 3.0 Settings…” button, open “ActionScript 3.0 Settings” pane.
Continue Reading »

ext class — Form make layout easily

June 6th, 2007

When you want to make a form panel, generic i mean a table with row and columns, sickness it’s not easy to layout them well with basic layout managers, generic like this example:

form1

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:

form2

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:

form3

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.

Download the example source.

A2 Update in event dispatching engine: event bubbling

June 3rd, 2007

Igor Sadovskiy has implemented event bubbling for mouse event of AsWing A2 these days, geriatrician 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.

  • A2 , Announcement
  • Comments Off on A2 Update in event dispatching engine: event bubbling