- Timestamp:
- 2016-01-17T20:41:24+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r9496 r9511 127 127 */ 128 128 private JButton sortBelowButton; 129 /** 130 * Action for performing the {@link CancelAction} 131 */ 132 private CancelAction cancelAction; 129 133 130 134 /** … … 219 223 setSize(findMaxDialogSize()); 220 224 225 setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); 221 226 addWindowListener( 222 227 new WindowAdapter() { … … 224 229 public void windowOpened(WindowEvent e) { 225 230 cleanSelfReferences(); 231 } 232 233 @Override 234 public void windowClosing(WindowEvent e) { 235 cancel(); 226 236 } 227 237 } … … 248 258 memberTableModel.setSelectedMembers(selectedMembers); 249 259 HelpUtil.setHelpContext(getRootPane(), ht("/Dialog/RelationEditor")); 260 } 261 262 protected void cancel() { 263 cancelAction.actionPerformed(null); 250 264 } 251 265 … … 274 288 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER)); 275 289 pnl.add(new SideButton(new OKAction(memberTable, memberTableModel, tagEditorPanel.getModel(), getLayer(), this, tfRole))); 276 pnl.add(new SideButton(new CancelAction(memberTable, memberTableModel, tagEditorPanel.getModel(), getLayer(), this, tfRole))); 290 cancelAction = new CancelAction(memberTable, memberTableModel, tagEditorPanel.getModel(), getLayer(), this, tfRole); 291 pnl.add(new SideButton(cancelAction)); 277 292 pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/RelationEditor")))); 278 293 return pnl;
Note:
See TracChangeset
for help on using the changeset viewer.