mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 08:56:15 +00:00
6397 Basic creation functionality
This commit is contained in:
parent
8158088c70
commit
b851f7a314
@ -100,7 +100,7 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.PersonaAccount>"/>
|
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount>"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
|
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.centralrepository.persona;
|
|||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
@ -29,8 +30,8 @@ import javax.swing.JOptionPane;
|
|||||||
import javax.swing.ListCellRenderer;
|
import javax.swing.ListCellRenderer;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
|
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount;
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
|
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.PersonaAccount;
|
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,7 +44,7 @@ public class AddAccountDialog extends JDialog {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final TypeChoiceRenderer ACC_CHOICE_RENDERER = new TypeChoiceRenderer();
|
private final AccountChoiceRenderer ACC_CHOICE_RENDERER = new AccountChoiceRenderer();
|
||||||
private final PersonaDetailsPanel pdp;
|
private final PersonaDetailsPanel pdp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,17 +63,17 @@ public class AddAccountDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class handles displaying and rendering drop down menu for account type choices
|
* This class handles displaying and rendering drop down menu for account choices
|
||||||
*/
|
*/
|
||||||
private class TypeChoiceRenderer extends JLabel implements ListCellRenderer<PersonaAccount>, Serializable {
|
private class AccountChoiceRenderer extends JLabel implements ListCellRenderer<CentralRepoAccount>, Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getListCellRendererComponent(
|
public Component getListCellRendererComponent(
|
||||||
JList<? extends PersonaAccount> list, PersonaAccount value,
|
JList<? extends CentralRepoAccount> list, CentralRepoAccount value,
|
||||||
int index, boolean isSelected, boolean cellHasFocus) {
|
int index, boolean isSelected, boolean cellHasFocus) {
|
||||||
setText(value.getAccount().getTypeSpecificId());
|
setText(value.getIdentifier());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,20 +82,19 @@ public class AddAccountDialog extends JDialog {
|
|||||||
"AddAccountDialog_get_types_exception_Title=Central Repository failure",
|
"AddAccountDialog_get_types_exception_Title=Central Repository failure",
|
||||||
"AddAccountDialog_get_types_exception_msg=Failed to access central repository",
|
"AddAccountDialog_get_types_exception_msg=Failed to access central repository",
|
||||||
})
|
})
|
||||||
private PersonaAccount[] getAllAccounts() {
|
private CentralRepoAccount[] getAllAccounts() {
|
||||||
PersonaAccount[] ret = new PersonaAccount[0];
|
ArrayList<CentralRepoAccount> allAccounts;
|
||||||
try {
|
try {
|
||||||
// todo change this to proper getAllAccounts function when that exists
|
allAccounts = new ArrayList<>(CentralRepoAccount.getAllAccounts());
|
||||||
// todo don't show accounts that are already assocated with this persona
|
|
||||||
ret = PersonaAccount.getPersonaAccountsForAccountIdentifier("").toArray(new PersonaAccount[0]);
|
|
||||||
} catch (CentralRepoException e) {
|
} catch (CentralRepoException e) {
|
||||||
logger.log(Level.SEVERE, "Failed to access central repository", e);
|
logger.log(Level.SEVERE, "Failed to access central repository", e);
|
||||||
JOptionPane.showMessageDialog(this,
|
JOptionPane.showMessageDialog(this,
|
||||||
Bundle.AddAccountDialog_get_types_exception_Title(),
|
Bundle.AddAccountDialog_get_types_exception_Title(),
|
||||||
Bundle.AddAccountDialog_get_types_exception_msg(),
|
Bundle.AddAccountDialog_get_types_exception_msg(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
return new CentralRepoAccount[0];
|
||||||
}
|
}
|
||||||
return ret;
|
return allAccounts.toArray(new CentralRepoAccount[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -198,7 +198,7 @@ public class AddAccountDialog extends JDialog {
|
|||||||
"AddAccountDialog_dup_Title=Account add failure",
|
"AddAccountDialog_dup_Title=Account add failure",
|
||||||
"AddAccountDialog_dup_msg=This account is already added to the persona",})
|
"AddAccountDialog_dup_msg=This account is already added to the persona",})
|
||||||
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
||||||
if (pdp.addAccount(((PersonaAccount) accountsComboBox.getSelectedItem()).getAccount())) {
|
if (pdp.addAccount((CentralRepoAccount) accountsComboBox.getSelectedItem())) {
|
||||||
dispose();
|
dispose();
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(this,
|
JOptionPane.showMessageDialog(this,
|
||||||
@ -213,7 +213,7 @@ public class AddAccountDialog extends JDialog {
|
|||||||
}//GEN-LAST:event_cancelBtnActionPerformed
|
}//GEN-LAST:event_cancelBtnActionPerformed
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JComboBox<org.sleuthkit.autopsy.centralrepository.datamodel.PersonaAccount> accountsComboBox;
|
private javax.swing.JComboBox<org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount> accountsComboBox;
|
||||||
private javax.swing.JLabel accountsLbl;
|
private javax.swing.JLabel accountsLbl;
|
||||||
private javax.swing.JButton cancelBtn;
|
private javax.swing.JButton cancelBtn;
|
||||||
private javax.swing.JButton okBtn;
|
private javax.swing.JButton okBtn;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.sleuthkit.autopsy.centralrepository.persona;
|
package org.sleuthkit.autopsy.centralrepository.persona;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.util.logging.Level;
|
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
@ -32,17 +31,17 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||||
public class PersonaDetailsDialog extends JDialog {
|
public class PersonaDetailsDialog extends JDialog {
|
||||||
private static final Logger logger = Logger.getLogger(PersonaDetailsDialog.class.getName());
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final Component parent;
|
private final Component parent;
|
||||||
private final PersonaDetailsMode mode;
|
private final PersonaDetailsMode mode;
|
||||||
|
private final PersonaDetailsDialogCallback callback;
|
||||||
|
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"PersonaDetailsDialogCreateTitle=Create Persona",
|
"PersonaDetailsDialogCreateTitle=Create Persona",
|
||||||
"PersonaDetailsDialogEditTitle=Edit Persona",})
|
"PersonaDetailsDialogEditTitle=Edit Persona",})
|
||||||
PersonaDetailsDialog(Component parent, PersonaDetailsMode mode, Persona persona) {
|
PersonaDetailsDialog(Component parent, PersonaDetailsMode mode, Persona persona, PersonaDetailsDialogCallback callback) {
|
||||||
super((JFrame) WindowManager.getDefault().getMainWindow(),
|
super((JFrame) WindowManager.getDefault().getMainWindow(),
|
||||||
mode == PersonaDetailsMode.CREATE ?
|
mode == PersonaDetailsMode.CREATE ?
|
||||||
Bundle.PersonaDetailsDialogCreateTitle() :
|
Bundle.PersonaDetailsDialogCreateTitle() :
|
||||||
@ -50,6 +49,7 @@ public class PersonaDetailsDialog extends JDialog {
|
|||||||
false);
|
false);
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
this.callback = callback;
|
||||||
|
|
||||||
initComponents();
|
initComponents();
|
||||||
|
|
||||||
@ -130,16 +130,7 @@ public class PersonaDetailsDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
||||||
switch (mode) {
|
callback.callback(pdp.okHandler());
|
||||||
case CREATE:
|
|
||||||
// todo implement
|
|
||||||
break;
|
|
||||||
case EDIT:
|
|
||||||
// todo implement
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
logger.log(Level.SEVERE, "Unsupported mode: {0}", mode);
|
|
||||||
}
|
|
||||||
dispose();
|
dispose();
|
||||||
}//GEN-LAST:event_okBtnActionPerformed
|
}//GEN-LAST:event_okBtnActionPerformed
|
||||||
|
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Autopsy Forensic Browser
|
||||||
|
*
|
||||||
|
* Copyright 2020 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.sleuthkit.autopsy.centralrepository.persona;
|
||||||
|
|
||||||
|
import org.sleuthkit.autopsy.centralrepository.datamodel.Persona;
|
||||||
|
|
||||||
|
public interface PersonaDetailsDialogCallback {
|
||||||
|
void callback(Persona persona);
|
||||||
|
}
|
@ -30,6 +30,7 @@ import javax.swing.JOptionPane;
|
|||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
|
import org.openide.util.Exceptions;
|
||||||
import org.openide.windows.TopComponent;
|
import org.openide.windows.TopComponent;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.openide.windows.RetainLocation;
|
import org.openide.windows.RetainLocation;
|
||||||
@ -145,7 +146,7 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean addAccount(CentralRepoAccount account) {
|
boolean addAccount(CentralRepoAccount account) {
|
||||||
if (currentAccounts.contains(account)) {
|
if (currentAccounts.stream().anyMatch((acc) -> (acc.getId() == account.getId()))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
currentAccounts.add(account);
|
currentAccounts.add(account);
|
||||||
@ -153,6 +154,57 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Collection<CentralRepoAccount> getCurrentAccounts() {
|
||||||
|
return currentAccounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Messages({
|
||||||
|
"PersonaDetailsPanel_NotEnoughAccounts_msg=Two or more accounts are necessary to create a persona",
|
||||||
|
"PersonaDetailsPanel_NotEnoughAccounts_Title=Not enough accounts",
|
||||||
|
"PersonaDetailsPanel_CentralRepoErr_msg=Failure to write to Central Repository",
|
||||||
|
"PersonaDetailsPanel_CentralRepoErr_Title=Central Repository failure",})
|
||||||
|
Persona okHandler() {
|
||||||
|
Persona ret = null;
|
||||||
|
switch (mode) {
|
||||||
|
case CREATE:
|
||||||
|
if (currentAccounts.size() < 2) {
|
||||||
|
JOptionPane.showMessageDialog(this,
|
||||||
|
Bundle.PersonaDetailsPanel_NotEnoughAccounts_msg(),
|
||||||
|
Bundle.PersonaDetailsPanel_NotEnoughAccounts_Title(),
|
||||||
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
ret = Persona.createPersonaForAccount(currentName,
|
||||||
|
"", Persona.PersonaStatus.ACTIVE, currentAccounts.get(0),
|
||||||
|
"", Persona.Confidence.UNKNOWN);
|
||||||
|
for (int i = 1; i < currentAccounts.size(); i++) {
|
||||||
|
ret.addAccountToPersona(currentAccounts.get(i), "", Persona.Confidence.UNKNOWN);
|
||||||
|
}
|
||||||
|
for (PMetadata md : metadataToAdd) {
|
||||||
|
ret.addMetadata(md.name, md.value, md.justification, md.confidence);
|
||||||
|
}
|
||||||
|
for (PAlias pa : aliasesToAdd) {
|
||||||
|
ret.addAlias(pa.alias, pa.justification, pa.confidence);
|
||||||
|
}
|
||||||
|
} catch (CentralRepoException e) {
|
||||||
|
logger.log(Level.SEVERE, "Failed to access central repository", e);
|
||||||
|
JOptionPane.showMessageDialog(this,
|
||||||
|
Bundle.PersonaDetailsPanel_CentralRepoErr_msg(),
|
||||||
|
Bundle.PersonaDetailsPanel_CentralRepoErr_Title(),
|
||||||
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EDIT:
|
||||||
|
// todo implement
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logger.log(Level.SEVERE, "Unsupported mode: {0}", mode);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A data bucket class for yet-to-be-created PersonaMetadata
|
* A data bucket class for yet-to-be-created PersonaMetadata
|
||||||
*/
|
*/
|
||||||
@ -563,13 +615,13 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
|
|||||||
for (CentralRepoAccount account : currentAccounts) {
|
for (CentralRepoAccount account : currentAccounts) {
|
||||||
rows[i] = new Object[]{
|
rows[i] = new Object[]{
|
||||||
account.getAccountType().getAcctType().getDisplayName(),
|
account.getAccountType().getAcctType().getDisplayName(),
|
||||||
account.getTypeSpecificId()
|
account.getIdentifier()
|
||||||
};
|
};
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
accountsModel = new PersonaDetailsTableModel(
|
accountsModel = new PersonaDetailsTableModel(
|
||||||
rows,
|
rows,
|
||||||
new String[]{"Type", "ID"}
|
new String[]{"Type", "Identifier"}
|
||||||
);
|
);
|
||||||
accountsTable.setModel(accountsModel);
|
accountsTable.setModel(accountsModel);
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="jSplitPane1" alignment="0" pref="650" max="32767" attributes="0"/>
|
<Component id="jSplitPane1" alignment="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -49,6 +49,8 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
public final class PersonaManagerTopComponent extends TopComponent {
|
public final class PersonaManagerTopComponent extends TopComponent {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(PersonaManagerTopComponent.class.getName());
|
private static final Logger logger = Logger.getLogger(PersonaManagerTopComponent.class.getName());
|
||||||
|
|
||||||
|
private PersonaDetailsDialog currentDialog;
|
||||||
|
|
||||||
private List<Persona> currentResults = null;
|
private List<Persona> currentResults = null;
|
||||||
private Persona selectedPersona = null;
|
private Persona selectedPersona = null;
|
||||||
@ -71,27 +73,53 @@ public final class PersonaManagerTopComponent extends TopComponent {
|
|||||||
editBtn.addActionListener(new ActionListener() {
|
editBtn.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PersonaDetailsDialog editDialog =
|
currentDialog = new PersonaDetailsDialog(PersonaManagerTopComponent.this,
|
||||||
new PersonaDetailsDialog(PersonaManagerTopComponent.this, PersonaDetailsMode.EDIT, selectedPersona);
|
PersonaDetailsMode.EDIT, selectedPersona, new EditCallbackImpl());
|
||||||
|
editBtn.setEnabled(false);
|
||||||
|
createBtn.setEnabled(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
createBtn.addActionListener(new ActionListener() {
|
createBtn.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PersonaDetailsDialog createDialog =
|
currentDialog = new PersonaDetailsDialog(PersonaManagerTopComponent.this,
|
||||||
new PersonaDetailsDialog(PersonaManagerTopComponent.this, PersonaDetailsMode.CREATE, selectedPersona);
|
PersonaDetailsMode.CREATE, selectedPersona, new CreateCallbackImpl());
|
||||||
|
editBtn.setEnabled(false);
|
||||||
|
createBtn.setEnabled(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Results table
|
// Results table
|
||||||
resultsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
resultsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||||
resultsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
resultsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
||||||
|
@Override
|
||||||
public void valueChanged(ListSelectionEvent e) {
|
public void valueChanged(ListSelectionEvent e) {
|
||||||
handleSelectionChange(e);
|
handleSelectionChange(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CreateCallbackImpl implements PersonaDetailsDialogCallback {
|
||||||
|
@Override
|
||||||
|
public void callback(Persona persona) {
|
||||||
|
if (persona != null) {
|
||||||
|
searchField.setText("");
|
||||||
|
executeSearch();
|
||||||
|
int newPersonaRow = currentResults.size() - 1;
|
||||||
|
resultsTable.getSelectionModel().setSelectionInterval(newPersonaRow, newPersonaRow);
|
||||||
|
handleSelectionChange();
|
||||||
|
}
|
||||||
|
currentDialog = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EditCallbackImpl implements PersonaDetailsDialogCallback {
|
||||||
|
@Override
|
||||||
|
public void callback(Persona persona) {
|
||||||
|
currentDialog = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void setPersona(int index) {
|
void setPersona(int index) {
|
||||||
Persona persona = currentResults.get(index);
|
Persona persona = currentResults.get(index);
|
||||||
@ -120,6 +148,10 @@ public final class PersonaManagerTopComponent extends TopComponent {
|
|||||||
if (e.getValueIsAdjusting()) {
|
if (e.getValueIsAdjusting()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
handleSelectionChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleSelectionChange() {
|
||||||
int selectedRow = resultsTable.getSelectedRow();
|
int selectedRow = resultsTable.getSelectedRow();
|
||||||
if (selectedRow != -1) {
|
if (selectedRow != -1) {
|
||||||
setPersona(resultsTable.getSelectedRow());
|
setPersona(resultsTable.getSelectedRow());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user