1 19 20 package org.netbeans.modules.versioning.util; 21 22 import javax.swing.*; 23 import java.awt.Component ; 24 import java.awt.HeadlessException ; 25 import java.io.File ; 26 27 32 public class AccessibleJFileChooser extends JFileChooser { 33 34 private final String acsd; 35 36 public AccessibleJFileChooser(String acsd) { 37 this.acsd = acsd; 38 } 39 40 public AccessibleJFileChooser(String acsd, File currentDirectory) { 41 super(currentDirectory); 42 this.acsd = acsd; 43 } 44 45 protected JDialog createDialog(Component parent) throws HeadlessException { 46 JDialog dialog = super.createDialog(parent); 47 dialog.getAccessibleContext().setAccessibleDescription(acsd); 48 return dialog; 49 } 50 } 51 | Popular Tags |