Changeset 9078 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
- Timestamp:
- 2015-12-02T00:05:09+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r9059 r9078 63 63 private final JTree redoTree = new JTree(redoTreeModel); 64 64 65 private transient UndoRedoSelectionListener undoSelectionListener; 66 private transient UndoRedoSelectionListener redoSelectionListener; 67 68 private JScrollPane scrollPane; 69 private JSeparator separator = new JSeparator(); 65 private final transient UndoRedoSelectionListener undoSelectionListener; 66 private final transient UndoRedoSelectionListener redoSelectionListener; 67 68 private final JScrollPane scrollPane; 69 private final JSeparator separator = new JSeparator(); 70 70 // only visible, if separator is the top most component 71 private Component spacer = Box.createRigidArea(new Dimension(0, 3)); 71 private final Component spacer = Box.createRigidArea(new Dimension(0, 3)); 72 72 73 73 // last operation is remembered to select the next undo/redo entry in the list … … 76 76 77 77 // Actions for context menu and Enter key 78 private SelectAction selectAction = new SelectAction(); 79 private SelectAndZoomAction selectAndZoomAction = new SelectAndZoomAction(); 78 private final SelectAction selectAction = new SelectAction(); 79 private final SelectAndZoomAction selectAndZoomAction = new SelectAndZoomAction(); 80 80 81 81 /** … … 167 167 */ 168 168 private class UndoRedoSelectionListener implements TreeSelectionListener { 169 private JTree source; 169 private final JTree source; 170 170 171 171 UndoRedoSelectionListener(JTree source) { … … 247 247 * Simple listener setup to update the button enabled state when the side dialog shows. 248 248 */ 249 private transient Set<IEnabledStateUpdating> showNotifyListener = new LinkedHashSet<>(); 249 private final transient Set<IEnabledStateUpdating> showNotifyListener = new LinkedHashSet<>(); 250 250 251 251 private void addShowNotifyListener(IEnabledStateUpdating listener) { … … 431 431 */ 432 432 protected class UndoRedoAction extends AbstractAction implements IEnabledStateUpdating { 433 private UndoRedoType type; 434 private JTree tree; 433 private final UndoRedoType type; 434 private final JTree tree; 435 435 436 436 /** … … 439 439 */ 440 440 public UndoRedoAction(UndoRedoType type) { 441 super();442 441 this.type = type; 443 switch (type) { 444 case UNDO: 442 if (UndoRedoType.UNDO == type) { 445 443 tree = undoTree; 446 444 putValue(NAME, tr("Undo")); 447 445 putValue(SHORT_DESCRIPTION, tr("Undo the selected and all later commands")); 448 446 putValue(SMALL_ICON, ImageProvider.get("undo")); 449 break; 450 case REDO: 447 } else { 451 448 tree = redoTree; 452 449 putValue(NAME, tr("Redo")); 453 450 putValue(SHORT_DESCRIPTION, tr("Redo the selected and all earlier commands")); 454 451 putValue(SMALL_ICON, ImageProvider.get("redo")); 455 break;456 452 } 457 453 }
Note:
See TracChangeset
for help on using the changeset viewer.
