⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui2.moz.js

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 JS
📖 第 1 页 / 共 5 页
字号:
this._xulElement.parentNode.replaceChild(mi,this._xulElement);this._xulElement=mi;}
else {var m=document.createElementNS(xulNs,"menu");BiMenuItem._copyProperties(this._xulElement,m);if(this._xulElement.parentNode)
this._xulElement.parentNode.replaceChild(m,this._xulElement);this._xulElement=m;this._xulElement.appendChild(oMenu._xulElement);}
this._subMenu=oMenu;if(this._subMenu)
{this._subMenu._parent=this;}}};BiMenuItem._copyProperties=function(fromEl,toEl)
{toEl.setAttribute("id",fromEl.getAttribute("id"));toEl.setAttribute("type",fromEl.getAttribute("type"));toEl.setAttribute("label",fromEl.getAttribute("label"));toEl.setAttribute("accesskey",fromEl.getAttribute("accesskey"));toEl.setAttribute("acceltext",fromEl.getAttribute("acceltext"));toEl.setAttribute("oncommand",fromEl.getAttribute("oncommand"));if(fromEl.hasAttribute("disabled"))
toEl.setAttribute("disabled",fromEl.getAttribute("disabled"));if(fromEl.hasAttribute("checked"))
toEl.setAttribute("checked",fromEl.getAttribute("checked"));toEl.visible=fromEl.visible;toEl.tooltipText=fromEl.tooltipText;toEl.setAttribute("style",fromEl.getAttribute("style"));toEl.setAttribute("class",fromEl.getAttribute("class"));};_p.setVisible=function(b){this._xulElement.hidden=!b;};_p.getVisible=function(){return!this._xulElement.hidden;};_p.getIsVisible=function(){return this.getVisible()&&this._parent&&this._parent.getIsVisible();};_p.setEnabled=function(b)
{if(this.getEnabled()!=b)
{if(!b)
this._xulElement.setAttribute("disabled","true");else this._xulElement.removeAttribute("disabled");this.dispatchEvent(new BiEvent("enabledchanged"));}};_p.getEnabled=function(){return!this._xulElement.hasAttribute("disabled");};_p.setShortcutText=function(s)
{this._xulElement.setAttribute("acceltext",s);};_p.getShortcutText=function()
{return this._xulElement.getAttribute("acceltext");};_p.setToolTipText=function(s)
{this._xulElement.tooltipText=s;};_p.getToolTipText=function()
{return this._xulElement.tooltipText;};_p.getScreenLeft=function(){return this._xulElement.boxObject.x;};_p.getScreenTop=function(){return this._xulElement.boxObject.y;};_p._onaction=function(){BiTimer.callOnce(function(){this.dispatchEvent(new BiEvent("action"));if(this._command)
this._command.execute();},1,this);};_p.dispose=function(){if(this._disposed)return;BiEventTarget.prototype.dispose.call(this);if(this._subMenu){this._subMenu.dispose();this._subMenu=null;}
this.__onaction=null;if(this._xulElement&&this._xulElement.parentNode)
this._xulElement.parentNode.removeChild(this._xulElement);this._xulElement=null;this._parent=null;};_p.addXmlNode=function(oNode,oXmlResourceParser)
{if(oNode.nodeType==3)
{if(!/^\s*$/.test(oNode.data))
{this.setText(this.getText()+oNode.data);}}
else if(oNode.nodeType==1&&!this.getSubMenu())
{var m=oXmlResourceParser.fromNode(oNode);if(m instanceof BiMenu)
this.setSubMenu(m);}};BiMenuItem.prototype.getCommand=function(){return this._command;};_p.setCommand=BiComponent.prototype.setCommand;_p._syncWithCommmand=function()
{if(this._command)
{this.setEnabled(this._command.getEnabled());this.setShortcutText(this._command.getShortcut());}};_p.setAttribute=function(sName,sValue,oXmlResourceParser)
{switch(sName)
{case"icon":this.setIcon(BiImage.fromUri(sValue));break;case"command":if(sValue.charAt(0)=="#")
sValue=sValue.substr(1);var c=oXmlResourceParser.getComponentById(sValue);this.setCommand(c);break;default:BiEventTarget.prototype.setAttribute.apply(this,arguments);}};function BiMenuSeparator(){if(_biInPrototype)return;BiMenuItem.call(this);this._xulElement=document.createElementNS(xulNs,"menuseparator");}
_p=_biExtend(BiMenuSeparator,BiMenuItem,"BiMenuSeparator");function BiCheckBoxMenuItem(sText,bChecked,oSubMenu)
{if(_biInPrototype)return;BiMenuItem.call(this,sText,oSubMenu);this._xulElement.setAttribute("type","checkbox");if(bChecked)
this._xulElement.setAttribute("checked","true");}
_p=_biExtend(BiCheckBoxMenuItem,BiMenuItem,"BiCheckBoxMenuItem");_p._userValue=null;BiCheckBoxMenuItem.prototype.getUserValue=function(){return this._userValue;};_p.setUserValue=function(v)
{if(this._userValue!=v)
{this._userValue=v;if(this._command)
this._command.setUserValue(v);}};_p.getChecked=function(){return this._xulElement.hasAttribute("checked");};_p.setChecked=function(b)
{if(this.getChecked()!=b)
{if(b)
this._xulElement.setAttribute("checked","true");else this._xulElement.removeAttribute("checked");this.dispatchEvent(new BiEvent("change"));if(this._command)
this._command.setChecked(b);}};_p.getValue=_p.getChecked;_p.setValue=_p.setChecked;_p._onaction=function(){this.dispatchEvent(new BiEvent("action"));if(this._command)
this._command.execute();this.dispatchEvent(new BiEvent("change"));if(this._command)
this._command.setChecked(this.getChecked());};_p._syncWithCommmand=function()
{if(this._command)
{this.setEnabled(this._command.getEnabled());this.setShortcutText(this._command.getShortcut());this.setChecked(this._command.getChecked());this.setUserValue(this._command.getUserValue());}};function BiRadioButtonMenuItem(sText,bChecked,oSubMenu)
{if(_biInPrototype)return;BiMenuItem.call(this,sText,oSubMenu);this._xulElement.setAttribute("type","radio");if(bChecked)
this._xulElement.setAttribute("checked","true");this._checked=bChecked;}
_p=_biExtend(BiRadioButtonMenuItem,BiMenuItem,"BiRadioButtonMenuItem");_p._group=null;_p._checked=false;_p._userValue=null;BiRadioButtonMenuItem.prototype.getUserValue=function(){return this._userValue;};_p.setUserValue=function(v)
{if(this._userValue!=v)
{this._userValue=v;if(this._command)
this._command.setUserValue(v);}};_p.getChecked=function(){return this._xulElement.hasAttribute("checked");};_p.setChecked=function(b)
{if(this._checked!=b){if(b)
this._xulElement.setAttribute("checked","true");else this._xulElement.removeAttribute("checked");this._checked=b;this.dispatchEvent(new BiEvent("change"));if(this._group&&b)
this._group.setSelected(this);if(this._command)
this._command.setChecked(b);}};_p.getValue=_p.getChecked;_p.setValue=_p.setChecked;BiRadioButtonMenuItem.prototype.getGroup=function(){return this._group;};_p.setGroup=function(oRadioGroup){if(this._group!=oRadioGroup){if(this._group)
this._group.remove(this);this._group=oRadioGroup;if(this._group){this._group.add(this);}}};_p._onaction=function(){this.setChecked(true);this.dispatchEvent(new BiEvent("action"));if(this._command)
this._command.execute();};_p.setAttribute=function(sName,sValue,oParser)
{switch(sName)
{case"group":if(sValue.charAt(0)=="#")
sValue=sValue.substr(1);var c=oParser.getComponentById(sValue);this.setGroup(c);break;default:BiMenuItem.prototype.setAttribute.apply(this,arguments);}};_p._syncWithCommmand=function()
{if(this._command)
{this.setEnabled(this._command.getEnabled());this.setShortcutText(this._command.getShortcut());this.setChecked(this._command.getChecked());this.setUserValue(this._command.getUserValue());}};function BiMenuBar(){if(_biInPrototype)return;BiComponent.call(this);this._xulElement=document.createElementNS(xulNs,"menubar");this.id=menuCache.getId();menuCache[this.id]=this;}
_p=_biExtend(BiMenuBar,BiComponent,"BiMenuBar");_p._acceptsEnter=true;_p._acceptsEsc=true;_p.add=function(oChild,oBefore,bAnonymous){if(oBefore)
this._xulElement.insertBefore(oChild._xulElement,oBefore._xulElement);else this._xulElement.appendChild(oChild._xulElement);BiComponent.prototype.add.call(this,oChild,oBefore,bAnonymous);};_p.remove=function(oChild){this._xulElement.removeChild(oChild._xulElement);BiComponent.prototype.remove.call(this,oChild);return oChild;};_p.getTabChildren=function(){return this._children.filter(function(c){return c instanceof BiComponent;});};_p._addHtmlElement=function(oChild,oBefore){};_p._create=function(oDocument){BiComponent.prototype._create.call(this,oDocument);this._element.appendChild(this._xulElement);};_p._createChildren=function(oDocument,bLayout){BiComponent.prototype._createChildren.call(this,oDocument,bLayout);};_p.layoutAllChildren=function(){};_p._invalidate=function(){};_p.addXmlNode=function(oNode,oXmlResourceParser)
{if(oNode.nodeType==1)
{var c=oXmlResourceParser.fromNode(oNode);if(c instanceof BiMenuButton)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -