Merge branch 'master' of github.com:sleuthkit/autopsy

This commit is contained in:
Dick Fickling 2012-03-05 16:49:15 -05:00
commit c292d9f8f4
5 changed files with 23 additions and 1 deletions

View File

@ -36,4 +36,6 @@ public interface DataExplorer extends PropertyChangeListener {
*/
public TopComponent getTopComponent();
public boolean hasMenuOpenAction();
}

View File

@ -708,6 +708,13 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
return this;
}
@Override
public boolean hasMenuOpenAction() {
return false;
}
@Override
public void viewArtifact(final BlackboardArtifact art) {
BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ARTIFACT_TYPE.fromID(art.getArtifactTypeID());

View File

@ -348,4 +348,9 @@ public final class FileSearchTopComponent extends TopComponent implements DataEx
public TopComponent getTopComponent() {
return this;
}
@Override
public boolean hasMenuOpenAction() {
return true;
}
}

View File

@ -110,6 +110,11 @@ public class KeywordSearchDataExplorer implements DataExplorer {
return this.tc;
}
@Override
public boolean hasMenuOpenAction() {
return false;
}
@Override
public void propertyChange(PropertyChangeEvent evt) {
}

View File

@ -44,8 +44,11 @@ public class DataExplorerDynamicMenu extends JMenuItem implements DynamicMenuCon
int totalItem = dataExplorers.size();
JComponent[] comps = new JComponent[totalItem];
int i = 0;
for(DataExplorer dx : dataExplorers){
if (! dx.hasMenuOpenAction())
continue;
TopComponent explorerWin = dx.getTopComponent();
JMenuItem item = new JMenuItem(explorerWin.getName());
item.addActionListener(new OpenTopComponentAction(explorerWin));