Changeset 997 in josm


Ignore:
Timestamp:
2008-09-20T22:27:48+02:00 (16 years ago)
Author:
stoecker
Message:

close bug #1575

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r733 r997  
    6060        public ConflictDialog conflictDialog;
    6161        /**
     62         * The dialog that shows all relations and lets the user edit them.
     63         */
     64        public RelationListDialog relationListDialog;
     65        /**
    6266         * The panel list of all toggle dialog icons. To add new toggle dialog actions, use addToggleDialog
    6367         * instead of adding directly to this list.
     
    100104                addToggleDialog(conflictDialog = new ConflictDialog());
    101105                addToggleDialog(new CommandStackDialog(this));
    102                 addToggleDialog(new RelationListDialog());
     106                addToggleDialog(relationListDialog = new RelationListDialog());
    103107
    104108                // status line below the map
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r758 r997  
    1818import javax.swing.JScrollPane;
    1919import javax.swing.ListSelectionModel;
     20import javax.swing.event.ListSelectionListener;
    2021
    2122import org.openstreetmap.josm.Main;
     
    144145        }
    145146       
     147        /**
     148         * Returns the currently selected relation, or null.
     149         *
     150         * @return the currently selected relation, or null
     151         */
     152        public Relation getCurrentRelation() {
     153                return (Relation) displaylist.getSelectedValue();
     154        }
     155
     156        /**
     157         * Adds a selection listener to the relation list.
     158         *
     159         * @param listener the listener to add
     160         */
     161        public void addListSelectionListener(ListSelectionListener listener) {
     162                displaylist.addListSelectionListener(listener);
     163        }
     164
     165        /**
     166         * Removes a selection listener from the relation list.
     167         *
     168         * @param listener the listener to remove
     169         */
     170        public void removeListSelectionListener(ListSelectionListener listener) {
     171                displaylist.removeListSelectionListener(listener);
     172        }
    146173}
Note: See TracChangeset for help on using the changeset viewer.