Changeset 4668 in osm for applications


Ignore:
Timestamp:
2007-09-24T00:31:49+02:00 (17 years ago)
Author:
frederik
Message:

option to highlight selected member

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/core_0.5/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java

    r4464 r4668  
    1313import java.beans.PropertyChangeEvent;
    1414import java.beans.PropertyChangeListener;
     15import java.util.Collections;
    1516import java.util.Map.Entry;
    1617
     
    4344 * In the basic form, it provides two tables, one with the relation tags
    4445 * and one with the relation members. (Relation tags can be edited through
    45  * the normal properties dialog as well, if you manage to get an relation
     46 * the normal properties dialog as well, if you manage to get a relation
    4647 * selected!)
    4748 *
     
    208209                JPanel buttonPanel = new JPanel(new GridLayout(1,3));
    209210               
    210                 buttonPanel.add(createButton(marktr("Add Selected"),tr("Add all currently selected objects as members"), KeyEvent.VK_S, new ActionListener() {
     211                buttonPanel.add(createButton(marktr("Add Selected"),tr("Add all currently selected objects as members"), KeyEvent.VK_A, new ActionListener() {
    211212                        public void actionPerformed(ActionEvent e) {
    212213                                addSelected();
     
    214215                }));
    215216
    216                 buttonPanel.add(createButton(marktr("Delete"),tr("Remove the selected member from this relation"), KeyEvent.VK_D, new ActionListener() {
     217                buttonPanel.add(createButton(marktr("Delete"),tr("Remove the member in the current table row from this relation"), KeyEvent.VK_D, new ActionListener() {
    217218                        public void actionPerformed(ActionEvent e) {
    218219                                int row = memberTable.getSelectedRow();
     
    222223                                clone.members.remove(mem);
    223224                                refreshTables();
     225                        }
     226                }));
     227
     228                buttonPanel.add(createButton(marktr("Select"),tr("Highlight the member from the current table row as JOSM's selection"), KeyEvent.VK_S, new ActionListener() {
     229                        public void actionPerformed(ActionEvent e) {
     230                                int row = memberTable.getSelectedRow();
     231                                OsmPrimitive p = (OsmPrimitive) memberTable.getValueAt(row, 1);
     232                                Main.ds.setSelected(Collections.singleton(p));
    224233                        }
    225234                }));
Note: See TracChangeset for help on using the changeset viewer.