Package com.aesthete.swingobjects.fw.common.scope

Examples of com.aesthete.swingobjects.fw.common.scope.ApplicationScopeObject


  }


  public static File createFileFilter(Component parent,String dialogBtnKey,String fileExt){
    String lastLoc=null;
    ApplicationScopeObject appScopeObj=ApplicationScope.getObjectFromScope(AppScopeConstants.LAST_FOLDER);
    if(appScopeObj!=null) {
     lastLoc = (String) appScopeObj.getDto();
    }
    JFileChooser fileChooser=new JFileChooser(lastLoc);
    if(fileExt!=null) {
      createAndSetFileFilter(fileChooser,fileExt);
    }
    fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    int userChose=fileChooser.showDialog(parent,Properties.getAppProps(dialogBtnKey));
    if(userChose==JFileChooser.APPROVE_OPTION){
      ApplicationScope.addObjectToScope(AppScopeConstants.LAST_FOLDER, new ApplicationScopeObject(fileChooser.getSelectedFile().getParent()));
      return fileChooser.getSelectedFile();
    }
    return null;
  }
View Full Code Here


      createAndSetFileFilter(fileChooser,fileExt);
    }
    fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    int userChose=fileChooser.showDialog(parent,Properties.getAppProps(dialogBtnKey));
    if(userChose==JFileChooser.APPROVE_OPTION){
      ApplicationScope.addObjectToScope(AppScopeConstants.LAST_FOLDER, new ApplicationScopeObject(fileChooser.getSelectedFile().getParent()));
      return fileChooser.getSelectedFile();
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.aesthete.swingobjects.fw.common.scope.ApplicationScopeObject

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.