r25048: From the archives (patch found in one of my old working trees):
[jelmer/samba4-debian.git] / webapps / qooxdoo-0.6.5-sdk / frontend / framework / source / class / qx / ui / pageview / AbstractPage.js
1 /* ************************************************************************
2
3    qooxdoo - the new era of web development
4
5    http://qooxdoo.org
6
7    Copyright:
8      2004-2007 1&1 Internet AG, Germany, http://www.1and1.org
9
10    License:
11      LGPL: http://www.gnu.org/licenses/lgpl.html
12      EPL: http://www.eclipse.org/org/documents/epl-v10.php
13      See the LICENSE file in the project's top-level directory for details.
14
15    Authors:
16      * Sebastian Werner (wpbasti)
17      * Andreas Ecker (ecker)
18
19 ************************************************************************ */
20
21 /* ************************************************************************
22
23
24 ************************************************************************ */
25
26 qx.OO.defineClass("qx.ui.pageview.AbstractPage", qx.ui.layout.CanvasLayout,
27 function(vButton)
28 {
29   qx.ui.layout.CanvasLayout.call(this);
30
31   if (vButton != null) {
32     this.setButton(vButton);
33   }
34 });
35
36
37
38
39
40 /*
41 ---------------------------------------------------------------------------
42   PROPERTIES
43 ---------------------------------------------------------------------------
44 */
45
46 /*!
47   The attached tab of this page.
48 */
49 qx.OO.addProperty({ name : "button", type : "object" });
50
51 /*!
52   Make element displayed (if switched to true the widget will be created, if needed, too).
53   Instead of qx.ui.core.Widget, the default is false here.
54 */
55 qx.OO.changeProperty({ name : "display", type : "boolean", defaultValue : false });
56
57
58
59
60 /*
61 ---------------------------------------------------------------------------
62   MODIFIER
63 ---------------------------------------------------------------------------
64 */
65
66 qx.Proto._modifyButton = function(propValue, propOldValue, propData)
67 {
68   if (propOldValue) {
69     propOldValue.setPage(null);
70   }
71
72   if (propValue) {
73     propValue.setPage(this);
74   }
75
76   return true;
77 }