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

📄 stack.js

📁 DWR is the way for AJAX implementation
💻 JS
字号:
/* * Copyright (c) 2001-2007, TIBCO Software Inc. * Use, modification, and distribution subject to terms of license. */jsx3.require("jsx3.gui.Block");jsx3.Class.defineClass("jsx3.gui.Stack",jsx3.gui.Block,null,function(g,r){var Jb=jsx3.gui;var ub=Jb.Event;var Y=Jb.Block;g.ORIENTATIONV=0;g.ORIENTATIONH=1;g.ACTIVECOLOR="#aaaafe";g.INACTIVECOLOR="#aaaacb";g.CHILDBGCOLOR="#ffffff";g.BORDER="solid 1px #ffffff;solid 1px #9898a5;solid 1px #9898a5;solid 1px #ffffff";g.CAPTION_BORDER="solid 1px #c8c8d5;solid 1px #9898a5;solid 1px #9898a5;solid 1px #c8c8d5";g.BACKGROUND=jsx3.html.getCSSFade(false);g.BACKGROUNDH=jsx3.html.getCSSFade(true);r.init=function(a,p){this.jsxsuper(a,null,null,null,null,p);var Ab=new Y(a+"_content",0,0,"100%","100%");Ab.setOverflow(Y.OVERFLOWSCROLL);Ab.setBorder(g.BORDER);Ab.setBackgroundColor(g.CHILDBGCOLOR);this.setChild(Ab,jsx3.app.Model.PERSISTEMBED,null,jsx3.app.Model.FRAGMENTNS);};r.onSetParent=function(o){return Jb.StackGroup&&o instanceof Jb.StackGroup;};r.doShowStack=function(){this.pv(this.isOldEventProtocol());};r.doShow=function(){this.pv(false);};r.pv=function(i,d){var Mb=this.getParent();if(this==Mb.getChild(Mb.getSelectedIndex()))return;Mb.setSelectedIndex(this.getChildIndex());if(i instanceof ub){var B=jsx3.html.getJSXParent(i.srcElement());if(B!=null&&B!=this)return;}var fb=Mb.RL();Mb.nW({left:0,top:0,parentwidth:fb.explicit.width,parentheight:fb.explicit.height},true);if(i)this.doEvent(Jb.Interactive.EXECUTE,{objEVENT:i instanceof ub?i:null});this.doEvent(Jb.Interactive.SHOW);if(d)d.focus();};r.CL=function(s,m){m.style.backgroundColor=this.getActiveColor();return;if(jsx3.EventHelp.isDragging())this.pv(s);var T=jsx3.html.getCSSOpacity(0.75);Jb.Painted.HM(m,T);};r.u2=function(p,n){n.style.backgroundColor=this.getInactiveColor();return;var F=jsx3.html.getCSSOpacity(1);Jb.Painted.HM(n,F);};r.getContentChild=function(){var rb=this.getChildren().length;for(var U=0;U<rb;U++){var vb=this.getChild(U);if(!(Jb.Menu&&vb instanceof Jb.Menu)&&!(Jb.ToolbarButton&&vb instanceof Jb.ToolbarButton))return vb;}return null;};r.DY=function(p,i){if(this.jsxsupermix(p,i))return;if(p.enterKey()||p.spaceKey()){this.pv(p);p.cancelAll();}};g.s5={};g.s5[ub.CLICK]="pv";g.s5[ub.KEYPRESS]=true;g.s5[ub.MOUSEOVER]=true;g.s5[ub.MOUSEOUT]=true;r.IO=function(a){if(this.getParent()){var Ob=this.getParent().IO(this);var H=this.getParent().paintBarSize();return this.getOrientation()==Jb.StackGroup.ORIENTATIONV?{boxtype:"box",left:0,top:H,width:Ob.parentwidth,height:Ob.parentheight-H,parentwidth:Ob.parentwidth,parentheight:Ob.parentheight-H}:{boxtype:"box",left:H,top:0,width:Ob.parentwidth-H,height:Ob.parentheight,parentwidth:Ob.parentwidth-H,parentheight:Ob.parentheight};}return {};};r.k7=function(p,m,b){var pc=this.RL(true,p);if(m){pc.recalculate(p,m,b);var P=this.getParent().paintBarSize();var Z=pc.XK();var wb=pc.P5();var vc={};if(this.getOrientation()==Jb.StackGroup.ORIENTATIONV){vc.height=P;vc.parentwidth=p.parentwidth;}else{vc.width=P;vc.parentheight=p.parentheight;}var H=pc.pQ(0);H.recalculate(vc,m?m.childNodes[0]:null,b);var Cc=this.getContentChild();if(Cc!=null){if(this.isFront()){var Zb=this.getOrientation()==Jb.StackGroup.ORIENTATIONV?{boxtype:"box",left:0,top:P,width:Z,height:wb-P,parentwidth:Z,parentheight:wb-P}:{boxtype:"box",left:P,top:0,width:Z-P,height:wb,parentwidth:Z-P,parentheight:wb};b.add(Cc,Zb,Cc.getRendered(m),true);Cc.setVisibility(Y.VISIBILITYVISIBLE,true);}else{Cc.setVisibility(Y.VISIBILITYHIDDEN,true);}}}};r.T5=function(n){if(this.getParent()&&(n==null||isNaN(n.parentwidth)||isNaN(n.parentheight))){n=this.getParent().IO(this);}else{if(n==null){n={};}}n.width="100%";n.height="100%";n.tagname="div";n.boxtype="box";var Fc=new Jb.Painted.Box(n);var Ac=this.getParent().paintBarSize();var u={};u.parentwidth=Fc.XK();u.parentheight=Fc.P5();if(this.getOrientation()==Jb.StackGroup.ORIENTATIONV){u.width="100%";u.height=Ac;}else{u.width=Ac;u.height="100%";}u.left=0;u.top=0;u.tagname="div";u.boxtype="box";u.border=g.CAPTION_BORDER;u.padding="0 0 0 4";var kb=new Jb.Painted.Box(u);Fc.W8(kb);u={};u.tagname="div";u.boxtype="box";u.left=0;u.top=0;u.padding=this.getPadding();var xb=new Jb.Painted.Box(u);kb.W8(xb);return Fc;};r.paint=function(){if(!(this.getParent() instanceof Jb.StackGroup))return "";this.applyDynamicProperties();var Qb=this.RL(true);Qb.setAttributes("id=\""+this.getId()+"\" label=\""+this.getName()+"\" class=\""+this.CH()+"\"");Qb.setStyles("overflow:hidden;");var M=this.lM(g.s5,1);var Ib=this.renderAttributes(null,true);var Mb=Qb.pQ(0);Mb.setAttributes(this.CI()+this.vH()+M+Ib+" class=\"jsx30stack_handle\"");Mb.setStyles(this.UZ()+this.K2()+this.QP()+this.oY()+this.g0()+this.D6()+this.eQ()+this.iN());var jb=this.getChildren();var hc=[],sc=[];for(var B=0;B<jb.length;B++){var Fb=jb[B].paint();if(Jb.Menu&&jb[B] instanceof Jb.Menu||Jb.ToolbarButton&&jb[B] instanceof Jb.ToolbarButton){sc.push(jb[B]);}else{if(hc.length==0){hc.push(jb[B]);}}}var kc=this.paintChildren(sc);var Ic=this.paintChildren(hc);var Bc=Mb.pQ(0);var tb=this.getOrientation()==Jb.StackGroup.ORIENTATIONV?"jsx30stack_textv":"jsx30stack_texth";Bc.setAttributes(" class=\""+tb+"\" unselectable=\"on\" ");var Tb=Bc.paint().join(this.AN());return Qb.paint().join(Mb.paint().join(Tb+kc)+Ic);};r.eQ=function(){var pc;if(this.getTextAlign()){pc=this.getTextAlign();}else{if(this.getParent()&&this.getOrientation()==Jb.StackGroup.ORIENTATIONV){pc=Y.ALIGNRIGHT;}else{pc=Y.ALIGNLEFT;}}return "text-align:"+pc+";";};r.setText=function(l,a){this.jsxsuper(l,false);var jc;if(a&&(jc=this.getRendered())!=null)jc.firstChild.firstChild.innerHTML=l;return this;};r.getPadding=function(){var x=this.jsxsuper();return x!=null&&x!=""?x:"5 5 5 5";};r.getFontWeight=function(){return this.jsxsuper()||Y.FONTBOLD;};r.K2=function(){return (this.getBackground()?this.getBackground():this.getOrientation()==g.ORIENTATIONH?g.BACKGROUNDH:g.BACKGROUND)+";";};r.CI=function(){return this.jsxsuper(this.getIndex()||Number(0));};r.getActiveColor=function(){return this.jsxactivecolor==null?g.ACTIVECOLOR:this.jsxactivecolor;};r.setActiveColor=function(i){this.jsxactivecolor=i;return this;};r.getInactiveColor=function(){return this.jsxinactivecolor==null?g.INACTIVECOLOR:this.jsxinactivecolor;};r.setInactiveColor=function(n){this.jsxinactivecolor=n;return this;};r.getOrientation=function(){return this.getParent()!=null?this.getParent().getOrientation():g.ORIENTATIONV;};r.focus=function(){this.doShowStack();this.jsxsuper();};r.isFront=function(){var Ab=this.getParent().getChildren();var qc=Ab.indexOf(this);return qc>=0&&this.getParent().getSelectedIndex()==qc;};r.getMaskProperties=function(){return Y.MASK_NO_EDIT;};g.getVersion=function(){return "3.0.00";};r.vO=function(h){var vb=this.getContentChild();if(vb)vb.vO(h);this.jsxsuper(h);};});jsx3.gui.Stack.prototype.getBackgroundColor=jsx3.gui.Stack.prototype.getInactiveColor;jsx3.gui.Stack.prototype.setBackgroundColor=jsx3.gui.Stack.prototype.setInactiveColor;jsx3.Stack=jsx3.gui.Stack;

⌨️ 快捷键说明

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