2010年1月7日- 小钳子的日志- 网易博客

2010年1月7日

W:\workspace\EI\src\cn\com\chengjun\ei\presents\unitscore\stu\questype\present\StuQuesTypePresentController.java

/*
    * 使用的进度条
    */
   StatusMonitor sm = new DefaultStatusMonitor((Window) getPane()
     .getTopLevelAncestor()) {
    public void run() {
     this.setMsg(UIConstants.LOAD_DATA_EXCEPTION);
     try{
      qtModel.initPropData();
      qtModel.initQuesTypeData();
     }catch(Exception e){
       e.printStackTrace();
      PresentUtils.showSQLException(getPane());
      /* 第四步:关闭进度条  */
      this.end();
      this.close();
      return;
     }
     List subjectList = qtModel.getSubjectList();
     if(subjectList==null){
      Utils.showNoDataMsgDlg((Window) getPane().getTopLevelAncestor());
      setNoDataPanel();
      this.close();
      this.end();
      return ;
     }
     initSubjectButton(subjectList);
     System.out.println("这里就是小分分析的右边");
       /*JTable table = getTable(selectSubject);
     qtPanel.getTableScrollPanel().getRowHeader().setVisible(true);
     if(table==null){
      Utils.showNoDataMsgDlg((Window) getPane().getTopLevelAncestor());
      setNoDataPanel();
      this.close();
      this.end();
      return ;
     }*/
     System.out.println("爱我别走,好吗");
     
     
     //qtPanel.getChartPanel().setChart(qtModel.getJfreeChart(selectSubject));     
     
     JFreeChart chart=qtModel.getJfreeChart(selectSubject);
     
     JasperReport report = null;
     
      try {
                report = (JasperReport) JRLoader.loadObject("E:/jfreechar/ee.jasper");
            } catch (JRException e) {
               System.out.println("装载出错!");
                e.printStackTrace();
            }
           
        Map parameters = new HashMap(); 
       
        System.out.println("xxxxxxxxxxxxxxxxxxxxx");
       
        System.out.println(EITableFactory.xiao);
       
        System.out.println("xxxxxxxxxxxxxxxxxxxxx");
       
       
           parameters.put("aveScore", chart.createBufferedImage(200, 300));
          
           parameters.put("kunling", chart.createBufferedImage(600, 400));
          
           parameters.put("hehe", EITableFactory.xiao);
          
          
           JasperPrint jasperPrint=null;
     try {
      jasperPrint = JasperFillManager.fillReport(report,parameters, new JREmptyDataSource());
     } catch (JRException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
     }
          
     
          
           System.out.println(jasperPrint.getPageHeight());
          
         
           qtPanel.getChartPanel().setChart(chart);
          
           JasperViewer viewer = new JasperViewer(jasperPrint);
             
           viewer.setVisible(true);
          
          // viewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);    
     
     
     
     //qtPanel.getSubjectPanel().setVisible(true);
     qtPanel.validate();
    }
   };
   sm.start();

郑重声明:资讯 【2010年1月7日- 小钳子的日志- 网易博客】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——