Deregister unneeded keyword search menu actions

Disable List search button before case loaded
This commit is contained in:
adam-m 2012-01-20 14:29:43 -05:00
parent 50bfe71efd
commit 38b13632ba
5 changed files with 21 additions and 21 deletions

View File

@ -28,8 +28,6 @@ import javax.swing.table.TableColumn;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.windows.TopComponent; import org.openide.windows.TopComponent;
import org.netbeans.api.settings.ConvertAsProperties; import org.netbeans.api.settings.ConvertAsProperties;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
/** /**
* Top component with saved searches viewer * Top component with saved searches viewer
@ -40,10 +38,10 @@ autostore = false)
//iconBase="SET/PATH/TO/ICON/HERE", //iconBase="SET/PATH/TO/ICON/HERE",
persistenceType = TopComponent.PERSISTENCE_NEVER) persistenceType = TopComponent.PERSISTENCE_NEVER)
@TopComponent.Registration(mode = "explorer", openAtStartup = false) @TopComponent.Registration(mode = "explorer", openAtStartup = false)
@ActionID(category = "Window", id = "org.sleuthkit.autopsy.keywordsearch.KeywordSearchHistoryTopComponent") //@ActionID(category = "Window", id = "org.sleuthkit.autopsy.keywordsearch.KeywordSearchHistoryTopComponent")
@ActionReference(path = "Menu/Window" /*, position = 333 */) //@ActionReference(path = "Menu/Window" /*, position = 333 */)
@TopComponent.OpenActionRegistration(displayName = "#CTL_KeywordSearchHistoryAction", //@TopComponent.OpenActionRegistration(displayName = "#CTL_KeywordSearchHistoryAction",
preferredID = "KeywordSearchHistoryTopComponent") //preferredID = "KeywordSearchHistoryTopComponent")
public final class KeywordSearchHistoryTopComponent extends TopComponent implements KeywordSearchTopComponentInterface { public final class KeywordSearchHistoryTopComponent extends TopComponent implements KeywordSearchTopComponentInterface {
private Logger logger = Logger.getLogger(KeywordSearchHistoryTopComponent.class.getName()); private Logger logger = Logger.getLogger(KeywordSearchHistoryTopComponent.class.getName());

View File

@ -21,12 +21,12 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="mainScrollPane" alignment="0" pref="386" max="32767" attributes="0"/> <Component id="mainScrollPane" alignment="0" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="mainScrollPane" alignment="0" pref="568" max="32767" attributes="0"/> <Component id="mainScrollPane" alignment="0" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
@ -65,7 +65,7 @@
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/> <EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
<Component id="curListNameLabel" min="-2" max="-2" attributes="0"/> <Component id="curListNameLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="curListValLabel" pref="242" max="32767" attributes="0"/> <Component id="curListValLabel" pref="233" max="32767" attributes="0"/>
</Group> </Group>
<Component id="tablePanel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="tablePanel" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
@ -73,7 +73,7 @@
<Component id="filesIndexedNameLabel" min="-2" max="-2" attributes="0"/> <Component id="filesIndexedNameLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="filesIndexedValLabel" min="-2" pref="204" max="-2" attributes="0"/> <Component id="filesIndexedValLabel" min="-2" pref="204" max="-2" attributes="0"/>
<EmptySpace pref="38" max="-2" attributes="0"/> <EmptySpace pref="29" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace min="-2" pref="54" max="-2" attributes="0"/> <EmptySpace min="-2" pref="54" max="-2" attributes="0"/>
@ -102,7 +102,7 @@
<Component id="filesIndexedNameLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="filesIndexedNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="filesIndexedValLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="filesIndexedValLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace pref="60" max="32767" attributes="0"/> <EmptySpace pref="28" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>

View File

@ -27,9 +27,7 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.logging.Level; import java.util.logging.Level;
@ -50,12 +48,10 @@ import javax.swing.table.TableColumn;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.windows.TopComponent; import org.openide.windows.TopComponent;
import org.netbeans.api.settings.ConvertAsProperties; import org.netbeans.api.settings.ConvertAsProperties;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.sleuthkit.autopsy.keywordsearch.KeywordSearchTabsTopComponent.TABS; import org.sleuthkit.autopsy.keywordsearch.KeywordSearchTabsTopComponent.TABS;
/** /**
* Top component which displays something. * Top component for Keyword List search
*/ */
@ConvertAsProperties(dtd = "-//org.sleuthkit.autopsy.keywordsearch//KeywordSearchList//EN", @ConvertAsProperties(dtd = "-//org.sleuthkit.autopsy.keywordsearch//KeywordSearchList//EN",
autostore = false) autostore = false)
@ -63,10 +59,10 @@ autostore = false)
//iconBase="SET/PATH/TO/ICON/HERE", //iconBase="SET/PATH/TO/ICON/HERE",
persistenceType = TopComponent.PERSISTENCE_NEVER) persistenceType = TopComponent.PERSISTENCE_NEVER)
@TopComponent.Registration(mode = "explorer", openAtStartup = false) @TopComponent.Registration(mode = "explorer", openAtStartup = false)
@ActionID(category = "Window", id = "org.sleuthkit.autopsy.keywordsearch.KeywordSearchListTopComponent") //@ActionID(category = "Window", id = "org.sleuthkit.autopsy.keywordsearch.KeywordSearchListTopComponent")
@ActionReference(path = "Menu/Window" /*, position = 333 */) //@ActionReference(path = "Menu/Window" /*, position = 333 */)
@TopComponent.OpenActionRegistration(displayName = "#CTL_KeywordSearchListAction", //@TopComponent.OpenActionRegistration(displayName = "#CTL_KeywordSearchListAction",
preferredID = "KeywordSearchListTopComponent") //preferredID = "KeywordSearchListTopComponent")
public final class KeywordSearchListTopComponent extends TopComponent implements KeywordSearchTopComponentInterface { public final class KeywordSearchListTopComponent extends TopComponent implements KeywordSearchTopComponentInterface {
private static Logger logger = Logger.getLogger(KeywordSearchListTopComponent.class.getName()); private static Logger logger = Logger.getLogger(KeywordSearchListTopComponent.class.getName());
@ -93,6 +89,8 @@ public final class KeywordSearchListTopComponent extends TopComponent implements
searchButton.setToolTipText("Execute the keyword list search using the current list"); searchButton.setToolTipText("Execute the keyword list search using the current list");
deleteWordButton.setToolTipText("Remove selected keyword(s) from the list"); deleteWordButton.setToolTipText("Remove selected keyword(s) from the list");
deleteAllWordsButton.setToolTipText("Remove all keywords from the list (clear it)"); deleteAllWordsButton.setToolTipText("Remove all keywords from the list (clear it)");
searchButton.setEnabled(false);
//keywordTable.setAutoscrolls(true); //keywordTable.setAutoscrolls(true);
//keywordTable.setTableHeader(null); //keywordTable.setTableHeader(null);

View File

@ -124,7 +124,7 @@
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="chRegex" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="chRegex" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="queryTextField" alignment="0" pref="261" max="32767" attributes="0"/> <Component id="queryTextField" alignment="0" pref="242" max="32767" attributes="0"/>
<Component id="searchButton" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="searchButton" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>

View File

@ -23,6 +23,10 @@ import java.util.List;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.openide.windows.TopComponent; import org.openide.windows.TopComponent;
/**
* Top component for Simple keyword search
*
*/
public class KeywordSearchSimpleTopComponent extends TopComponent implements KeywordSearchTopComponentInterface { public class KeywordSearchSimpleTopComponent extends TopComponent implements KeywordSearchTopComponentInterface {
private Logger logger = Logger.getLogger(KeywordSearchSimpleTopComponent.class.getName()); private Logger logger = Logger.getLogger(KeywordSearchSimpleTopComponent.class.getName());