< prev index next >

src/org/netbeans/jemmy/operators/JFileChooserOperator.java

Print this page

        

*** 41,50 **** --- 41,51 ---- import javax.swing.JList; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.JToggleButton; import javax.swing.ListModel; + import javax.swing.UIManager; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileSystemView; import javax.swing.filechooser.FileView; import javax.swing.plaf.FileChooserUI; import javax.swing.table.TableModel;
*** 339,360 **** * Returns either a JList or JTable, depending on the implementation. * * @return a component being used to display directory content. */ public Component getFileList() { ! int index = 0; ! // In GTK and Motif L&F, there are two JLists, one is to list folders ! // and second one one is to list files if (LookAndFeel.isMotif() || LookAndFeel.isGTK()) { ! index =1; } return innerSearcher. findComponent(new ComponentChooser() { @Override public boolean checkComponent(Component comp) { ! return (comp != null ! && (comp instanceof JList || comp instanceof JTable)); } @Override public String getDescription() { return "JList or JTable used to show list of files"; --- 340,361 ---- * Returns either a JList or JTable, depending on the implementation. * * @return a component being used to display directory content. */ public Component getFileList() { ! final String fileListName; if (LookAndFeel.isMotif() || LookAndFeel.isGTK()) { ! fileListName = UIManager.getString("FileChooser.filesLabelText", getLocale()); ! } else { ! fileListName = UIManager.getString("FileChooser.filesListAccessibleName", getLocale()); } return innerSearcher. findComponent(new ComponentChooser() { @Override public boolean checkComponent(Component comp) { ! return ((comp instanceof JList && fileListName.equals(comp.getAccessibleContext().getAccessibleName())) ! || comp instanceof JTable); } @Override public String getDescription() { return "JList or JTable used to show list of files";
*** 362,372 **** @Override public String toString() { return "JFileChooserOperator.getFileList.ComponentChooser{description = " + getDescription() + '}'; } ! }, index); } /** * Pushes approve button. */ --- 363,373 ---- @Override public String toString() { return "JFileChooserOperator.getFileList.ComponentChooser{description = " + getDescription() + '}'; } ! }); } /** * Pushes approve button. */
< prev index next >