Only allow one report to be generated at a time.

This commit is contained in:
Jeff Wallace 2013-10-15 12:23:21 -04:00
parent 4893fb3356
commit 1f153727db
6 changed files with 157 additions and 230 deletions

View File

@ -24,10 +24,10 @@
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="reportModulesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="modulesScrollPane" alignment="0" min="-2" pref="186" max="-2" attributes="0"/>
<Component id="reportModulesLabel" min="-2" max="-2" attributes="0"/>
<Component id="modulesScrollPane" min="-2" pref="190" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="configurationPanel" max="32767" attributes="0"/>
<Component id="descriptionScrollPane" max="32767" attributes="0"/>
@ -43,12 +43,12 @@
<Component id="reportModulesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="modulesScrollPane" pref="208" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="configurationPanel" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="descriptionScrollPane" min="-2" pref="32" max="-2" attributes="0"/>
</Group>
<Component id="modulesScrollPane" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@ -56,30 +56,6 @@
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="modulesScrollPane">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTable" name="modulesTable">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="f0" green="f0" red="f0" type="rgb"/>
</Property>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="0" rowCount="0"/>
</Property>
<Property name="showHorizontalLines" type="boolean" value="false"/>
<Property name="showVerticalLines" type="boolean" value="false"/>
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
<TableHeader reorderingAllowed="true" resizingAllowed="true"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="reportModulesLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
@ -101,12 +77,12 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="440" max="32767" attributes="0"/>
<EmptySpace min="0" pref="432" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="176" max="32767" attributes="0"/>
<EmptySpace min="0" pref="168" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
@ -135,5 +111,30 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="modulesScrollPane">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JList" name="modulesJList">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="f0" green="f0" red="f0" type="rgb"/>
</Property>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="5">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
<StringItem index="4" value="Item 5"/>
</StringArray>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@ -19,89 +19,72 @@
package org.sleuthkit.autopsy.report;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.ListCellRenderer;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableColumn;
import org.openide.util.Lookup;
import org.sleuthkit.autopsy.coreutils.Logger;
public final class ReportVisualPanel1 extends JPanel {
public final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
private static final Logger logger = Logger.getLogger(ReportVisualPanel1.class.getName());
private ReportWizardPanel1 wizPanel;
private Map<GeneralReportModule, Boolean> generalModuleStates = new LinkedHashMap<GeneralReportModule, Boolean>();
private Map<FileReportModule, Boolean> fileListModuleStates = new LinkedHashMap<FileReportModule, Boolean>();
private List<ReportModule> modules = new ArrayList<>();
private Map<ReportModule, Boolean> moduleStates;
private ModulesTableModel modulesModel;
private ModuleSelectionListener modulesListener;
private List<GeneralReportModule> generalModules = new ArrayList<>();
private List<TableReportModule> tableModules = new ArrayList<>();
private List<FileReportModule> fileModules = new ArrayList<>();
private Integer selectedIndex;
/**
* Creates new form ReportVisualPanel1
*/
public ReportVisualPanel1(ReportWizardPanel1 wizPanel) {
moduleStates = new LinkedHashMap<>();
initComponents();
initModules();
this.wizPanel = wizPanel;
initComponents();
configurationPanel.setLayout(new BorderLayout());
descriptionTextPane.setEditable(false);
modulesTable.setRowSelectionInterval(0, 0);
initModules();
}
// Initialize the list of ReportModules
private void initModules() {
for (ReportModule module : Lookup.getDefault().lookupAll(TableReportModule.class)) {
if (module.getName().equals("Results - HTML")) {
moduleStates.put(module, Boolean.TRUE);
} else {
moduleStates.put(module, Boolean.FALSE);
}
}
for (ReportModule module : Lookup.getDefault().lookupAll(GeneralReportModule.class)) {
moduleStates.put(module, Boolean.FALSE);
}
for (ReportModule module : Lookup.getDefault().lookupAll(FileReportModule.class)) {
moduleStates.put(module, Boolean.FALSE);
for (TableReportModule module : Lookup.getDefault().lookupAll(TableReportModule.class)) {
tableModules.add(module);
modules.add(module);
}
for (GeneralReportModule module : Lookup.getDefault().lookupAll(GeneralReportModule.class)) {
generalModules.add(module);
modules.add(module);
}
for (FileReportModule module : Lookup.getDefault().lookupAll(FileReportModule.class)) {
fileModules.add(module);
modules.add(module);
}
modules.addAll(moduleStates.keySet());
Collections.sort(modules, new Comparator<ReportModule>() {
@Override
public int compare(ReportModule rm1, ReportModule rm2) {
return rm1.getName().compareTo(rm2.getName());
}
});
modulesModel = new ModulesTableModel();
modulesListener = new ModuleSelectionListener();
modulesTable.setModel(modulesModel);
modulesTable.getSelectionModel().addListSelectionListener(modulesListener);
modulesTable.setTableHeader(null);
modulesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
modulesTable.setRowHeight(modulesTable.getRowHeight() + 5);
int width = modulesScrollPane.getPreferredSize().width;
for (int i = 0; i < modulesTable.getColumnCount(); i++) {
TableColumn column = modulesTable.getColumnModel().getColumn(i);
if (i == 0) {
column.setPreferredWidth(((int) (width * 0.15)));
} else {
column.setPreferredWidth(((int) (width * 0.84)));
}
}
modulesJList.getSelectionModel().addListSelectionListener(this);
modulesJList.setCellRenderer(new ModuleCellRenderer());
modulesJList.setListData(modules.toArray());
selectedIndex = 0;
modulesJList.setSelectedIndex(selectedIndex);
}
@Override
@ -109,43 +92,50 @@ public final class ReportVisualPanel1 extends JPanel {
return "Select and Configure Report Modules";
}
public ReportModule getSelectedModule() {
return modules.get(selectedIndex);
}
/**
* @return the enabled/disabled states of all TableReportModules
* Get the Selection status of the TableModules.
*
* @return
*/
Map<TableReportModule, Boolean> getTableModuleStates() {
Map<TableReportModule, Boolean> tableModuleStates = new LinkedHashMap<>();
for (Entry<ReportModule, Boolean> module : moduleStates.entrySet()) {
if (module.getKey() instanceof TableReportModule) {
tableModuleStates.put((TableReportModule) module.getKey(), module.getValue());
}
Map<TableReportModule, Boolean> reportModuleStates = new LinkedHashMap<>();
ReportModule mod = getSelectedModule();
if (tableModules.contains(mod)) {
reportModuleStates.put((TableReportModule) mod, Boolean.TRUE);
}
return tableModuleStates;
return reportModuleStates;
}
/**
* @return the enabled/disabled states of all GeneralReportModules
* Get the selection status of the GeneralReportModules.
*
* @return
*/
Map<GeneralReportModule, Boolean> getGeneralModuleStates() {
Map<GeneralReportModule, Boolean> generalModuleStates = new LinkedHashMap<>();
for (Entry<ReportModule, Boolean> module : moduleStates.entrySet()) {
if (module.getKey() instanceof GeneralReportModule) {
generalModuleStates.put((GeneralReportModule) module.getKey(), module.getValue());
}
Map<GeneralReportModule, Boolean> reportModuleStates = new LinkedHashMap<>();
ReportModule mod = getSelectedModule();
if (generalModules.contains(mod)) {
reportModuleStates.put((GeneralReportModule) mod, Boolean.TRUE);
}
return generalModuleStates;
return reportModuleStates;
}
/**
* @return the enabled/disabled states of all FileListReportModules
* Get the selection status of the FileReportModules.
*
* @return
*/
Map<FileReportModule, Boolean> getFileListModuleStates() {
Map<FileReportModule, Boolean> fileModuleStates = new LinkedHashMap<>();
for (Entry<ReportModule, Boolean> module : moduleStates.entrySet()) {
if (module.getKey() instanceof FileReportModule) {
fileModuleStates.put((FileReportModule) module.getKey(), module.getValue());
}
Map<FileReportModule, Boolean> getFileModuleStates() {
Map<FileReportModule, Boolean> reportModuleStates = new LinkedHashMap<>();
ReportModule mod = getSelectedModule();
if (fileModules.contains(mod)) {
reportModuleStates.put((FileReportModule) mod, Boolean.TRUE);
}
return fileModuleStates;
return reportModuleStates;
}
/**
@ -156,28 +146,15 @@ public final class ReportVisualPanel1 extends JPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
modulesScrollPane = new javax.swing.JScrollPane();
modulesTable = new javax.swing.JTable();
reportModulesLabel = new javax.swing.JLabel();
configurationPanel = new javax.swing.JPanel();
descriptionScrollPane = new javax.swing.JScrollPane();
descriptionTextPane = new javax.swing.JTextPane();
modulesScrollPane = new javax.swing.JScrollPane();
modulesJList = new javax.swing.JList();
setPreferredSize(new java.awt.Dimension(650, 250));
modulesTable.setBackground(new java.awt.Color(240, 240, 240));
modulesTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
}
));
modulesTable.setShowHorizontalLines(false);
modulesTable.setShowVerticalLines(false);
modulesScrollPane.setViewportView(modulesTable);
org.openide.awt.Mnemonics.setLocalizedText(reportModulesLabel, org.openide.util.NbBundle.getMessage(ReportVisualPanel1.class, "ReportVisualPanel1.reportModulesLabel.text")); // NOI18N
configurationPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(125, 125, 125)));
@ -190,7 +167,7 @@ public final class ReportVisualPanel1 extends JPanel {
);
configurationPanelLayout.setVerticalGroup(
configurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
.addGap(0, 168, Short.MAX_VALUE)
);
descriptionScrollPane.setBorder(null);
@ -199,6 +176,14 @@ public final class ReportVisualPanel1 extends JPanel {
descriptionTextPane.setBorder(null);
descriptionScrollPane.setViewportView(descriptionTextPane);
modulesJList.setBackground(new java.awt.Color(240, 240, 240));
modulesJList.setModel(new javax.swing.AbstractListModel() {
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
modulesScrollPane.setViewportView(modulesJList);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@ -207,8 +192,8 @@ public final class ReportVisualPanel1 extends JPanel {
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(reportModulesLabel)
.addComponent(modulesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addComponent(modulesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(configurationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(descriptionScrollPane))
@ -221,11 +206,11 @@ public final class ReportVisualPanel1 extends JPanel {
.addComponent(reportModulesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(modulesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(configurationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(modulesScrollPane))
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
@ -233,99 +218,47 @@ public final class ReportVisualPanel1 extends JPanel {
private javax.swing.JPanel configurationPanel;
private javax.swing.JScrollPane descriptionScrollPane;
private javax.swing.JTextPane descriptionTextPane;
private javax.swing.JList modulesJList;
private javax.swing.JScrollPane modulesScrollPane;
private javax.swing.JTable modulesTable;
private javax.swing.JLabel reportModulesLabel;
// End of variables declaration//GEN-END:variables
private class ModulesTableModel extends AbstractTableModel {
@Override
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
configurationPanel.removeAll();
ListSelectionModel m = (ListSelectionModel) e.getSource();
// single selection, so max selection index is the only one selected.
selectedIndex = m.getMaxSelectionIndex();
@Override
public int getRowCount() {
return moduleStates.size();
JPanel panel = new DefaultReportConfigurationPanel();
ReportModule module = modules.get(selectedIndex);
boolean generalModuleSelected = false;
if (module instanceof GeneralReportModule) {
JPanel generalPanel = ((GeneralReportModule) module).getConfigurationPanel();
panel = (generalPanel == null) ? new JPanel() : panel;
generalModuleSelected = true;
}
@Override
public int getColumnCount() {
return 2;
}
descriptionTextPane.setText(module.getDescription());
configurationPanel.add(panel, BorderLayout.CENTER);
configurationPanel.revalidate();
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
if (rowIndex >= moduleStates.size()) {
return "";
}
if (columnIndex == 0) {
// selection status
return moduleStates.get(modules.get(rowIndex));
} else {
// module name
return modules.get(rowIndex).getName();
}
}
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return columnIndex == 0;
}
@Override
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
if (columnIndex == 0) {
moduleStates.put(modules.get(rowIndex), (Boolean) aValue);
}
// Check if there are any TableReportModules enabled
boolean moduleEnabled = false;
boolean moreConfig = false;
for (Entry<ReportModule, Boolean> module : moduleStates.entrySet()) {
if (module.getValue()) {
if (module.getKey() instanceof TableReportModule
|| module.getKey() instanceof FileReportModule) {
moreConfig = true;
}
moduleEnabled = true;
}
}
if(moreConfig) {
wizPanel.setNext(true);
wizPanel.setFinish(false);
} else if (moduleEnabled) {
wizPanel.setFinish(true);
wizPanel.setNext(false);
} else {
wizPanel.setFinish(false);
wizPanel.setNext(false);
}
}
@Override
public Class<?> getColumnClass(int c) {
return getValueAt(0, c).getClass();
}
wizPanel.setNext(!generalModuleSelected);
wizPanel.setFinish(generalModuleSelected);
}
private class ModuleSelectionListener implements ListSelectionListener {
private class ModuleCellRenderer extends JRadioButton implements ListCellRenderer<ReportModule> {
@Override
public void valueChanged(ListSelectionEvent e) {
configurationPanel.removeAll();
int rowIndex = modulesTable.getSelectedRow();
JPanel panel = new DefaultReportConfigurationPanel();
ReportModule module = modules.get(rowIndex);
if (module instanceof GeneralReportModule) {
JPanel generalPanel = ((GeneralReportModule) module).getConfigurationPanel();
panel = (generalPanel == null) ? panel : generalPanel;
}
descriptionTextPane.setText(module.getDescription());
configurationPanel.add(panel, BorderLayout.CENTER);
configurationPanel.revalidate();
configurationPanel.repaint();
public Component getListCellRendererComponent(JList list, ReportModule value, int index, boolean isSelected, boolean cellHasFocus) {
this.setText(value.getName());
this.setEnabled(true);
this.setSelected(isSelected);
return this;
}
}
}

View File

@ -70,7 +70,7 @@ public final class ReportWizardAction extends CallableSystemAction implements P
if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) {
ReportGenerator generator = new ReportGenerator((Map<TableReportModule, Boolean>)wiz.getProperty("tableModuleStates"),
(Map<GeneralReportModule, Boolean>)wiz.getProperty("generalModuleStates"),
(Map<FileReportModule, Boolean>)wiz.getProperty("fileListModuleStates"));
(Map<FileReportModule, Boolean>)wiz.getProperty("fileModuleStates"));
generator.generateArtifactTableReports((Map<ARTIFACT_TYPE, Boolean>)wiz.getProperty("artifactStates"), (Map<String, Boolean>)wiz.getProperty("tagStates"));
generator.generateFileListReports((Map<FileReportDataTypes, Boolean>)wiz.getProperty("fileReportOptions"));
generator.generateGeneralReports();

View File

@ -86,19 +86,19 @@ public final class ReportWizardIterator implements WizardDescriptor.Iterator<Wiz
/**
* Change which panels will be shown based on the selection of reporting modules.
* @param tableConfig true if a TableReportModule was selected
* @param fileConfig true if a FileReportModule was selected
* @param moreConfig true if a GeneralReportModule was selected
* @param tableConfig true if a TReportModule was selected
*/
private void enableConfigPanels(boolean tableConfig, boolean fileConfig) {
if (tableConfig && fileConfig) {
panels = Arrays.asList(allConfigPanels);
} else if (tableConfig) {
// Only TableReport Modules need configuration
private void enableConfigPanels(boolean generalModule, boolean tableModule) {
if (generalModule) {
// General Module selected, no additional panels
} else if (tableModule) {
// Table Module selected, need Artifact Configuration Panel
// (ReportWizardPanel2)
panels = Arrays.asList(tableConfigPanels);
} else {
// Only FileReport Modules need configuration.
// If no modules need configuration, finish button will be pressed
// and we won't get to this function.
// File Module selected, need File Report Configuration Panel
// (ReportWizardFileOptionsPanel)
panels = Arrays.asList(fileConfigPanels);
}
}
@ -131,11 +131,11 @@ public final class ReportWizardIterator implements WizardDescriptor.Iterator<Wiz
if(index == 0) {
// Update path through configuration panels
boolean tableConfig, fileConfig;
boolean generalModule, tableModule;
// These preferences are set in ReportWizardPanel1.storeSettings()
tableConfig = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("tableConfig", true);
fileConfig = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("fileConfig", true);
enableConfigPanels(tableConfig, fileConfig);
generalModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("generalModule", true);
tableModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("tableModule", true);
enableConfigPanels(generalModule, tableModule);
}
index++;

View File

@ -107,16 +107,16 @@ public class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<Wiza
@Override
public void storeSettings(WizardDescriptor wiz) {
Map<TableReportModule, Boolean> tables = getComponent().getTableModuleStates();
Map<FileReportModule, Boolean> files = getComponent().getFileListModuleStates();
Map<GeneralReportModule, Boolean> generals = getComponent().getGeneralModuleStates();
wiz.putProperty("tableModuleStates", tables);
wiz.putProperty("generalModuleStates", getComponent().getGeneralModuleStates());
wiz.putProperty("fileListModuleStates", files);
wiz.putProperty("generalModuleStates", generals);
wiz.putProperty("fileListModuleStates", getComponent().getFileModuleStates());
// Store preferences that WizardIterator will use to determine what
// panels need to be shown
Preferences prefs = NbPreferences.forModule(ReportWizardPanel1.class);
prefs.putBoolean("tableConfig", any(tables.values()));
prefs.putBoolean("fileConfig", any(files.values()));
prefs.putBoolean("tableModule", any(tables.values()));
prefs.putBoolean("generalModule", any(generals.values()));
}
/**

View File

@ -80,15 +80,8 @@ public class ReportWizardPanel2 implements WizardDescriptor.Panel<WizardDescript
}
public void setFinish(boolean enabled) {
// If FileReportModules need to be configured, disable the Finish button
// and enable the next button.
if (NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("fileConfig", false)) {
finishButton.setEnabled(false);
nextButton.setEnabled(enabled);
} else {
nextButton.setEnabled(false);
finishButton.setEnabled(enabled);
}
nextButton.setEnabled(false);
finishButton.setEnabled(enabled);
}
@Override