<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, | |
software distributed under the License is distributed on an | |
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
KIND, either express or implied. See the License for the | |
specific language governing permissions and limitations | |
under the License. | |
--> | |
<library> | |
<class name="confirmationSingleSWF10" extends="labelExplorerBox" labelid="832" | |
docking="true" resizeable="false" closable="true" height="140" width="300"> | |
<attribute name="refObj" value="null" /> | |
<attribute name="refReturnMethod" value="null" /> | |
<attribute name="showCheckBox" value="true" type="boolean" /> | |
<attribute name="labeliderror" value="0" type="number" /> | |
<attribute name="result" type="bool"/> | |
<attribute name="iconResource" value="warning_popup_icon_rsc" type="string" /> | |
<image x="4" src="$once{ canvas.getThemeImage(parent.iconResource) }" y="24" /> | |
<labelText labelid="$once{ parent.labeliderror }" y="24" | |
width="$once{ parent.width - 40 }" | |
multiline="true" resize="false" x="30" /> | |
<handler name="oninit"> | |
<![CDATA[ | |
//Set Position of Confirmation Box as Close as possible to the Mouse | |
var x = parent.getMouse("x"); | |
var y = parent.getMouse("y"); | |
var newx = x - (this.width/2); | |
var newy = y - (this.height/2); | |
if ($debug) Debug.write("1",x,y,newx,newy); | |
if (newx < 0) { | |
newx = 20; | |
} | |
if (newy < 0) { | |
newy = 20; | |
} | |
//if ($debug) Debug.write("1.1",(this.width + newx + 20),parent.width,this.width); | |
var relativeWidth = parent.width; | |
if (relativeWidth > canvas.width) { | |
relativeWidth = canvas.width; | |
} | |
if (this.width + newx + 20 > relativeWidth) { | |
newx = relativeWidth-this.width-20; | |
} | |
if (this.height + newy + 20 > parent.height) { | |
newy = parent.height-this.height-20; | |
} | |
if ($debug) Debug.write("2",newx,newy); | |
this.setAttribute("x",newx); | |
this.setAttribute("y",newy); | |
]]> | |
</handler> | |
<labelCheckbox name="holddatainSO" visibility="$once{ (parent.showCheckBox) ? 'visible' : 'hidden' }" | |
labelid="64" x="10" y="$once{ parent.height - 46 }" /> | |
<simpleLabelButton labelid="61" width="100" x="$once{ parent.width - 105 }" y="$once{ parent.height - 26 }"> | |
<handler name="onclick"> | |
var t = parent.holddatainSO.getValue(); | |
this.parent.close(); | |
this.parent.result = false; | |
if (null != this.parent.refObj) { | |
if (parent.refReturnMethod == null) { | |
this.parent.refObj.sendConfirmation(false,t); | |
} else { | |
this.parent.refObj[parent.refReturnMethod](false,t); | |
} | |
} | |
if ($debug) Debug.write("end"); | |
</handler> | |
</simpleLabelButton> | |
<simpleLabelButton labelid="60" width="100" x="$once{ parent.width - 210 }" y="$once{ parent.height - 26 }"> | |
<handler name="onclick"> | |
var t = parent.holddatainSO.getValue(); | |
this.parent.close(); | |
this.parent.result = true; | |
if (null != this.parent.refObj) { | |
if (parent.refReturnMethod == null) { | |
this.parent.refObj.sendConfirmation(true,t); | |
} else { | |
this.parent.refObj[parent.refReturnMethod](true,t); | |
} | |
} | |
</handler> | |
</simpleLabelButton> | |
</class> | |
<class name="rememberMessageSWF10" extends="labelExplorerBox" labelid="832" | |
x="$once{ canvas.width/2 - this.width/2 }" y="100" | |
docking="true" resizeable="false" closable="true" height="140" width="300"> | |
<attribute name="refObj" value="null" /> | |
<attribute name="showCheckBox" value="true" type="boolean" /> | |
<attribute name="labeliderror" value="0" type="number" /> | |
<view x="4" resource="warning_icon_rsc" y="24" /> | |
<labelText labelid="$once{ parent.labeliderror }" y="24" | |
width="$once{ parent.width - 40 }" | |
multiline="true" resize="false" x="30" /> | |
<labelCheckbox name="holddatainSO" visibility="$once{ (parent.showCheckBox) ? 'visible' : 'hidden' }" | |
labelid="64" x="10" y="$once{ parent.height - 46 }" /> | |
<simpleLabelButton labelid="642" width="100" x="$once{ parent.width - 105 }" y="$once{ parent.height - 26 }"> | |
<handler name="onclick"> | |
var t = parent.holddatainSO.getValue(); | |
this.parent.close(); | |
if (null != this.parent.refObj) { | |
this.parent.refObj.sendConfirmation(t); | |
} | |
</handler> | |
</simpleLabelButton> | |
</class> | |
</library> |