cvt - removed code to disable device checkbox

This commit is contained in:
Kelly Kelly 2019-07-08 15:36:12 -04:00
parent 13daed17c7
commit aa57fe1050
3 changed files with 4 additions and 25 deletions

View File

@ -55,10 +55,10 @@ final class AccountDeviceInstanceNodeFactory extends ChildFactory<AccountDeviceI
commsManager.getAccountDeviceInstancesWithRelationships(commsFilter); commsManager.getAccountDeviceInstancesWithRelationships(commsFilter);
for (AccountDeviceInstance accountDeviceInstance : accountDeviceInstancesWithRelationships) { for (AccountDeviceInstance accountDeviceInstance : accountDeviceInstancesWithRelationships) {
//Filter out device accounts, in the table. //Filter out device accounts, in the table.
if (Account.Type.DEVICE.equals(accountDeviceInstance.getAccount().getAccountType()) ==false) { // if (Account.Type.DEVICE.equals(accountDeviceInstance.getAccount().getAccountType()) ==false) {
long communicationsCount = commsManager.getRelationshipSourcesCount(accountDeviceInstance, commsFilter); long communicationsCount = commsManager.getRelationshipSourcesCount(accountDeviceInstance, commsFilter);
accountDeviceInstanceKeys.add(new AccountDeviceInstanceKey(accountDeviceInstance, commsFilter, communicationsCount)); accountDeviceInstanceKeys.add(new AccountDeviceInstanceKey(accountDeviceInstance, commsFilter, communicationsCount));
} // }
} }
} catch (TskCoreException tskCoreException) { } catch (TskCoreException tskCoreException) {
logger.log(Level.SEVERE, "Error getting filtered account device instances", tskCoreException); logger.log(Level.SEVERE, "Error getting filtered account device instances", tskCoreException);

View File

@ -68,7 +68,6 @@ public final class CVTTopComponent extends TopComponent {
Lookup lookup = ((Lookup.Provider)selectedComponent).getLookup(); Lookup lookup = ((Lookup.Provider)selectedComponent).getLookup();
proxyLookup.setNewLookups(lookup); proxyLookup.setNewLookups(lookup);
} }
filtersPane.setDeviceAccountTypeEnabled(browseVisualizeTabPane.getSelectedIndex() != 0);
}); });

View File

@ -322,11 +322,6 @@ final public class FiltersPanel extends JPanel {
panel.setSelected(initalState); panel.setSelected(initalState);
panel.addItemListener(validationListener); panel.addItemListener(validationListener);
if (type.equals(Account.Type.DEVICE)) {
//Deveice type filter is enabled based on whether we are in table or graph view.
panel.setEnabled(deviceAccountTypeEnabled);
}
return panel; return panel;
} }
@ -913,21 +908,6 @@ final public class FiltersPanel extends JPanel {
return new DateControlState (endDatePicker.getDate(), endCheckBox.isSelected()); return new DateControlState (endDatePicker.getDate(), endCheckBox.isSelected());
} }
/**
* Enable or disable the device account type filter. The filter should be
* disabled for the browse/table mode and enabled for the visualization.
*
* @param enable True to enable the device account type filter, False to
* disable it.
*/
void setDeviceAccountTypeEnabled(boolean enable) {
deviceAccountTypeEnabled = enable;
JCheckBox deviceCheckbox = accountTypeMap.get(Account.Type.DEVICE);
if (deviceCheckbox != null) {
deviceCheckbox.setEnabled(deviceAccountTypeEnabled);
}
}
/** /**
* Set the selection state of all the account type check boxes * Set the selection state of all the account type check boxes
* *