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

📄 utlfunctions.java

📁 导出ORACLE数据库对象DDL语句的程序
💻 JAVA
字号:
/*
 * Created on 2004-10-18
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.icbcsdc.ddlexp.ui;

import java.awt.Component;
import java.awt.Container;
import java.awt.event.KeyListener;

/**
 * @author youhx
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class UtlFunctions {
    //使一个容器响应某个key事件
    public static void addGlobalKeyListener(java.awt.Component c, KeyListener listener){
        //System.out.println("container:"+(c.getClass()).getName());
         Component[] children=((Container)c).getComponents();
         for(int i=0;i<children.length;i++){
             children[i].addKeyListener(listener);
             addGlobalKeyListener(children[i],listener);
             //System.out.println("container:"+(children[i].getClass()).getName());             
         }    
    }

}

⌨️ 快捷键说明

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