/** * For testing only. * * @param args ignored */ public static void main(String[] args) { BaseDirectoryChooser chooser = new BaseDirectoryChooser(); chooser.setCurrentDirectory(new File(System.getProperty("java.io.tmpdir"))); if (chooser.showOpenDialog(null) == BaseDirectoryChooser.APPROVE_OPTION) System.out.println(chooser.getSelectedFile()); } }
/** * Performs the actual choosing of an object. * * @return the chosen object or null if none chosen */ protected File doChoose() { m_DirectoryChooser.setSelectedFile(getCurrent()); if (m_DirectoryChooser.showOpenDialog(m_Self) == BaseDirectoryChooser.APPROVE_OPTION) { return m_DirectoryChooser.getSelectedFile(); } else { return null; } }