Autopsy  4.4
Graphical digital forensics platform for The Sleuth Kit and other tools.
ProgressPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2017 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.progress;
20 
24 class ProgressPanel extends javax.swing.JPanel {
25 
26  private static final long serialVersionUID = 1L;
27 
28  ProgressPanel() {
29  initComponents();
30  this.progressBar.setMinimum(0);
31  this.progressBar.setIndeterminate(true);
32  }
33 
34  void setMessage(String message) {
35  this.progressMessage.setText(message);
36  }
37 
38  void setIndeterminate(boolean indeterminate) {
39  this.progressBar.setIndeterminate(indeterminate);
40  }
41 
42  void setMaximum(int max) {
43  this.progressBar.setMaximum(max);
44  }
45 
46  void setCurrent(int current) {
47  this.progressBar.setValue(current);
48  }
49 
55  @SuppressWarnings("unchecked")
56  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
57  private void initComponents() {
58 
59  progressMessage = new javax.swing.JLabel();
60  progressBar = new javax.swing.JProgressBar();
61 
62  org.openide.awt.Mnemonics.setLocalizedText(progressMessage, org.openide.util.NbBundle.getMessage(ProgressPanel.class, "ProgressPanel.progressMessage.text")); // NOI18N
63 
64  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
65  this.setLayout(layout);
66  layout.setHorizontalGroup(
67  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
68  .addGroup(layout.createSequentialGroup()
69  .addGap(22, 22, 22)
70  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
71  .addComponent(progressMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
72  .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE))
73  .addContainerGap(23, Short.MAX_VALUE))
74  );
75  layout.setVerticalGroup(
76  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77  .addGroup(layout.createSequentialGroup()
78  .addGap(24, 24, 24)
79  .addComponent(progressMessage)
80  .addGap(18, 18, 18)
81  .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
82  .addContainerGap(33, Short.MAX_VALUE))
83  );
84  }// </editor-fold>//GEN-END:initComponents
85 
86 
87  // Variables declaration - do not modify//GEN-BEGIN:variables
88  private javax.swing.JProgressBar progressBar;
89  private javax.swing.JLabel progressMessage;
90  // End of variables declaration//GEN-END:variables
91 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Jun 13 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.