/**
* Get universal Focus listener suitable for decsription JTextFields only.
* It provides screen reades support for read only enabled descriptions.
*/
public static synchronized FocusListener getA11YJTextFieldSupport() {
if (flis == null) {
flis = new java.awt.event.FocusListener() {
public void focusGained(java.awt.event.FocusEvent e) {
if (e.getComponent() instanceof javax.swing.JTextField) {
((javax.swing.JTextField)e.getComponent()).selectAll();
}
}
public void focusLost(java.awt.event.FocusEvent e) {
if (e.getComponent() instanceof javax.swing.JTextField) {
((javax.swing.JTextField)e.getComponent()).select(1,1);
}
}
};
}
return flis;
}
A11YUtil.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录