Ticket #1575: relationListDialog.patch
| File relationListDialog.patch, 2.2 KB (added by , 18 years ago) |
|---|
-
org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
17 17 import javax.swing.JPanel; 18 18 import javax.swing.JScrollPane; 19 19 import javax.swing.ListSelectionModel; 20 import javax.swing.event.ListSelectionListener; 20 21 21 22 import org.openstreetmap.josm.Main; 22 23 import org.openstreetmap.josm.command.DeleteCommand; … … 143 144 repaint(); 144 145 } 145 146 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 } 146 173 } -
org/openstreetmap/josm/gui/MapFrame.java
59 59 60 60 public ConflictDialog conflictDialog; 61 61 /** 62 * The dialog that shows all relations and lets the user edit them. 63 */ 64 public RelationListDialog relationListDialog; 65 /** 62 66 * The panel list of all toggle dialog icons. To add new toggle dialog actions, use addToggleDialog 63 67 * instead of adding directly to this list. 64 68 */ … … 99 103 addToggleDialog(new UserListDialog()); 100 104 addToggleDialog(conflictDialog = new ConflictDialog()); 101 105 addToggleDialog(new CommandStackDialog(this)); 102 addToggleDialog( new RelationListDialog());106 addToggleDialog(relationListDialog = new RelationListDialog()); 103 107 104 108 // status line below the map 105 109 statusLine = new MapStatus(this);
