PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/pyjs/tests/test007.js

http://pyjamas.googlecode.com/
JavaScript | 47 lines | 47 code | 0 blank | 0 comment | 0 complexity | c6cc72b97d56c4b8ac68543c596ae333 MD5 | raw file
 1__ui_UIObject.prototype.__class__ = "ui_UIObject";
 2function ui_UIObject() {
 3    return new __ui_UIObject();
 4}
 5function __ui_UIObject() {
 6}
 7__ui_UIObject.prototype.getElement = function() {
 8    return this.element;
 9};
10__ui_UIObject.prototype.setElement = function(element) {
11    this.element = element;
12};
13__ui_UIObject.prototype.setStyleName = function(style) {
14    DOM_setAttribute(this.element, "className", style);
15};
16pyjs_extend(__ui_Widget, __ui_UIObject);
17__ui_Widget.prototype.__class__ = "ui_Widget";
18function ui_Widget() {
19    return new __ui_Widget();
20}
21function __ui_Widget() {
22    __ui_UIObject.call(this);
23}
24__ui_Widget.prototype.setParent = function(parent) {
25    this.parent = parent;
26};
27pyjs_extend(__ui_Panel, __ui_Widget);
28__ui_Panel.prototype.__class__ = "ui_Panel";
29function ui_Panel() {
30    return new __ui_Panel();
31}
32function __ui_Panel() {
33    __ui_Widget.call(this);
34}
35pyjs_extend(__ui_ComplexPanel, __ui_Panel);
36__ui_ComplexPanel.prototype.__class__ = "ui_ComplexPanel";
37function ui_ComplexPanel() {
38    return new __ui_ComplexPanel();
39}
40function __ui_ComplexPanel() {
41    this.children = new pyjslib_List([]);
42}
43__ui_ComplexPanel.prototype.add = function(widget) {
44    this.children.append(widget);
45    widget.setParent(this);
46    return true;
47};