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_DA
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();