⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cardlayoutaction.java

📁 SWING的界面UI包 SWING的界面UI包
💻 JAVA
字号:
/*
 * CardLayoutAction.java
 *
 * Created on 2007年5月5日, 上午11:43
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package dyno.swing.designer.beans.actions;

import dyno.swing.designer.beans.SwingDesigner;
import dyno.swing.designer.beans.Util;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.LayoutManager;


/**
 *
 * @author William Chen
 */
public class CardLayoutAction extends LayoutContextAction {
    /** Creates a new instance of BorderLayoutAction */
    public CardLayoutAction(SwingDesigner designer) {
        super(designer);
    }

    protected Class<?extends LayoutManager> getLayoutClass() {
        return CardLayout.class;
    }

    @Override
    protected void initialize() {
        Container container = (Container) component;
        int count = container.getComponentCount();

        for (int i = 0; i < count; i++) {
            Component child = container.getComponent(i);
            container.add(child, Util.getComponentName(child));
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -