<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>js</title>
<style>
.btUi {
border: solid 1px green;
}
</style>
<link type="text/css" media="all" rel="Stylesheet" href="http://localhost:80/wratry/Ext/css/ext-all.css" />
<script src="http://localhost:80/wratry/Ext/ext-base.js" type="text/javascript">
</script>
<script src="http://localhost:80/wratry/Ext/ext-all.js" type="text/javascript">
</script>
</head>
<body>
<div id='java'>
</div>
<script language="JavaScript" type="text/javascript">
Ext.onReady(function(){
Ext.namespace("sp.studio");
sp.studio.ListDiv = Ext.emptyFn;
sp.studio.ListDiv = function(cfg){
Ext.apply(this, cfg);
// Ext.extend(this,Ext.Window,{});
this.init(cfg.el);
};
Ext.apply(sp.studio.ListDiv.prototype, {
El: function(){
return Ext.get(this['el']);
},
setWidth: function(width){
this.El().dom.style.width = width + "px";
},
setHeight: function(height){
this.El().dom.style.height = height + "px";
},
setClass: function(cls){
this.El().dom.className = cls;
},
rendererTo: function(){
for (var i in this) {
if (i == 'width') {
this.setWidth(this[i]);
}
if (i == 'height') {
this.setHeight(this[i]);
}
if (i == 'cls') {
this.setClass(this[i]);
}
}
},
init: function(el){
if (el) {
this.rendererTo();
}
}
});
var t = new sp.studio.ListDiv({
width: 100,
height: 200,
cls: 'btUi',
el: 'java',
});
t.renderTo('java');
t.show();
//t.rendererTo("java");
});
</script>
</body>
</html>
分享到:
相关推荐
class ColorTest extends Test{} 上面代码定义了一个ColorTest类,该类通过extends关键字,继承了Test类的所有属性和方法。但是由于没有部署任何代码,所以这两个类完全一样,等于复制了一个Test类。下面,我们在...
flume-ng extends source jar flume-ng-extends-source-0.8.0.jar
Test if icmpeq extends Dx Test Case for Linux.Test if icmpeq extends Dx Test Case for Linux.
extends LinearLayout 实现侧滑菜单 要点: 1 FrameLayout布局的特性 2 对以下方法的理解: 2.1 Override computeScroll() 2.2 Scroller
继承的使用方法,extends使用的小java程序。
Cursor Wrapper Test extends Android Test Case.
Nine Patch Test extends Android Test Case.
Java中extends类的继承
Test invoke interface range extends Dx Test Case.
Test new instance extends Dx Test Case for Embedded Linux.
Test const class extends Dx Test Case Source Code for Linux.
public class DecodeActivity extends Activity implements SurfaceHolder.Callback { // private static final String strVideo = // Environment.getExternalStorageDirectory() + "/test/xx.avi"; // ...
觉得自己java学得不错那你下来做做。。对学习extends很有帮助。。。特别是将要毕业的大学生
import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import javax.swing.JButton; import javax.swing.JFrame;...
java中extends与implements的区别.docx
Test if acmpeq extends Dx Test Case Source Code for Linux.
Test rem float addr extends Dx Test Case for Embedded Linux.
Defined In: Ext.js Class: Array Extends: Object Public Properties This class has no public properties. Public Methods Method Defined By indexOf( Object o ) : Number Checks whether or not the ...
Test_dload_3 extends Dx Test Case for Andriod.
Test shl int lit8 extends DxTestCase for Linux.