Package shared.files

Examples of shared.files.JMyFileFilter


            {
                JFileChooser fileChooser = new JFileChooser(Main.m_settings.getExportDirectory());
                fileChooser.setDialogTitle(Main.getString("caption_export"));
                FileFilter allFilter = fileChooser.getAcceptAllFileFilter();
                fileChooser.setAcceptAllFileFilterUsed(false);
                JMyFileFilter fileFilter = new JMyFileFilter();
                updateTypeData();
                if (m_mimeType.equals("image/jpeg"))
                {
                    fileFilter.setDescription(Main.getString("filefilter_jpg"));
                    for (String item : Main.m_settings.m_jpgExtensions)
                        fileFilter.addExtension(item);
                }
                else if (m_mimeType.equals("image/png"))
                {
                    fileFilter.setDescription(Main.getString("filefilter_png"));
                    fileFilter.addExtension("png");
                }
                else if (m_mimeType.equals("image/bmp"))
                {
                    fileFilter.setDescription(Main.getString("filefilter_bmp"));
                    fileFilter.addExtension("bmp");
                }
                fileChooser.addChoosableFileFilter(fileFilter);
                fileChooser.addChoosableFileFilter(allFilter);
                fileChooser.setFileFilter(fileFilter);
                if (!m_fileField.getText().isEmpty())
View Full Code Here


            File file = new File(data.getFilePath());
            JFileChooser fileChooser = new JFileChooser(bMove ? Main.m_settings.getMoveDirectory() : Main.m_settings.getCopyDirectory());
            fileChooser.setDialogTitle(Main.getString(bMove ? "caption_move" : "caption_copy"));
            FileFilter allFilter = fileChooser.getAcceptAllFileFilter();
            fileChooser.setAcceptAllFileFilterUsed(false);
            JMyFileFilter fileFilter = new JMyFileFilter();
            for (String item : Main.m_settings.m_jpgExtensions)
            {
                fileFilter.addExtension(item);
            }
            fileFilter.setDescription(Main.getString("filefilter_jpg"));
            fileChooser.addChoosableFileFilter(fileFilter);
            fileChooser.addChoosableFileFilter(allFilter);
            fileChooser.setFileFilter(fileFilter);

            fileChooser.setSelectedFile(new File(file.getName()));
View Full Code Here

TOP

Related Classes of shared.files.JMyFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.