<commit_before>package installer;

/*
 * InstallWizard.java
 *
 * Created on 04 July 2002, 15:09
 */

/**
 *
 * @author  mike
 */

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.net.*;
import java.io.*;

public class InstallWizard extends javax.swing.JFrame implements ActionListener {

    private static class ShutdownHook extends Thread {
        public void run()
    {
            if (InstallWizard.isInstallStarted())
            {
                // Check for and backup any config.xml files
                // Check for and backup any StarBasic macro files
                // Check for and backup ProtocolHandler
                /*
                if (!InstallWizard.isPatchedTypes())
        {
                    File backup = new File(InstUtil.getTmpDir(), "TypeDetection.xml");
                    File destination = new File(InstallWizard.getTypesPath());
                    InstUtil.copy(backup, destination); //Restore typedetection.xml
        }
        if (!InstallWizard.isPatchedJava())
        {
                    File backup = new File(InstUtil.getTmpDir(), "Java.xml");
                    File destination = new File(InstallWizard.getJavaPath());
                    InstUtil.copy(backup, destination); //Restore typedetection.xml
        }
        if (!InstallWizard.isPatchedRDB())
        {
                    File backup = new File(InstUtil.getTmpDir(), "applicat.rdb");
                    File destination = new File(InstallWizard.getJavaPath());
                    //InstUtil.copy(backup, destination); //Restore typedetection.xml
        }
                 */
                //System.out.println( "ShutdownHook" );
            }

            InstUtil.removeTmpDir();
    }
    }// class ShutdownHook
    
    static {
        Runtime rt=Runtime.getRuntime();
        rt.addShutdownHook(new ShutdownHook());
    }
    
    /** Creates new form InstallWizard */
    public InstallWizard() {
        super("Scripting Framework Installer (prototype)");
    //setBackground(Color.WHITE);
    setBackground(new Color(0,0,0));
    locations = new ArrayList();
    //Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
    Point center = new Point( 400, 400 );
    int windowWidth=200;
    int windowHeight=300;
    setSize(windowWidth,windowHeight);
    setBounds((center.x-windowWidth/2)-115,(center.y-windowWidth/2)-100, windowWidth,windowHeight);
    setResizable(false);        
    initComponents();
    }

    /** This method is called from within the constructor to<commit_msg>JDK1.3 needs to pack before setting resize to false<commit_after>package installer;

/*
 * InstallWizard.java
 *
 * Created on 04 July 2002, 15:09
 */

/**
 *
 * @author  mike
 */

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.net.*;
import java.io.*;

public class InstallWizard extends javax.swing.JFrame implements ActionListener {

    private static class ShutdownHook extends Thread {
        public void run()
    {
            if (InstallWizard.isInstallStarted())
            {
                // Check for and backup any config.xml files
                // Check for and backup any StarBasic macro files
                // Check for and backup ProtocolHandler
                /*
                if (!InstallWizard.isPatchedTypes())
        {
                    File backup = new File(InstUtil.getTmpDir(), "TypeDetection.xml");
                    File destination = new File(InstallWizard.getTypesPath());
                    InstUtil.copy(backup, destination); //Restore typedetection.xml
        }
        if (!InstallWizard.isPatchedJava())
        {
                    File backup = new File(InstUtil.getTmpDir(), "Java.xml");
                    File destination = new File(InstallWizard.getJavaPath());
                    InstUtil.copy(backup, destination); //Restore typedetection.xml
        }
        if (!InstallWizard.isPatchedRDB())
        {
                    File backup = new File(InstUtil.getTmpDir(), "applicat.rdb");
                    File destination = new File(InstallWizard.getJavaPath());
                    //InstUtil.copy(backup, destination); //Restore typedetection.xml
        }
                 */
                //System.out.println( "ShutdownHook" );
            }

            InstUtil.removeTmpDir();
    }
    }// class ShutdownHook
    
    static {
        Runtime rt=Runtime.getRuntime();
        rt.addShutdownHook(new ShutdownHook());
    }
    
    /** Creates new form InstallWizard */
    public InstallWizard() {
        super("Scripting Framework Installer (prototype)");
    //setBackground(Color.WHITE);
    setBackground(new Color(0,0,0));
    locations = new ArrayList();
    //Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
    Point center = new Point( 400, 400 );
    int windowWidth=200;
    int windowHeight=300;
    setSize(windowWidth,windowHeight);
    setBounds((center.x-windowWidth/2)-115,(center.y-windowWidth/2)-100, windowWidth,windowHeight);
    initComponents();
    setResizable(false);        
    }

    /** This method is called from within the constructor to
{'fraction_non_alphanumeric': 0.1107074569789675, 'fraction_numerical': 0.0130019120458891, 'mean_word_length': 2.095266272189349, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5442772', 'n_tokens_mistral': 1435, 'n_tokens_neox': 1350, 'n_words': 325}