Package org.onemind.swingweb.templaterender.peerdelegate.javax.swing

Source Code of org.onemind.swingweb.templaterender.peerdelegate.javax.swing.JLayeredPaneRenderDelegate

/*
* Copyright (C) 2004 TiongHiang Lee
*
* 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
*
* Email: thlee@onemindsoft.org
*/

package org.onemind.swingweb.templaterender.peerdelegate.javax.swing;

import java.awt.Component;
import java.awt.Container;
import java.util.List;
import javax.swing.JLayeredPane;
import org.onemind.swingweb.templaterender.peerdelegate.TemplateRenderDelegate;
/**
* The container render delegate
* @author TiongHiang Lee (thlee@onemindsoft.org)
*
*/
public class JLayeredPaneRenderDelegate extends JComponentRenderDelegate
{
    /** the instance **/
    public static TemplateRenderDelegate INSTANCE = new JLayeredPaneRenderDelegate();
    /**
     * Get the cells for layout using the ContainerLayoutHelper
     * @param c the container
     * @return the cells
     */
    public List getLayoutCells(Container c)
    {
        JLayeredPane lp = (JLayeredPane)c;
        Component[] childs = lp.getComponentsInLayer(JLayeredPane.FRAME_CONTENT_LAYER.intValue());
        return getLayoutHelper(c).getCells(childs);
    }
}
TOP

Related Classes of org.onemind.swingweb.templaterender.peerdelegate.javax.swing.JLayeredPaneRenderDelegate

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.