19 package org.sleuthkit.autopsy.progress;
24 @SuppressWarnings(
"PMD.SingularField")
25 class ProgressPanel extends javax.swing.JPanel {
27 private static final long serialVersionUID = 1L;
31 this.progressBar.setMinimum(0);
32 this.progressBar.setIndeterminate(
true);
35 void setMessage(String message) {
36 this.progressMessage.setText(message);
39 void setIndeterminate(
boolean indeterminate) {
40 this.progressBar.setIndeterminate(indeterminate);
43 void setMaximum(
int max) {
44 this.progressBar.setMaximum(max);
47 void setCurrent(
int current) {
48 this.progressBar.setValue(current);
56 @SuppressWarnings(
"unchecked")
58 private
void initComponents() {
60 progressMessage =
new javax.swing.JLabel();
61 progressBar =
new javax.swing.JProgressBar();
63 org.openide.awt.Mnemonics.setLocalizedText(progressMessage,
org.openide.util.NbBundle.getMessage(ProgressPanel.class,
"ProgressPanel.progressMessage.text"));
65 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
66 this.setLayout(layout);
67 layout.setHorizontalGroup(
68 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
69 .addGroup(layout.createSequentialGroup()
71 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
72 .addComponent(progressMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
73 .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE))
74 .addContainerGap(23, Short.MAX_VALUE))
76 layout.setVerticalGroup(
77 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
78 .addGroup(layout.createSequentialGroup()
80 .addComponent(progressMessage)
82 .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
83 .addContainerGap(33, Short.MAX_VALUE))
89 private javax.swing.JProgressBar progressBar;
90 private javax.swing.JLabel progressMessage;