function AdfPanelCustomizableDropTarget(){this.Init(null,AdfDnDContext.ACTION_COPY_OR_MOVE,[AdfDataFlavor.STRING_FLAVOR,AdfDataFlavor.getRowKeyDataFlavor("resourceModel"),AdfShowDetailFrameDragSource._SDFCOMPONENT_FLAVOR])}AdfObject.createSubclass(AdfPanelCustomizableDropTarget,AdfDropTarget);AdfPanelCustomizableDropTarget.prototype.Init=function(a,b,d){AdfPanelCustomizableDropTarget.superclass.Init.call(this);this._dropHandler=a;this._allowedActions=b;this._allowedFlavors=d};
AdfPanelCustomizableDropTarget.prototype.drop=function(a,b,d,c){var g=this._dropHandler,f;f=g!=null?g.call(this,a,b,d,c):b;AdfAssert.assertNumber(f);if(f==AdfDnDContext.ACTION_NONE)return f;AdfAssert.assert((f&~AdfDnDContext.ACTIONS_ALL)==0,"Invalid userAction:"+f);var b=this.getComponent(),g=AdfDhtmlPanelCustomizablePeer.getContentDiv(b),e=null,h=b.getLayout(),e=h=="horizontal"?g.rows[0].cells:g.childNodes,j=0,k=b.getHalign(),l=AdfPage.PAGE.getLocaleContext().isRightToLeft(),h=h=="horizontal"&&(k==
"end"||l&&k=="left"||!l&&k=="right");for(i=0;i<e.length;i++)if(!(i==0&&h)){if(e[i].id=="custcomps.dropProxy"){beforeDiv=e[i+1];break}e[i].firstChild.style.display!="none"&&e[i].firstChild.className!="ShowDetailFrameDropProxy"&&j++}if(j>=1&&b.getLayout()=="stretch")return this.replaceChild(),AdfDnDContext.ACTION_NONE;e=a.getDragSource().getComponent();e.getComponentType()=="oracle.adf.ShowDetailFrame"||e.getComponentType()=="oracle.adf.rich.portlet"?(a=document.getElementById(e.getClientId()),AdfDhtmlShowDetailFramePeer.dropProxy!=
null&&AdfDhtmlShowDetailFramePeer.dropProxy.parentNode!=null&&AdfDhtmlShowDetailFramePeer.dropProxy.parentNode.removeChild(AdfDhtmlShowDetailFramePeer.dropProxy),b.getLayout()=="horizontal"?this.insertHorizontalLayoutNode(g,a,beforeDiv):this.insertDefaultLayoutNode(g,a,beforeDiv),AdfDhtmlShowDetailFramePeer.dropFrame(j,e,b.getClientId())):(d=new AdfDropEvent(this.getComponent(),a.getDragSource(),a.getTransferable(),f,d,c,null,"dummy",j),d.GetParams().dragCompId=a.getDragSource().getComponent().getClientId(),
d.queue(),AdfDhtmlPanelCustomizablePeer.removeDefaultLayoutProxy(),AdfDhtmlPanelCustomizablePeer.removeHorizontalLayoutProxy());return AdfDnDContext.ACTION_NONE};AdfPanelCustomizableDropTarget.prototype.dragExit=function(){AdfDhtmlPanelCustomizablePeer.removeDefaultLayoutProxy();AdfDhtmlPanelCustomizablePeer.removeHorizontalLayoutProxy()};
AdfPanelCustomizableDropTarget.prototype.insertHorizontalLayoutNode=function(a,b,d){var c=b.parentNode;if(b.parentNode.tagName=="DIV")c=b.parentNode,c.parentNode.removeChild(c),c=document.createElement("td"),c.vAlign="top",c.id="wrapping.td."+b.id,c.appendChild(b);d==null?a.rows[0].appendChild(c):a.rows[0].insertBefore(c,d)};
AdfPanelCustomizableDropTarget.prototype.insertDefaultLayoutNode=function(a,b,d){var c=b.parentNode;if(b.parentNode.tagName=="TD")c=b.parentNode,c.parentNode.removeChild(c),c=document.createElement("div"),c.id="wrapping.div."+b.id,c.appendChild(b);d==null?a.appendChild(c):a.insertBefore(c,d)};AdfPanelCustomizableDropTarget.prototype.replaceChild=function(){var a=this.getComponent().getProperty("cannotDropMessage");alert(a)};
AdfPanelCustomizableDropTarget.prototype.toDebugString=function(){var a=AdfPanelCustomizableDropTarget.superclass.toDebugString.call(this),b=this._allowedActions;b&&(a+=" allowedActions:"+b.toString(2));a+=" allowedFlavors:"+this._allowedFlavors;return a};AdfPanelCustomizableDropTarget.prototype.GetAllowedFlavors=function(){return this._allowedFlavors};AdfPanelCustomizableDropTarget.prototype.GetAllowedActions=function(){return this._allowedActions};
AdfPanelCustomizableDropTarget.prototype.AcceptDrag=function(a,b,d,c,g){var f=this.getComponent();if(f.getAllowAction()=="none")return AdfDnDContext.ACTION_NONE;if(this.isContainerAllowsDropSource(a)==!1)return AdfDnDContext.ACTION_NONE;var e=a.getDropTargetProperty("DropTarget:flavorAcceptance");e==null&&(e=this.CalculateFlavorAcceptance(a),a.setDropTargetProperty("DropTarget:flavorAcceptance",e));AdfAssert.assertBoolean(e);return e?(AdfDhtmlPanelCustomizablePeer.showDragFeedback(a,b,d,c,g,f),d&
b?d:b&AdfDnDContext.ACTION_MOVE?AdfDnDContext.ACTION_MOVE:b&AdfDnDContext.ACTION_COPY?AdfDnDContext.ACTION_COPY:b&AdfDnDContext.ACTION_LINK?AdfDnDContext.ACTION_COPY:AdfDnDContext.ACTION_NONE):AdfDnDContext.ACTION_NONE};
AdfPanelCustomizableDropTarget.prototype.isContainerAllowsDropSource=function(a){a=a.getDragSource();if(a==null)return!1;if(a.getComponent().getComponentType()=="oracle.adf.ShowDetailFrame"){var b=a.getComponent().getClientId(),a=this.getComponent().getClientId(),b=b.substring(0,b.lastIndexOf(":")),a=a.substring(0,a.lastIndexOf(":"));if(b!=a)return!1}return!0};