3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>qooxdoo » Demo</title>
5 <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
7 <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
9 <script type="text/javascript" src="../../script/qx.js"></script>
12 <script type="text/javascript" src="../../script/layout.js"></script>
14 <div id="demoDescription">
15 <p>Testing qx.ui.listview.ListView with text cells.</p>
16 <p>Testing of column alignment, resizeable prohibition for columns and live resizing.</p>
19 <script type="text/javascript">
20 qx.core.Init.getInstance().defineMain(function()
23 var lt = [ "Image", "Text", "PDF", "Illustration", "Document" ];
25 for (var i=0, t; i<1000; i++)
27 t=Math.round(Math.random()*4);
28 ld.push({ name : { text : "File " + i }, size : { text : Math.round(Math.random()*100) + "kb" }, type : { text : lt[t] }, modified : { text : "Nov " + Math.round(Math.random() * 30 + 1) + " 2005" }, rights: { text : "-rw-r--r--" }});
33 name : { label : "Name", width : 100, type : "text" },
34 size: { label : "Size", width : 50, type : "text", align : "right", resizable : false },
35 type : { label : "Type", width : 80, type : "text" },
36 modified : { label : "Last Modified", width : 150, type : "text" },
37 rights : { label : "Rights", width: 80, type : "text" }
40 var lv = new qx.ui.listview.ListView(ld, lc);
42 lv.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);
43 lv.setBackgroundColor("white");
46 lv.setLocation(20, 48);
48 // Prohibit resizing of columns completly
49 // lv.setResizable(false);
51 qx.ui.core.ClientDocument.getInstance().add(lv);
56 var chk1 = new qx.ui.form.CheckBox("Enable Live Resize");
57 chk1.setLocation(20, 420);
58 qx.ui.core.ClientDocument.getInstance().add(chk1);
60 chk1.addEventListener("changeChecked", function(e) {
61 lv.setLiveResize(e.getData());