r20514: implement idl for DsGetNT4ChangeLog() which transferres the meta data
[ira/wip.git] / webapps / qooxdoo-0.6.3-sdk / frontend / framework / source / class / qx / ui / pageview / tabview / TabView.js
1 /* ************************************************************************
2
3    qooxdoo - the new era of web development
4
5    http://qooxdoo.org
6
7    Copyright:
8      2004-2006 by 1&1 Internet AG, Germany, http://www.1and1.org
9
10    License:
11      LGPL 2.1: http://www.gnu.org/licenses/lgpl.html
12
13    Authors:
14      * Sebastian Werner (wpbasti)
15      * Andreas Ecker (ecker)
16
17 ************************************************************************ */
18
19 /* ************************************************************************
20
21 #module(ui_tabview)
22
23 ************************************************************************ */
24
25 qx.OO.defineClass("qx.ui.pageview.tabview.TabView", qx.ui.pageview.AbstractPageView,
26 function() {
27   qx.ui.pageview.AbstractPageView.call(this, qx.ui.pageview.tabview.Bar, qx.ui.pageview.tabview.Pane);
28 });
29
30
31
32
33
34 /*
35 ---------------------------------------------------------------------------
36   PROPERTIES
37 ---------------------------------------------------------------------------
38 */
39
40 qx.OO.changeProperty({ name : "appearance", type : "string", defaultValue : "tab-view" });
41
42 qx.OO.addProperty({ name : "alignTabsToLeft", type : "boolean", defaultValue : true });
43 qx.OO.addProperty({ name : "placeBarOnTop", type : "boolean", defaultValue : true });
44
45
46
47
48
49
50 /*
51 ---------------------------------------------------------------------------
52   MODIFIER
53 ---------------------------------------------------------------------------
54 */
55
56 qx.Proto._modifyAlignTabsToLeft = function(propValue, propOldValue, propData)
57 {
58   var vBar = this._bar;
59
60   vBar.setHorizontalChildrenAlign(propValue ? "left" : "right");
61
62   // force re-apply of states for all tabs
63   vBar._addChildrenToStateQueue();
64
65   return true;
66 }
67
68 qx.Proto._modifyPlaceBarOnTop = function(propValue, propOldValue, propData)
69 {
70   // This does not work if we use flexible zones
71   // this.setReverseChildrenOrder(!propValue);
72
73   var vBar = this._bar;
74
75   // move bar around
76   if (propValue) {
77     vBar.moveSelfToBegin();
78   } else {
79     vBar.moveSelfToEnd();
80   }
81
82   // force re-apply of states for all tabs
83   vBar._addChildrenToStateQueue();
84
85   return true;
86 }