1 rio.components.Base = rio.Component.create("Base", {
  2 	attrReaders: [
  3 		["className", ""],
  4 		["seleniumId", ""]
  5 	],
  6 	styles: ["position", "top", "right", "bottom", "left", "display"],
  7 	methods: {
  8 		html: function() {
  9 			if (!this._html) { 
 10 				this._html = this.buildHtml();
 11 				this._html.addClassName(this.getClassName());
 12 				
 13 				if (rio.environment.supportSelenium) {
 14 					this._html.id = this.getSeleniumId();
 15 				}
 16 				
 17 				this._html.applyStyle({
 18 					position: this.position,
 19 					top: this.top,
 20 					right: this.right,
 21 					bottom: this.bottom,
 22 					left: this.left,
 23 					display: this.display
 24 				});
 25 			}
 26 			return this._html;
 27 		},
 28 		
 29 		addClassName: function(className) {
 30 			this.html().addClassName(className);
 31 			this._className = this.html().className;
 32 		},
 33 
 34 		removeClassName: function(className) {
 35 			this.html().removeClassName(className);
 36 			this._className = this.html().className;
 37 		},
 38 		
 39 		show: function() {
 40 			this.setDisplay("");
 41 		},
 42 		
 43 		hide: function() {
 44 			this.setDisplay("none");
 45 		}
 46 	}
 47 });