/*---------------- 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.Ruler; class nl.idgis.giclient.framework.GIComponent { private var ruler:Ruler = null; private var name:String = ""; private var url:String = ""; private var title:String = ""; private var scrollable:Boolean = false; private var resizable:Boolean = false; private var closeable:Boolean = false; private var lightColor:Number = -1; private var darkColor:Number = -1; private var transparent:Boolean = false; private var x:Number = -1; private var y:Number = -1; private var width:String = ""; private var height:String = ""; private var adapters:String = null; private var paneDepth:Number; function GIComponent(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) { this.name = name; this.url = url; this.title = title; this.scrollable = scrollable; this.resizable = resizable; this.closeable = closeable; this.lightColor = lightColor; this.darkColor = darkColor; this.transparent = transparent; this.x = x; this.y = y; this.width = width; this.height = height; } function getName():String { return name; } function setRuler(ruler:Ruler):Void { this.ruler = ruler; } function getRuler():Ruler { return ruler; } function setAdapters(adapters:String):Void { this.adapters = adapters; } function getAdapters():String { return adapters; } function setSize(pane:MovieClip, width:String, height:String):Void { var nWidth:Number = Number(width); var nHeight:Number = Number(height); if(width.indexOf("%") != -1) { nWidth = (Stage.width / 100) * Number(width.substr(0, width.length - 1)); } if(height.indexOf("%") != -1) { nHeight = (Stage.height / 100) * Number(height.substr(0, height.length - 1)); } pane.setSize(nWidth, nHeight); } }