import flash.filters.DropShadowFilter;
this.setShadow();
this.labelid=id;
this.setAttribute('title',canvas.getLabelName(this.labelid));
this.initheight=this.height;
//Debug.write("this.isopen: ",this.isopen);
if (!this.open) toggleopen();
if (this.onclose) this.onclose.sendEvent();
if (this._barmenuButtonRef != null) {
this._barmenuButtonRef.destroy();
this._barmenuButtonRef.parent.onwidth.sendEvent();
}
this.destroy();
//////Debug.write("this.isopen",this.isopen);
this.setAttribute('isopen',!this.isopen);
if (this.isopen){
_calcdockingList();
for (var eg in this.dockinglist){
if(this.dockinglist[eg].docking){
//////Debug.write("this.dockinglist[eg]: ",this.dockinglist[eg].title);
//////Debug.write("open new y",this.y+this.initheight);
this.dockinglist[eg].toggleOpenByParent(this.initheight-22);
this.dockinglist[eg].setAttribute('y',this.y+this.initheight);
}
}
this.setAttribute('height',this.initheight);
} else {
_calcdockingList();
for (var eg in this.dockinglist){
if(this.dockinglist[eg].docking){
//////Debug.write("this.dockinglist[eg]: ",this.dockinglist[eg].title);
this.dockinglist[eg].toggleOpenByParent(-(this.initheight-22));
this.dockinglist[eg].setAttribute('y',this.y+22);
}
}
this.setAttribute('height',22);
}
//////Debug.write("+++++ toggleOpenByParent +++++ changeY: ",this.title,changeY);
var tempList=new Array();
-1 ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){
proof=true;
}
if (proof) tempList.push(this.parent.subviews[eg]);
}
}
]]>
//////Debug.write("tempList.length: ",tempList.length);
if (tempList.length!=0){
for (var eg in tempList){
if(tempList[eg].docking){
//////Debug.write("toggleOpenByParent 1 [eg],changeY: ",tempList[eg].title,changeY);
tempList[eg].toggleOpenByParent(changeY);
tempList[eg].setAttribute('y',tempList[eg].y+changeY);
}
}
}
this.onactivate.sendEvent();
this.bringToFront();
if (this._barmenuButtonRef!=null) this._barmenuButtonRef.sendActiveWindow(this);
this.isresizeing=true;
this.rs.apply();
this.rs.remove();
this.isresizeing=false;
//Debug.write("rsremove",this,this.isinited);
this.onresized.sendEvent();
if (!this.ismaximized){
//It's important to remove the dragger and do docking stuff before you check for conencted Boxes
dragger.remove();
if (obj==this){
if (docking) arrangePosition();
} else {
if (docking) _lookforParentOnly(obj);
}
//check for connected Boxes
for (var eg in this.dockinglist){
if(this.dockinglist[eg].docking){
this.dockinglist[eg]._removeDragState(this);
}
}
}
this.activate();
if (!this.ismaximized){
_calcdockingList();
for (var eg in this.dockinglist){
if(this.dockinglist[eg].docking){
this.dockinglist[eg]._startDragState(this);
}
}
//store position cause it wasn't dragged by itself
if (obj!=this){
storeAdjustmentToParent(obj.x,obj.y);
}
dragger.apply();
}
//Clear list of conencted Boxes
this.dockinglist=new Array();
-1 ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){
proof=true;
}
if (proof) this.dockinglist.push(this.parent.subviews[eg]);
}
}
]]>
//////Debug.write("this.dockinglist.length:",this.dockinglist.length);
//do the magic
//the idea is: look for all on the view container one level above this one
//and look for the width/height and 0/0 and look for "dockable" stuff there
var newx=this.x;
var newy=this.y;
-this.dockingbarrier ) && ( (this.y+this.height) > this.parent.subviews[eg].y ) && ( this.y < (this.parent.subviews[eg].y+this.parent.subviews[eg].height) ) ){
newx= ( this.parent.subviews[eg].x - this.width );
}
//right box-border
if ( ( ((this.parent.subviews[eg].x+this.parent.subviews[eg].width)-this.x)-this.dockingbarrier ) && ( (this.y+this.height) > this.parent.subviews[eg].y ) && ( this.y < (this.parent.subviews[eg].y+this.parent.subviews[eg].height) ) ){
newx= ( this.parent.subviews[eg].x + this.parent.subviews[eg].width );
}
//top box-border
if ( ( ((this.y+this.height)-this.parent.subviews[eg].y) < this.dockingbarrier ) && ( ((this.y+this.height)-this.parent.subviews[eg].y) > -this.dockingbarrier ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){
newy = this.parent.subviews[eg].y-this.height;
}
//bottom box-border
if ( ( ((this.parent.subviews[eg].y+this.parent.subviews[eg].height)-this.y) < this.dockingbarrier ) && ( ((this.parent.subviews[eg].y+this.parent.subviews[eg].height)-this.y) > -this.dockingbarrier ) && ( (this.x+this.width) > this.parent.subviews[eg].x ) && ( this.x < (this.parent.subviews[eg].x+this.parent.subviews[eg].width) ) ){
newy = this.parent.subviews[eg].y+this.parent.subviews[eg].height;
}
}
}
//Check for Borders
//should be done _after_ checking for other dockable stuff so it gets
//priority to dock against the border of parent view
if (this.x
this.tempXdistance=objX-this.x;
this.tempYdistance=objY-this.y;
this.parent.parent.parent.minimize();
this.parent.parent.parent.reminimize();
this.parent.parent.parent.close();
//Debug.write("onaddsubview",v);
if (v.parent.subviews.length>2) this._resizeview.bringToFront();
parent.reminimizeComplete();
this._bg.setAttribute("bgcolor",0xFFFFFF);
this._bg.setAttribute("visibility","visible");
this._bg.setAttribute("visibility","hidden");
this._bg.setAttribute("bgcolor",canvas.getThemeColor('basebgcolorizer'));
this._bg.setAttribute("visibility","visible");
this._bg.setAttribute("visibility","hidden");