mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
add make timeline progress bar to the dialog
This commit is contained in:
parent
9a03307533
commit
db89cc5d43
@ -23,19 +23,27 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="progressBar" alignment="0" pref="263" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="51" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="131" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="37" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||
<Component id="progressBar" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="64" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -48,5 +56,7 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JProgressBar" name="progressBar">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -29,8 +29,7 @@ import javax.swing.KeyStroke;
|
||||
import org.openide.windows.WindowManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author mciver
|
||||
* Dialog with progress bar that pops up when timeline is being generated
|
||||
*/
|
||||
public class TimelineProgressDialog extends javax.swing.JDialog {
|
||||
|
||||
@ -54,6 +53,8 @@ public class TimelineProgressDialog extends javax.swing.JDialog {
|
||||
//set icon the same as main app
|
||||
setIconImage(WindowManager.getDefault().getMainWindow().getIconImage());
|
||||
|
||||
progressBar.setIndeterminate(true);
|
||||
|
||||
// Close the dialog when Esc is pressed
|
||||
String cancelName = "cancel";
|
||||
InputMap inputMap = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
@ -83,6 +84,7 @@ public class TimelineProgressDialog extends javax.swing.JDialog {
|
||||
private void initComponents() {
|
||||
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
progressBar = new javax.swing.JProgressBar();
|
||||
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
public void windowClosing(java.awt.event.WindowEvent evt) {
|
||||
@ -97,16 +99,22 @@ public class TimelineProgressDialog extends javax.swing.JDialog {
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(51, 51, 51)
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel1)
|
||||
.addContainerGap(131, Short.MAX_VALUE))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(37, 37, 37)
|
||||
.addGap(17, 17, 17)
|
||||
.addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel1)
|
||||
.addContainerGap(64, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
pack();
|
||||
@ -119,6 +127,8 @@ public class TimelineProgressDialog extends javax.swing.JDialog {
|
||||
doClose(RET_CANCEL);
|
||||
}//GEN-LAST:event_closeDialog
|
||||
|
||||
|
||||
|
||||
public void doClose(int retStatus) {
|
||||
returnStatus = retStatus;
|
||||
setVisible(false);
|
||||
@ -127,6 +137,7 @@ public class TimelineProgressDialog extends javax.swing.JDialog {
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JProgressBar progressBar;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
private int returnStatus = RET_CANCEL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user