/*---------------- FILE HEADER --------------------------------------- This file is part of Geoide. Copyright (C) 2005-2006 by: IDgis B.V. http://www.idgis.nl This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact: Herman Assink IDgis bv P.O. Box 15 7450 AA Holten The Netherlands E-Mail: herman.assink@idgis.nl * @version 1.4.0 * @author IDgis team * ------------------------------------------------------------------------*/ import nl.idgis.giclient.framework.Frame; import nl.idgis.giclient.framework.FrameWork; import nl.idgis.giclient.framework.GIComponent; import nl.idgis.giclient.gis.Layer; import nl.idgis.giclient.util.Strings; class nl.idgis.giclient.framework.MultiPaneComponent extends GIComponent { private var panes:Object = new Object(); private var layerName:String = null; function MultiPaneComponent(name:String, url:String, title:String, scrollable:Boolean, resizable:Boolean, closeable:Boolean, lightColor:Number, darkColor:Number, transparent:Boolean, x:Number, y:Number, width:String, height:String) { super(name, url, title, scrollable, resizable, closeable, lightColor, darkColor, transparent, x, y, width, height); } function showPane(layer:Layer):Void { paneDepth = Frame.paneList.length + 2; if (paneDepth <= 20) { layerName = layer.getName(); if (panes[layerName] == null) { var initObject:Object = {ruler: this.ruler, scrollContent: url, paneTitle: title, isScrolling: scrollable, resizable: this.resizable, hasShader: closeable, colorlight: lightColor, colordark: darkColor, doorzichtig: transparent}; initObject.paneComponent = this; var pane:MovieClip = FrameWork.addFrame(layerName + name + "Pane", initObject); pane.attrInfoLayer = layer; pane._x = x; pane._y = y; setSize(pane, width, height); panes[layerName] = pane; //to do: handle multiple panes with different names } } else{ //geef foutmelding throw new Error//("maximum number of panes exceeded"); (Strings.getFile("Geoide").getString("MaxNumPanesExceeded")) ; } } function hidePane(layer:Layer):Void { var pane:MovieClip = panes[layerName]; //to do: handle multiple panes with different names pane.handleClose(); pane.removeMovieClip(); panes[layerName] = null; } }