Package cli_fmw.delegate.report

Examples of cli_fmw.delegate.report.FileLocal


private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed
    if (curReport != null){
      Object[]        sel = fileList.getSelectedValues();
      for (Object item : sel) {
        FileLocal    file = (FileLocal)item;
        try {
          if (curReport.getMainFile() != file){
            curReport.removeFile(file);
          }
        } catch (ClipsException ex) {
View Full Code Here


        removeEnabled = false;
        saveEnabled = false;
        saveCompiledEnabled = false;
      }
      for (Object item : sel) {
        FileLocal  file = (FileLocal)item;
        if (file.getFileTypeID() != FileDetails.TYPE_JASPER_REPORT) {
          saveCompiledEnabled = false;
        }
        try {
          if (curReport.getMainFile() != null && curReport.getMainFile().equals(file)) {
            removeEnabled = false;
View Full Code Here

    return "Отчеты";
  }
 
  void saveFiles(int[] ids, boolean compiled){
    for (int item : ids){
      FileLocal          file = (FileLocal)reportList.getModel().getElementAt(item);
      ConfigGui          cfg = ConfigGui.getInstance();
      JFileChooser        choser = new JFileChooser();
      choser.setCurrentDirectory(cfg.getLastOpenDialogPath());
      FileNameExtensionFilter    filter = new FileNameExtensionFilter("Файлы JasperReport", JASPER_EXTENSIONS);
      choser.addChoosableFileFilter(filter);
      switch (file.getFileTypeID()){
        case FileDetails.TYPE_JASPER_REPORT:
          choser.setFileFilter(filter);
          break;
        default:
          choser.setFileFilter(choser.getAcceptAllFileFilter());
          break;
      }
      choser.setSelectedFile(new File(choser.getCurrentDirectory().getPath() + File.separator + file.getFileName()));
     
      boolean      fileSaved = false;
      do{
        int      id = choser.showSaveDialog(this);
        if (id == JFileChooser.APPROVE_OPTION){
          cfg.setLastOpenDialogPath(choser.getCurrentDirectory());
          File    f = choser.getSelectedFile();
          if (f.exists()) {
            if (MessageBox.showConfirmYesNo(MessageBox.C_OVERWRITE_FILE, f.getName()) != MessageBox.ANSWER_YES) {
              continue;
            }
          }
         
          byte[]      data;
          try {
            if (compiled) {
              data = file.getFileCompiledData();
            }
            else {
              data = file.getFileData();
            }
          } catch (ClipsException ex) {
            MessageBox.showException(ex);
            return;
          }
View Full Code Here

    ReportLocal      rl = getServerRepors(null);
    ArrayList<String>  files = getFileList(PathType.serverPath, fileName);
    try {
      for (String str : files) {
        lastLoadedFileName = str;
        FileLocal fileLocal = rl.getFile(str);
        if (fileLocal != null) {
          return new ByteArrayInputStream(fileLocal.getFileCompiledData());
        }
      }
    }
    catch (ClipsException ex) {
      MessageBox.asyncShowExceptionOnly(ex, true);
View Full Code Here

TOP

Related Classes of cli_fmw.delegate.report.FileLocal

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.