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 |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SEARCH_HISTORY_SIZE |
private static SearchAction.SearchSetting |
lastSearch |
private static String |
SEARCH_EXPRESSION |
private static LinkedList<SearchAction.SearchSetting> |
searchHistory |
scchangeSupport, enabledACCELERATOR_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. |
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledStateaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic static final int DEFAULT_SEARCH_HISTORY_SIZE
private static final String SEARCH_EXPRESSION
private static final LinkedList<SearchAction.SearchSetting> searchHistory
private static 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 ActionListenerpublic void actionPerformed(ActionEvent e, Map<String,Object> parameters)
actionPerformed in interface ParameterizedActionpublic static SearchAction.SearchSetting showSearchDialog(SearchAction.SearchSetting initialValues)
private static void buildHints(JPanel right)
private static void buildHintsNew(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 - public static void searchWithoutHistory(SearchAction.SearchSetting s)
public static int getSelection(SearchAction.SearchSetting s, Collection<OsmPrimitive> sel, Predicate<OsmPrimitive> p)
public static void getSelection(SearchAction.SearchSetting s, Collection<OsmPrimitive> all, Property<OsmPrimitive,Boolean> p)
s - the search settingsall - the collection of all the primitives that should be consideredp - the property that should be set/unset if something is foundpublic static void search(String search, SearchAction.SearchMode mode)
public static void search(SearchAction.SearchSetting s)
protected void updateEnabledState()
updateEnabledState in class JosmActionJosmAction.updateEnabledState(Collection),
JosmAction.initEnabledState()public List<ActionParameter<?>> getActionParameters()
getActionParameters in interface ParameterizedActionpublic static String escapeStringForSearch(String s)