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 final long serialVersionUID = 3451270691632105615L;
026            
027            private static int zIndex = 10;
028    
029            /**
030             * Creates a new window pane.
031             */
032            public WindowPane() {
033                    super();
034                    int z = zIndex;
035                    if (z < 0) {
036                            zIndex = 10;
037                            z = zIndex;
038                    }
039                    zIndex++;
040                    setZIndex(z);
041            }
042    
043    }
044