Merge pull request #803 from rcordovano/file_ingest_threads_options

File ingest threads options
This commit is contained in:
Richard Cordovano 2014-06-30 16:59:43 -04:00
commit 98775fc7a7
2 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,6 @@
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
@ -43,6 +42,7 @@
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>

View File

@ -29,8 +29,9 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
AutopsyOptionsPanel(AutopsyOptionsPanelController controller) {
initComponents();
numberOfFileIngestThreadsComboBox.setModel(new DefaultComboBoxModel<>(new Integer[]{1, 2, 4, 8, 16}));
restartRequiredLabel.setText(NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.restartRequiredLabel.text", Runtime.getRuntime().availableProcessors()));
numberOfFileIngestThreadsComboBox.setModel(new DefaultComboBoxModel<>(new Integer[]{1, 2, 4, 6, 8, 12, 16}));
int availableProcessors = Runtime.getRuntime().availableProcessors();
restartRequiredLabel.setText(NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.restartRequiredLabel.text", availableProcessors > 2 ? availableProcessors - 2 : 1));
// TODO listen to changes in form fields and call controller.changed()
}