< prev index next >

src/com/sun/javatest/tool/jthelp/JTHelpProgressBar.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


  19  * You should have received a copy of the GNU General Public License version
  20  * 2 along with this work; if not, write to the Free Software Foundation,
  21  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  22  *
  23  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  24  * or visit www.oracle.com if you need additional information or have any
  25  * questions.
  26  */
  27 package com.sun.javatest.tool.jthelp;
  28 
  29 import com.sun.javatest.tool.UIFactory;
  30 
  31 import javax.swing.*;
  32 import java.awt.*;
  33 import java.beans.PropertyChangeEvent;
  34 import java.beans.PropertyChangeListener;
  35 
  36 public class JTHelpProgressBar extends Component implements PropertyChangeListener {
  37 
  38     private JProgressBar progressBar;
  39     private SwingWorker task;
  40     private JDialog frame;
  41     private JPanel сontentPane;
  42     private UIFactory uif;
  43 
  44 
  45     public JTHelpProgressBar(SwingWorker progressTask) {
  46         uif = new UIFactory(this, null);
  47 
  48         task = progressTask;
  49         сontentPane = new JPanel(new BorderLayout());
  50         JLabel waitText = uif.createLabel("help.wait");
  51         progressBar = uif.createProgressBar("help.progress", JProgressBar.HORIZONTAL);
  52 
  53         progressBar.setMinimum(0);
  54         progressBar.setMaximum(100);
  55         progressBar.setValue(0);
  56         progressBar.setStringPainted(true);
  57 
  58         JPanel panel = new JPanel();
  59         panel.add(waitText);
  60         panel.add(progressBar);
  61 
  62         сontentPane.add(panel, BorderLayout.PAGE_START);
  63     }
  64 
  65     public void propertyChange(PropertyChangeEvent evt) {




  19  * You should have received a copy of the GNU General Public License version
  20  * 2 along with this work; if not, write to the Free Software Foundation,
  21  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  22  *
  23  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  24  * or visit www.oracle.com if you need additional information or have any
  25  * questions.
  26  */
  27 package com.sun.javatest.tool.jthelp;
  28 
  29 import com.sun.javatest.tool.UIFactory;
  30 
  31 import javax.swing.*;
  32 import java.awt.*;
  33 import java.beans.PropertyChangeEvent;
  34 import java.beans.PropertyChangeListener;
  35 
  36 public class JTHelpProgressBar extends Component implements PropertyChangeListener {
  37 
  38     private JProgressBar progressBar;
  39     private SwingWorker<Void, Void> task;
  40     private JDialog frame;
  41     private JPanel сontentPane;
  42     private UIFactory uif;
  43 
  44 
  45     public JTHelpProgressBar(SwingWorker<Void, Void> progressTask) {
  46         uif = new UIFactory(this, null);
  47 
  48         task = progressTask;
  49         сontentPane = new JPanel(new BorderLayout());
  50         JLabel waitText = uif.createLabel("help.wait");
  51         progressBar = uif.createProgressBar("help.progress", JProgressBar.HORIZONTAL);
  52 
  53         progressBar.setMinimum(0);
  54         progressBar.setMaximum(100);
  55         progressBar.setValue(0);
  56         progressBar.setStringPainted(true);
  57 
  58         JPanel panel = new JPanel();
  59         panel.add(waitText);
  60         panel.add(progressBar);
  61 
  62         сontentPane.add(panel, BorderLayout.PAGE_START);
  63     }
  64 
  65     public void propertyChange(PropertyChangeEvent evt) {


< prev index next >