Java Reference
In-Depth Information
L ISTING 7.2 Continued
/**
* this method is implemented by subclasses
*/
abstract void graphInit();
}
The InstallerDialog class in Listing 7.3 is the common superclass of all auxiliary Installer
dialogs and performs only GUI initialization tasks.
An interesting class is the one responsible for showing the installation progress to the user, the
InstallationProgressDialog class shown in Listing 7.3.
L ISTING 7.3 The InstallationProgressDialog Class
package com.marinilli.b2.c7.launcher;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.Border;
import java.awt.event.*;
/**
* Chapter 7 - shows the user the installation progress
*
* @author Mauro Marinilli
* @version 1.0
*/
public class InstallationProgressDialog extends InstallerDialog {
private final static String TITLE_HEADER = “Installing.. “;
private JProgressBar progressBar;
private Timer timer;
/**
* Constructor
*/
public InstallationProgressDialog(CDLauncher inst) {
super(inst, TITLE_HEADER);
}
/**
* GUI initialization
*/
void graphInit() {
setModal(false);
Search WWH ::




Custom Search