73 setName(Bundle.PersonasTopComponent_Name());
75 searchBtn.addActionListener(
new ActionListener() {
77 public void actionPerformed(ActionEvent e) {
82 editBtn.addActionListener(
new ActionListener() {
84 public void actionPerformed(ActionEvent e) {
90 createBtn.addActionListener(
new ActionListener() {
92 public void actionPerformed(ActionEvent e) {
98 deleteBtn.addActionListener(
new ActionListener() {
100 public void actionPerformed(ActionEvent e) {
101 NotifyDescriptor confirm =
new NotifyDescriptor.Confirmation(
102 Bundle.PersonasTopComponent_delete_confirmation_msg(),
103 Bundle.PersonasTopComponent_delete_confirmation_Title(),
104 NotifyDescriptor.YES_NO_OPTION);
105 DialogDisplayer.getDefault().notify(confirm);
106 if (confirm.getValue().equals(NotifyDescriptor.YES_OPTION)) {
114 Bundle.PersonasTopComponent_delete_exception_msg(),
115 Bundle.PersonasTopComponent_delete_exception_Title(),
116 JOptionPane.ERROR_MESSAGE);
125 resultsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
126 resultsTable.getSelectionModel().addListSelectionListener(
new ListSelectionListener() {
128 public void valueChanged(ListSelectionEvent e) {
135 public void actionPerformed(ActionEvent e) {
144 addComponentListener(
new ComponentAdapter() {
146 public void componentShown(ComponentEvent e) {
327 editBtn =
new javax.swing.JButton();
333 detailsPanel =
new org.sleuthkit.autopsy.centralrepository.persona.PersonaDetailsPanel();
337 introTextScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
339 introText.setBackground(getBackground());
354 org.openide.awt.Mnemonics.setLocalizedText(
searchNameRadio, org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.searchNameRadio.text"));
359 org.openide.awt.Mnemonics.setLocalizedText(
searchBtn, org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.searchBtn.text"));
362 resultsTable.getTableHeader().setReorderingAllowed(
false);
364 if (
resultsTable.getColumnModel().getColumnCount() > 0) {
365 resultsTable.getColumnModel().getColumn(0).setMaxWidth(25);
366 resultsTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.resultsTable.columnModel.title0"));
367 resultsTable.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.resultsTable.columnModel.title1"));
372 org.openide.awt.Mnemonics.setLocalizedText(
editBtn, org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.editBtn.text"));
375 org.openide.awt.Mnemonics.setLocalizedText(
deleteBtn, org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.deleteBtn.text"));
378 org.openide.awt.Mnemonics.setLocalizedText(
createBtn, org.openide.util.NbBundle.getMessage(
PersonasTopComponent.class,
"PersonasTopComponent.createBtn.text"));
382 public void actionPerformed(java.awt.event.ActionEvent evt) {
383 cbFilterByKeywordActionPerformed(evt);
387 javax.swing.GroupLayout searchPanelLayout =
new javax.swing.GroupLayout(searchPanel);
388 searchPanel.setLayout(searchPanelLayout);
389 searchPanelLayout.setHorizontalGroup(
390 searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
391 .addGroup(searchPanelLayout.createSequentialGroup()
393 .addGroup(searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
394 .addComponent(createButtonSeparator)
395 .addComponent(resultsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
396 .addComponent(searchField)
397 .addGroup(searchPanelLayout.createSequentialGroup()
398 .addComponent(searchNameRadio)
399 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
400 .addComponent(searchAccountRadio)
401 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
402 .addComponent(searchBtn))
403 .addGroup(searchPanelLayout.createSequentialGroup()
404 .addGroup(searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
405 .addComponent(createAccountBtn)
406 .addGroup(searchPanelLayout.createSequentialGroup()
407 .addComponent(createBtn)
408 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
409 .addComponent(editBtn)
410 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
411 .addComponent(deleteBtn))
412 .addComponent(cbFilterByKeyword))
413 .addGap(0, 50, Short.MAX_VALUE)))
416 searchPanelLayout.setVerticalGroup(
417 searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
418 .addGroup(searchPanelLayout.createSequentialGroup()
419 .addComponent(cbFilterByKeyword)
421 .addComponent(searchField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
422 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
423 .addGroup(searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
424 .addComponent(searchNameRadio)
425 .addComponent(searchAccountRadio)
426 .addComponent(searchBtn))
427 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
428 .addComponent(resultsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)
429 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
430 .addGroup(searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
431 .addComponent(editBtn)
432 .addComponent(createBtn)
433 .addComponent(deleteBtn))
434 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
435 .addComponent(createButtonSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE)
436 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
437 .addComponent(createAccountBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
441 mainSplitPane.setLeftComponent(searchPanel);
443 detailsScrollPane.setViewportView(detailsPanel);
445 mainSplitPane.setRightComponent(detailsScrollPane);
447 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
448 this.setLayout(layout);
449 layout.setHorizontalGroup(
450 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
451 .addComponent(introTextScrollPane)
452 .addComponent(mainSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE)
454 layout.setVerticalGroup(
455 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
456 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
457 .addComponent(introTextScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
458 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
459 .addComponent(mainSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 489, Short.MAX_VALUE))