/*
 * CompatibilityDialog.java
 *
 *  iReport  --  Visual designer for generating JasperReports Documents
 *  Copyright (C) 2002-2003  Giulio Toffoli gt@businesslogic.it
 *
 *  This program is free software; you can redistribute  and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *  Giulio Toffoli
 *  Via T.Aspetti, 233
 *  35100 Padova ITALY
 *  gt@businesslogic.it
 *
 *
 * Created on 2 giugno 2003, 22.30
 */

package it.businesslogic.ireport.gui;
import it.businesslogic.ireport.util.*;
/**
 *
 * @author  Administrator
 */
public class CompatibilityDialog extends javax.swing.JDialog {
    
    /** Creates new form CompatibilityDialog */
    public CompatibilityDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setSize(330, 253);
        Misc.centerFrame(this);
    }
    
    /** 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.
     */
    private void initComponents()//GEN-BEGIN:initComponents
    {
       jPanel8 = new javax.swing.JPanel();
       jCheckBoxAutosave1 = new javax.swing.JCheckBox();
       jCheckBoxAutosave2 = new javax.swing.JCheckBox();
       jCheckBoxAutosave3 = new javax.swing.JCheckBox();
       jPanel9 = new javax.swing.JPanel();
       jCheckBoxAutosave4 = new javax.swing.JCheckBox();
       jCheckBoxAutosave5 = new javax.swing.JCheckBox();
       jCheckBoxAutosave6 = new javax.swing.JCheckBox();
       jButton1 = new javax.swing.JButton();
       jButton2 = new javax.swing.JButton();
       
       FormListener formListener = new FormListener();
       
       getContentPane().setLayout(null);
       
       setTitle("Compatibility options");
       setResizable(false);
       addWindowListener(formListener);
       
       jPanel8.setLayout(null);
       
       jPanel8.setBorder(new javax.swing.border.TitledBorder(new javax.swing.border.EtchedBorder(), "JasperReports 0.4.5", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 11)));
       jPanel8.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave1.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave1.setSelected(true);
       jCheckBoxAutosave1.setText("Save text vertical alignement");
       jPanel8.add(jCheckBoxAutosave1);
       jCheckBoxAutosave1.setBounds(26, 22, 222, 18);
       
       jCheckBoxAutosave2.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave2.setSelected(true);
       jCheckBoxAutosave2.setText("Save rounded rectangle");
       jPanel8.add(jCheckBoxAutosave2);
       jCheckBoxAutosave2.setBounds(26, 40, 222, 18);
       
       jCheckBoxAutosave3.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave3.setSelected(true);
       jCheckBoxAutosave3.setText("Save ellipse");
       jPanel8.add(jCheckBoxAutosave3);
       jCheckBoxAutosave3.setBounds(26, 58, 222, 18);
       
       getContentPane().add(jPanel8);
       jPanel8.setBounds(6, 8, 310, 86);
       
       jPanel9.setLayout(null);
       
       jPanel9.setBorder(new javax.swing.border.TitledBorder(new javax.swing.border.EtchedBorder(), "JasperReports 0.4.6", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 11)));
       jPanel9.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave4.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave4.setSelected(true);
       jCheckBoxAutosave4.setText("Save image vertical alignement");
       jPanel9.add(jCheckBoxAutosave4);
       jCheckBoxAutosave4.setBounds(26, 22, 222, 18);
       
       jCheckBoxAutosave5.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave5.setSelected(true);
       jCheckBoxAutosave5.setText("Save image horizontal alignement");
       jPanel9.add(jCheckBoxAutosave5);
       jCheckBoxAutosave5.setBounds(26, 40, 222, 18);
       
       jCheckBoxAutosave6.setFont(new java.awt.Font("Dialog", 0, 11));
       jCheckBoxAutosave6.setSelected(true);
       jCheckBoxAutosave6.setText("Save background band");
       jPanel9.add(jCheckBoxAutosave6);
       jCheckBoxAutosave6.setBounds(26, 58, 222, 18);
       
       getContentPane().add(jPanel9);
       jPanel9.setBounds(6, 98, 310, 86);
       
       jButton1.setFont(new java.awt.Font("Dialog", 0, 11));
       jButton1.setMnemonic('c');
       jButton1.setText("Cancel");
       getContentPane().add(jButton1);
       jButton1.setBounds(242, 196, 72, 25);
       
       jButton2.setFont(new java.awt.Font("Dialog", 0, 11));
       jButton2.setMnemonic('o');
       jButton2.setText("Ok");
       getContentPane().add(jButton2);
       jButton2.setBounds(166, 196, 72, 25);
       
       pack();
    }
    
    // Code for dispatching events from components to event handlers.
    
    private class FormListener implements java.awt.event.WindowListener
    {
       public void windowActivated(java.awt.event.WindowEvent evt)
       {
       }
       
       public void windowClosed(java.awt.event.WindowEvent evt)
       {
       }
       
       public void windowClosing(java.awt.event.WindowEvent evt)
       {
          if (evt.getSource() == CompatibilityDialog.this)
          {
             CompatibilityDialog.this.closeDialog(evt);
          }
       }
       
       public void windowDeactivated(java.awt.event.WindowEvent evt)
       {
       }
       
       public void windowDeiconified(java.awt.event.WindowEvent evt)
       {
       }
       
       public void windowIconified(java.awt.event.WindowEvent evt)
       {
       }
       
       public void windowOpened(java.awt.event.WindowEvent evt)
       {
       }
    }//GEN-END:initComponents
    
    /** Closes the dialog */
    private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
    	close();
    }//GEN-LAST:event_closeDialog

    private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt){
	close();
    }
    private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt){
	save();
	close();
    }
    /**General implementation of saving*/
    private void save(){
	//ErtanO 09.02.2004, todo
    }
    /**General implementation of closing the form without saving*/
    private void close(){
        setVisible(false);
        dispose();	
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        new CompatibilityDialog(new javax.swing.JFrame(), true).show();
    }
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JButton jButton1;
    protected javax.swing.JButton jButton2;
    protected javax.swing.JCheckBox jCheckBoxAutosave1;
    protected javax.swing.JCheckBox jCheckBoxAutosave2;
    protected javax.swing.JCheckBox jCheckBoxAutosave3;
    protected javax.swing.JCheckBox jCheckBoxAutosave4;
    protected javax.swing.JCheckBox jCheckBoxAutosave5;
    protected javax.swing.JCheckBox jCheckBoxAutosave6;
    protected javax.swing.JPanel jPanel8;
    protected javax.swing.JPanel jPanel9;
    // End of variables declaration//GEN-END:variables
    
}
