001 // This file is part of the Attempto Java Packages. 002 // Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch). 003 // 004 // The Attempto Java Packages is free software: you can redistribute it and/or modify it under the 005 // terms of the GNU Lesser General Public License as published by the Free Software Foundation, 006 // either version 3 of the License, or (at your option) any later version. 007 // 008 // The Attempto Java Packages is distributed in the hope that it will be useful, but WITHOUT ANY 009 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 010 // PURPOSE. See the GNU Lesser General Public License for more details. 011 // 012 // You should have received a copy of the GNU Lesser General Public License along with the Attempto 013 // Java Packages. If not, see http://www.gnu.org/licenses/. 014 015 package ch.uzh.ifi.attempto.echocomp; 016 017 /** 018 * This class creates window panes that arrange themselves on the z-axis in a way that 019 * newer window panes are displayed in front of older ones. 020 * 021 * @author Tobias Kuhn 022 */ 023 public class WindowPane extends nextapp.echo2.app.WindowPane { 024 025 private static int zIndex = 10; 026 027 /** 028 * Creates a new window pane. 029 */ 030 public WindowPane() { 031 super(); 032 int z = zIndex; 033 if (z < 0) { 034 zIndex = 10; 035 z = zIndex; 036 } 037 zIndex++; 038 setZIndex(z); 039 } 040 041 } 042