/*---------------- 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.gui.ContainerContent; import nl.idgis.giclient.framework.Frame; class nl.idgis.giclient.framework.SimpleFrame extends Frame { var standardColor:Number; function SimpleFrame() { standardColor = 0xFFCC66; } private function drawAll():Void { this.controller = this; this.level = 1; this.attachMovie("PaneBack","achtergrond_mc",this.level++, {controller:this}); this.attachMovie("Rand","titleArea_mc",this.level++, {controller:this}); this.attachMovie("GeoideScrollPaneSymbol", "scrollpane_mc", this.level++, {controller:this}); this.attachMovie("GeoideLabelSymbol", "titleText_mc", this.level++, {controller:this}); if (this.hasShader == null || this.hasShader == true) { // no or this.attachMovie("SluitKnop","sluitVensterBoven_mc",this.level++, {controller:this}); } if (this.boundingBox_mc == undefined) { this.attachMovie("FBoundingBoxSymbol", "boundingBox_mc", this.level++); } this.boundingBox_mc.controller = this; this.boundingBox_mc._visible = false; // Max and Min size are -1, indicating to use the full size of the Stage and simply title bar and widgets, respectively this.maxWidth = -1; this.maxHeight = -1; this.minWidth = -1; this.minHeight = -1; this.titleText_mc.labelField.autoSize = "left"; if (this.resizable == undefined) { this.resizable = true; } if (this.isScrolling == undefined) { this.isScrolling = true; } this.sluitVensterBoven_mc.paneComponent = this.paneComponent; this.sluitVensterBoven_mc.onRelease = function() { //this.paneComponent.hidePane(this._parent.attrInfoLayer); // TODO more general pane identifier this.paneComponent.hidePane(null,this._parent); }; //onRollOver en OnRollOut, nodig vanwege juiste afhandeling onmousemove //in de mapviewer this.achtergrond_mc.onRollOver = function(){ }; this.achtergrond_mc.onRollOver = function(){ }; this.achtergrond_mc.useHandCursor = false; this.setResizable(this.resizable); this.titleArea_mc.onPress = this.titleTrackBegin; this.titleArea_mc.onRelease = this.titleTrackEnd; this.titleArea_mc.onReleaseOutside = this.titleTrackEnd; this.titleText_mc.onPress = this.titleTrackBegin; this.titleText_mc.onRelease = this.titleTrackEnd; this.titleText_mc.onReleaseOutside = this.titleTrackEnd; this.scrollpane_mc.setDragContent(false);//???? this.scrollpane_mc.refreshPane(); if (this.scrollContent != "") { this.setScrollContent(this.scrollContent); } this.setScrolling(this.isScrolling); this.setPaneTitle(this.paneTitle); this.setRuler(this.ruler); // not needed if viewer uses refreshScrollContent this.setSize(this.width, this.height); // Z-Order Handling this.boundingBox_mc.onMouseDown = function() { this._parent.boundingClickCheck(); }; paneList.push(this); checkedPaneCount = 0; topMostClickedDepth = -32768; } function formatFrame(x, y, w, h) { var titleHeight = 15; var thisWidth = w; var thisHeight = h; var my_color; //geef alle componenten de juiste kleuren met variabelen topLeftColor en backGroundColor my_color = new Color(this.titleArea_mc); my_color.setRGB(this.standardColor); my_color = new Color(this.achtergrond_mc); my_color.setRGB(0xffffff); if(this.doorzichtig == false){ var myColorTransform:Object = {aa:100, ab:255}; my_color.setTransform(myColorTransform); } my_color = new Color(this.scrollpane_mc["hScrollBar_mc"]["geoideScrollTrack_mc"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["vScrollBar_mc"]["geoideScrollTrack_mc"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["hScrollBar_mc"]["geoideScrollBall_mc"]["ballBack_mc"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["vScrollBar_mc"]["geoideScrollBall_mc"]["ballBack_mc"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["hScrollBar_mc"]["geoideScrollBall_mc"]["pijlenBoven"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["hScrollBar_mc"]["geoideScrollBall_mc"]["pijlenOnder"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["vScrollBar_mc"]["geoideScrollBall_mc"]["pijlenBoven"]); my_color.setRGB(this.standardColor); my_color = new Color(this.scrollpane_mc["vScrollBar_mc"]["geoideScrollBall_mc"]["pijlenOnder"]); my_color.setRGB(this.standardColor); this.achtergrond_mc._width = thisWidth; this.achtergrond_mc._height = thisHeight; this.achtergrond_mc._x =0; this.achtergrond_mc._y =0; this.titleArea_mc._width = thisWidth + 2; this.titleArea_mc._height = titleHeight; this.titleArea_mc._x = -1; this.titleArea_mc._y = - titleHeight; this.sluitVensterBoven_mc._width = 10; this.sluitVensterBoven_mc._height = 10; this.sluitVensterBoven_mc._x = thisWidth - this.sluitVensterBoven_mc._width/2; this.sluitVensterBoven_mc._y = -7; this.scrollpane_mc._x = 4; this.scrollpane_mc._y = 4; this.scrollpane_mc.setSize(thisWidth -4,thisHeight -4); this.clear(); this.lineStyle(1, 0x000000, 100); this.moveTo(-2,- titleHeight - 1); this.lineTo(thisWidth+2, - titleHeight - 1); this.lineTo(thisWidth+2, thisHeight + 2 ); this.lineTo(-2, thisHeight + 2); this.lineTo(-2,- titleHeight - 1); this.formatTitle(thisWidth); this.setEnabled(this.enable); } }