📄 xmlresourceparsertest3.class.js
字号:
/*This is the JS code that goes together with the markup found inXmlResourceParserTest.class.xml*/// create the constructor for the prototype (super class)var MyListPanel = BiXmlResourceParser.getClassFromDocument( application.getResourceById("test-class-xml").getDocument() );_p = MyListPanel.prototype;_p._className = "MyListPanel";// override addXmlNode to add list items into the list_p.addXmlNode = function ( oNode, oXmlResourceParser ){ if ( oNode.nodeType == 1 ) // ELEMENT { var list = this.getComponentById( "list" ); var c = oXmlResourceParser.fromNode( oNode ); if ( c instanceof BiListItem ) list.add( c ); else BiComponent.prototype.addXmlNode.apply( this, arguments ); }};// create getter and setter for caption so we can set the caption_p.setCaption = function ( s ){ var label = this.getComponentById( "label" ); label.setText( s );};_p.getCaption = function (){ var label = this.getComponentById( "label" ); return label.getText();};_p.close = function (){ alert( "Close " + this.getCaption() );};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -