PageRenderTime 143ms CodeModel.GetById 80ms app.highlight 5ms RepoModel.GetById 55ms app.codeStats 0ms

/pyjs/tests/test006.js

http://pyjamas.googlecode.com/
JavaScript | 58 lines | 58 code | 0 blank | 0 comment | 3 complexity | 85ae96e913366f97dad3dd08a0daa5c4 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_FocusWidget, __ui_Widget);
28__ui_FocusWidget.prototype.__class__ = "ui_FocusWidget";
29function ui_FocusWidget(element) {
30    return new __ui_FocusWidget(element);
31}
32function __ui_FocusWidget(element) {
33    this.setElement(element);
34}
35pyjs_extend(__ui_ButtonBase, __ui_FocusWidget);
36__ui_ButtonBase.prototype.__class__ = "ui_ButtonBase";
37function ui_ButtonBase(element) {
38    return new __ui_ButtonBase(element);
39}
40function __ui_ButtonBase(element) {
41    __ui_FocusWidget.call(this, element);
42}
43__ui_ButtonBase.prototype.setHTML = function(html) {
44    DOM_setInnerHTML(this.getElement(), html);
45};
46pyjs_extend(__ui_Button, __ui_ButtonBase);
47__ui_Button.prototype.__class__ = "ui_Button";
48function ui_Button(html) {
49    return new __ui_Button(html);
50}
51function __ui_Button(html) {
52    if (typeof html == 'undefined') html=null;
53    __ui_ButtonBase.call(this, DOM_createButton());
54    this.setStyleName("gwt-Button");
55    if (html) {
56    this.setHTML(html);
57    }
58}