source: josm/trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java @ 14027

Last change on this file since 14027 was 14027, checked in by michael2402, 5 weeks ago

See #16388: New mechanism for plugins to register relation editor actions.

File size: 1.7 KB
Line 
1package org.openstreetmap.josm.gui.dialogs.relation.actions;
2
3import javax.swing.Action;
4
5import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor;
6import org.openstreetmap.josm.gui.dialogs.relation.MemberTable;
7import org.openstreetmap.josm.gui.dialogs.relation.MemberTableModel;
8import org.openstreetmap.josm.gui.dialogs.relation.SelectionTable;
9import org.openstreetmap.josm.gui.dialogs.relation.SelectionTableModel;
10import org.openstreetmap.josm.gui.tagging.TagEditorModel;
11import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField;
12
13/**
14 * This interface provides access to the relation editor for actions.
15 * <p>
16 *
17 * @author Michael Zangl
18 * @since 14027
19 */
20public interface IRelationEditorActionAccess {
21
22        /**
23         * Adds a keyboard action to the member table.
24         * @param actionMapKey The key to use
25         * @param action The action to map for that key.
26         */
27        default void addMemberTableAction(String actionMapKey, Action action) {
28                getMemberTable().getActionMap().put(actionMapKey, action);
29        }
30
31        /**
32         * Get the member table that is used by the dialog.
33         * @return The member table
34         */
35        MemberTable getMemberTable();
36       
37        /**
38         * Get the model the member table is using.
39         * @return That model
40         */
41        MemberTableModel getMemberTableModel();
42       
43        /**
44         * Get the table that displays the current user selection
45         * @return That table
46         */
47        SelectionTable getSelectionTable();
48       
49        /**
50         * Get the model that the selection table is based on.
51         * @return The model
52         */
53    SelectionTableModel getSelectionTableModel();
54   
55    IRelationEditor getEditor();
56    TagEditorModel getTagModel();
57   
58    /**
59     * Get the text field that is used to edit the role.
60     * @return The role text field.
61     */
62    AutoCompletingTextField getTextFieldRole();
63}
Note: See TracBrowser for help on using the repository browser.