1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
package com.brainsoft.util;
import java.awt.Dimension;
import java.sql.Connection;
import java.sql.SQLException;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.JRViewer;
/**
*
* @author yannick
*/
public class ApercuEtat extends javax.swing.JFrame {
/**
* Creates new form ApercuEtat
*/
public ApercuEtat(JasperPrint jrPrint) {
try {
jPanelApercu = new JRViewer(jrPrint);
getContentPane().add(jPanelApercu, java.awt.BorderLayout.CENTER);
initComponents();
}catch (JRException e ){
}
}
public ApercuEtat(JasperPrint jrPrint , String titreEtat) {
try {
jPanelApercu = new JRViewer(jrPrint);
getContentPane().add(jPanelApercu, java.awt.BorderLayout.CENTER);
initComponents();
setTitle(titreEtat);
}catch (JRException e ){
}
}
public ApercuEtat(java.io.InputStream is, boolean isXML) {
try {
jPanelApercu = new JRViewer( is,isXML);
getContentPane().add(jPanelApercu, java.awt.BorderLayout.CENTER);
initComponents();
}catch (JRException e ){
}
}
public ApercuEtat(java.io.InputStream is, boolean isXML , String titreEtat) {
try {
jPanelApercu = new JRViewer( is,isXML);
getContentPane().add(jPanelApercu, java.awt.BorderLayout.CENTER);
initComponents();
setTitle(titreEtat);
}catch (JRException e ){
}
}
public ApercuEtat(java.lang.String fileName, boolean isXML) {
try{
jPanelApercu = new JRViewer(fileName, isXML);
getContentPane().add(jPanelApercu, java.awt.BorderLayout.CENTER);
initComponents();
}catch (JRException e ){
}
}
public ApercuEtat(java.lang.String fileName, boolean isXML ,String titreEtat) {
try{
jPanelApercu = new JRViewer(fileName, isXML);
getContentPane().add(jPanelApercu, java.awt.BorderLayout.CENTER);
initComponents();
setTitle(titreEtat);
}catch (JRException e ){
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Aper\u00e7u");
setLocationByPlatform(true);
setMinimumSize(new Dimension(800,600));
setPreferredSize(new Dimension(800,600));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
pack();
}
// </editor-fold>
private void formWindowClosing(java.awt.event.WindowEvent evt) {
// TODO add your handling code here:
getContentPane().remove(jPanelApercu);
jPanelApercu=null;
System.gc();
}
/**
* @param args the command line arguments
*/
// Variables declaration - do not modify
// End of variables declaration
private JRViewer jPanelApercu;
} |
Partager