public class SearchAction extends JosmAction implements ParameterizedAction
Modifier and Type | Class and Description |
---|---|
private static class |
SearchAction.DescriptionTextBuilder |
private static class |
SearchAction.SearchKeywordRow |
static class |
SearchAction.SearchMode |
static class |
SearchAction.SearchSetting |
(package private) static class |
SearchAction.SearchTask |
JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SEARCH_HISTORY_SIZE |
private static SearchAction.SearchSetting |
lastSearch |
static int |
MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY
Maximum number of characters before the search expression is shortened for display purposes.
|
private static String |
SEARCH_EXPRESSION |
private static LinkedList<SearchAction.SearchSetting> |
searchHistory |
sc
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
SearchAction()
Constructs a new
SearchAction . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
actionPerformed(ActionEvent e,
Map<String,Object> parameters) |
private static void |
buildHints(JPanel right,
HistoryComboBox hcbSearchString) |
static String |
escapeStringForSearch(String s) |
List<ActionParameter<?>> |
getActionParameters() |
static List<String> |
getSearchExpressionHistory() |
static Collection<SearchAction.SearchSetting> |
getSearchHistory() |
static void |
saveToHistory(SearchAction.SearchSetting s) |
static void |
search()
Launches the dialog for specifying search criteria and runs a search
|
(package private) static void |
search(SearchAction.SearchSetting s) |
static void |
search(String search,
SearchAction.SearchMode mode)
Performs the search specified by the search string
search and the search mode mode . |
static void |
searchWithHistory(SearchAction.SearchSetting s)
Adds the search specified by the settings in
s to the
search history and performs the search. |
static void |
searchWithoutHistory(SearchAction.SearchSetting s)
Performs the search specified by the settings in
s without saving it to search history. |
static SearchAction.SearchSetting |
showSearchDialog(SearchAction.SearchSetting initialValues) |
protected void |
updateEnabledState()
Refreshes the enabled state
|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public static final int DEFAULT_SEARCH_HISTORY_SIZE
public static final int MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY
private static final String SEARCH_EXPRESSION
private static final LinkedList<SearchAction.SearchSetting> searchHistory
private static volatile SearchAction.SearchSetting lastSearch
public SearchAction()
SearchAction
.public static Collection<SearchAction.SearchSetting> getSearchHistory()
public static void saveToHistory(SearchAction.SearchSetting s)
public static List<String> getSearchExpressionHistory()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void actionPerformed(ActionEvent e, Map<String,Object> parameters)
actionPerformed
in interface ParameterizedAction
public static SearchAction.SearchSetting showSearchDialog(SearchAction.SearchSetting initialValues)
private static void buildHints(JPanel right, HistoryComboBox hcbSearchString)
public static void search()
public static void searchWithHistory(SearchAction.SearchSetting s)
s
to the
search history and performs the search.s
- search settingspublic static void searchWithoutHistory(SearchAction.SearchSetting s)
s
without saving it to search history.s
- search settingspublic static void search(String search, SearchAction.SearchMode mode)
search
and the search mode mode
.search
- the search string to usemode
- the search mode to usestatic void search(SearchAction.SearchSetting s)
protected void updateEnabledState()
updateEnabledState
in class JosmAction
JosmAction.updateEnabledState(Collection)
,
JosmAction.initEnabledState()
public List<ActionParameter<?>> getActionParameters()
getActionParameters
in interface ParameterizedAction
public static String escapeStringForSearch(String s)