* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*/
import javax.swing.*;
import javax.swing.text.*;
import javax.accessibility.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
/**
* Demo the Progress Bar
*
* @version 1.9 08/26/98
* @author Jeff Dinkins
# @author Peter Korn (accessibility support)
*/
public class ProgressPanel extends JPanel implements ActionListener {
SwingSet swing;
JProgressBar progressBar;
JTextArea progressTextArea;
JButton loadButton;
JButton stopButton;
Timer timer;
Object lock = new Object();
public ProgressPanel(SwingSet swing) {
this.swing = swing;
setLayout(new BorderLayout());
JPanel textWrapper = new JPanel(new BorderLayout());
textWrapper.setBorder(swing.loweredBorder);
textWrapper.setAlignmentX(LEFT_ALIGNMENT);
progressTextArea = new MyTextArea();
progressTextArea.getAccessibleContext().setAccessibleName("Text progressively being loaded in");
progressTextArea.getAccessibleContext().setAccessibleDescription("This JTextArea is being filled with text from a buffer progressively a character at a time while the progress bar a the bottom of the window shows the loading progress");