| <?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="basePropertyPanelWhiteboard" extends="view" > |
| |
| <!--- @keywords private is the Box minimized --> |
| <attribute name="isopen" value="true" type="boolean" /> |
| |
| <!--- @keywords private is the Box minimized --> |
| <attribute name="open" value="true" type="boolean" /> |
| |
| <!--- Title of this window --> |
| <attribute name="title" type="string" value="basePanel" /> |
| |
| <!--- @keywords private --> |
| <attribute name="initheight" value="0" type="number" /> |
| |
| <attribute name="labelid" type="number" setter="setLabelId(labelid)" /> |
| |
| <!--- if the box is allowed to be minimized --> |
| <attribute name="allowToggle" value="true" type="boolean" /> |
| |
| <method name="setLabelId" args="_labelid" > |
| this.labelid = _labelid; |
| this.setAttribute("title",canvas.getLabelName(this.labelid)); |
| </method> |
| |
| <method name="toggleopen"> |
| if (!this.allowToggle) { |
| return; |
| } |
| ////Debug.write("this.isopen",this.isopen); |
| this.setAttribute('isopen',!this.isopen); |
| if (this.isopen){ |
| this.setAttribute('height',this.initheight); |
| this.setAttribute('height',this.initheight); |
| } else { |
| this.setAttribute('height',22); |
| } |
| </method> |
| |
| <handler name="oninit"> |
| this.initheight=this.height; |
| </handler> |
| |
| <view x="0" y="1" width="${ this.parent.width }" height="20" bgcolor="0xE0E1EB" /> |
| |
| <view x="0" y="0" width="${ this.parent.width }" height="1" bgcolor="$once{ canvas.getThemeColor('mainBorderColor') }" /> |
| |
| <view x="0" y="19" width="${ this.parent.width }" height="1" bgcolor="$once{ canvas.getThemeColor('mainBorderColor') }" /> |
| |
| <handler name="onclick"> |
| this.toggleopen(); |
| </handler> |
| |
| <text fontsize="11" height="17" x="2" y="1" text="${ this.parent.title }" |
| fgcolor="$once{ canvas.getThemeColor('menuTextColor') }" resize="true" fontstyle="bold" /> |
| |
| </class> |
| |
| </library> |