Examples of GfrFileFilter


Examples of org.geoforge.guillc.filechooser.filefilter.GfrFileFilter

           String strTitle,
           String strApproveButtonText,
           String[] strsExtension,
           String strDescription) throws Exception
   {
      GfrFileFilter ffe = new GfrFileFilter(strsExtension, strDescription);

      JFileChooser jfc = GfrUtilFileChooserVol._s_getFileChooserOnlyFile_(
              strApproveButtonText, ffe);

      if (jfc == null)
      {
         GfrUtilFileChooserVol._LOGGER_.severe("jfc == null, exiting");
         String strBody = "An error occured, the application will exit.";
         JOptionPane.showMessageDialog(cmpFrameParent, strBody, GfrResBundleLang.s_getInstance().getValue("word.error"), JOptionPane.ERROR_MESSAGE);
         System.exit(1);
      }

      while (true)
      {

         int intReturnValue = jfc.showDialog(cmpFrameParent, strApproveButtonText);

         // ----
         // either "cancel" or "windowClosing"
         if (intReturnValue != 0)
         {
            return null;
         }

         File fleSelected = jfc.getSelectedFile();

         if (fleSelected == null)
         {
            GfrUtilFileChooserVol._LOGGER_.severe("fleSelected == null");
            return null;
         }

         String strExt = ffe.getExtension(fleSelected);

         if (strExt == null)
         {
            File fleSave = null;
View Full Code Here

Examples of org.geoforge.guillc.filechooser.filefilter.GfrFileFilter

           String[] strsExtension,
           String strDescription) throws Exception
   {
      // --

      GfrFileFilter ffe = new GfrFileFilter(strsExtension, strDescription);

      JFileChooser jfc = GfrUtilFileChooserVol._s_getFileChooserOnlyFile_(
              strApproveButtonText, ffe);

      if (jfc == null)
      {
         GfrUtilFileChooserVol._LOGGER_.severe("jfc == null, exiting");
         String strBody = "An error occured, the application will exit.";
         JOptionPane.showMessageDialog(cmpFrameParent, strBody, GfrResBundleLang.s_getInstance().getValue("word.error"), JOptionPane.ERROR_MESSAGE);
         System.exit(1);
      }

      int intReturnValue = jfc.showDialog(cmpFrameParent, strApproveButtonText);

      // ----
      // either "cancel" or "windowClosing"
      if (intReturnValue != 0)
      {
         return null;
      }

      File fleSelected = jfc.getSelectedFile();

      if (fleSelected == null)
      {
         GfrUtilFileChooserVol._LOGGER_.severe("fleSelected == null");
         return null;
      }

      String strFileExtensionCur = ffe.getExtension(fleSelected);

      if (strFileExtensionCur == null)
      {
         File fleOpen = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.