Hi,
qxtransformer is built into the qooxdoo tool chain, so when you have set it
up, you can do a simple ./generate.py transform to have the code written to
class files [1]. You still need to do "source" or "build" afterwards before
you can load the application into the browser - it is currently not meant to
be used for on-demand code generation.
The "compiled" code is not very pretty and contains many redundancies.
Formatted, the table code would look like this:
var containingFoldersTable = new qx.ui.table.Table(null, {
tableColumnModel : function(obj) {
return new qx.ui.table.columnmodel.Resize(obj);
}
});
this.containingFoldersTable = containingFoldersTable;
containingFoldersTable.setShowCellFocusIndicator(false);
containingFoldersTable.setStatusBarVisible(false);
containingFoldersTable
.getSelectionModel()
.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);
containingFoldersTable.setKeepFirstVisibleRowComplete(true);
qxGroupBox2.add(containingFoldersTable, {
flex : 1
});
var qxTableModel1 = new qx.ui.table.model.Simple();
qxTableModel1.setColumns(["FID", " ", "Folder"], ["folderId",
"icon", "path"]);
containingFoldersTable.setTableModel(qxTableModel1);
containingFoldersTable.getTableColumnModel().setColumnVisible(0,
false);
containingFoldersTable.getTableColumnModel().setColumnWidth(1, 30);
containingFoldersTable.getTableColumnModel().getBehavior()
.setWidth(1, 30);
containingFoldersTable.getTableColumnModel().setDataCellRenderer(1,
new qx.ui.table.cellrenderer.Image);
The non-optimized state of the code can be accepted, in my opinion, because
the UI generation is done only once, at application setup, so the gains from
any potential code-intensive optimization will be minimal.
What is important for me, when coding, is to be able to quickly throw in a
table with cut & paste without having to look up the quite complex syntax
that is necessary to set it up in javascript. For example, adding or
deleting columns is a snap in the declarative way, whereas in javascript,
columns have to be numbered explicitly and their properties are dispersed
over different models (the table model, the table column (resize) model).
Cheers,
C.
[1] http://qooxdoo.org/contrib/project/qxtransformer
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/In-search-of-a-GUI-designer-tp5153553p5157446.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel