Java Reference
In-Depth Information
InstallerDialog . A convenience abstract class that perform some operations common
to all CDLauncher 's auxiliary dialogs.
CustomInstallDialog . Used for modifying modules installation, shown at work in
Figure 7.3. Its code is not reported here because of lack of interest.
InstallationProcessDialog . Shown in Figure 7.5, its code is reported in Listing 7.3
and discussed right after it.
SummaryDialog . A screenshot from an instance of this class is shown in Figure 7.4. Its
code is not discussed here.
ReadDialog . A simple dialog showing a text file at the end of the installation. A screen-
shot from an instance of this class is shown in Figure 7.6. Its code is not discussed here.
7
Listing 7.1 shows the CDLauncher class, the main class of our installer application.
L ISTING 7.1 The CDLauncher Class
package com.marinilli.b2.c7.launcher;
import java.awt.event.*;
import java.util.Properties;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.File;
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import javax.swing.event.*;
/**
* Chapter 7 - the main class for the CD-ROM installer
*
* @author Mauro Marinilli
* @version 1.0
*/
public class CDLauncher extends JFrame implements Runnable {
private final static String PROPS_FILENAME = “install.properties”;
public final static String SETUP_DIR = “setup/”;
public final static String SETUP_RES_DIR = SETUP_DIR + “res/”;
private String currentDir;
private Properties installationSettings;
private String appName;
Search WWH ::




Custom Search