utlfunctions.java
来自「导出ORACLE数据库对象DDL语句的程序」· Java 代码 · 共 32 行
JAVA
32 行
/*
* 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 + =
减小字号Ctrl + -
显示快捷键?