public class HelpAction extends javax.swing.AbstractAction
Modifier and Type | Field and Description |
---|---|
private javax.swing.JTable |
membershipTable |
private java.util.function.IntFunction<IRelation<?>> |
memberValueSupplier |
private java.util.function.IntFunction<java.lang.String> |
tagKeySupplier |
private javax.swing.JTable |
tagTable |
private java.util.function.IntFunction<java.util.Map<java.lang.String,java.lang.Integer>> |
tagValuesSupplier |
Constructor and Description |
---|
HelpAction(javax.swing.JTable tagTable,
java.util.function.IntFunction<java.lang.String> tagKeySupplier,
java.util.function.IntFunction<java.util.Map<java.lang.String,java.lang.Integer>> tagValuesSupplier,
javax.swing.JTable membershipTable,
java.util.function.IntFunction<IRelation<?>> memberValueSupplier)
Constructs a new
HelpAction . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
static void |
displayHelp(java.util.List<java.net.URI> uris)
Display help by searching the forst valid URI in the given list.
|
static java.util.List<java.net.URI> |
getGenericURIs(java.lang.String base,
java.lang.String lang)
Returns a list of generic URIs (Map Features).
|
javax.swing.KeyStroke |
getKeyStroke()
Returns the keystroke launching this action (F1).
|
static java.util.List<java.net.URI> |
getRelationURIs(java.lang.String base,
java.lang.String lang,
IRelation<?> rel)
Returns a list of URIs for the given relation.
|
static java.util.List<java.net.URI> |
getTagURIs(java.lang.String base,
java.lang.String lang,
java.lang.String key,
java.lang.String val)
Returns a list of URIs for the given key/value.
|
private final javax.swing.JTable tagTable
private final java.util.function.IntFunction<java.lang.String> tagKeySupplier
private final java.util.function.IntFunction<java.util.Map<java.lang.String,java.lang.Integer>> tagValuesSupplier
private final javax.swing.JTable membershipTable
private final java.util.function.IntFunction<IRelation<?>> memberValueSupplier
public HelpAction(javax.swing.JTable tagTable, java.util.function.IntFunction<java.lang.String> tagKeySupplier, java.util.function.IntFunction<java.util.Map<java.lang.String,java.lang.Integer>> tagValuesSupplier, javax.swing.JTable membershipTable, java.util.function.IntFunction<IRelation<?>> memberValueSupplier)
HelpAction
.tagTable
- The tag table. Cannot be nulltagKeySupplier
- Finds the key from given row of tag table. Cannot be nulltagValuesSupplier
- Finds the values from given row of tag table (map of values and number of occurrences). Cannot be nullmembershipTable
- The membership table. Can be nullmemberValueSupplier
- Finds the parent relation from given row of membership table. Can be nullpublic javax.swing.KeyStroke getKeyStroke()
public void actionPerformed(java.awt.event.ActionEvent e)
public static java.util.List<java.net.URI> getTagURIs(java.lang.String base, java.lang.String lang, java.lang.String key, java.lang.String val) throws java.net.URISyntaxException
base
- OSM wiki base URLlang
- Language prefixkey
- Keyval
- Valuejava.net.URISyntaxException
- in case of internal errorpublic static java.util.List<java.net.URI> getRelationURIs(java.lang.String base, java.lang.String lang, IRelation<?> rel) throws java.net.URISyntaxException
base
- OSM wiki base URLlang
- Language prefixrel
- Relationjava.net.URISyntaxException
- in case of internal errorpublic static java.util.List<java.net.URI> getGenericURIs(java.lang.String base, java.lang.String lang) throws java.net.URISyntaxException
base
- OSM wiki base URLlang
- Language prefixjava.net.URISyntaxException
- in case of internal errorpublic static void displayHelp(java.util.List<java.net.URI> uris)
uris
- list of URIs to test