Changeset 6070 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs
- Timestamp:
- 2013-07-17T00:01:49+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 17 edited
-
ChangesetDialog.java (modified) (3 diffs)
-
CommandStackDialog.java (modified) (8 diffs)
-
ConflictDialog.java (modified) (11 diffs)
-
HistoryDialog.java (modified) (1 diff)
-
RelationListDialog.java (modified) (17 diffs)
-
SelectionListDialog.java (modified) (3 diffs)
-
ToggleDialog.java (modified) (6 diffs)
-
ValidatorDialog.java (modified) (7 diffs)
-
changeset/ChangesetCacheManager.java (modified) (1 diff)
-
changeset/SingleChangesetDownloadPanel.java (modified) (1 diff)
-
changeset/query/ChangesetQueryDialog.java (modified) (1 diff)
-
properties/PropertiesDialog.java (modified) (26 diffs)
-
relation/ChildRelationBrowser.java (modified) (1 diff)
-
relation/GenericRelationEditor.java (modified) (6 diffs)
-
relation/MemberRoleCellEditor.java (modified) (2 diffs)
-
relation/MemberTable.java (modified) (6 diffs)
-
validator/ValidatorTreePanel.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
r5958 r6070 85 85 private CloseOpenChangesetsAction closeChangesetAction; 86 86 private LaunchChangesetManagerAction launchChangesetManagerAction; 87 87 88 88 private ChangesetDialogPopup popupMenu; 89 89 … … 204 204 launchChangesetManagerAction = new LaunchChangesetManagerAction(); 205 205 cbInSelectionOnly.addItemListener(launchChangesetManagerAction); 206 206 207 207 popupMenu = new ChangesetDialogPopup(lstInActiveDataLayer, lstInSelection); 208 208 … … 210 210 lstInSelection.addMouseListener(popupMenuLauncher); 211 211 lstInActiveDataLayer.addMouseListener(popupMenuLauncher); 212 212 213 213 createLayout(pnl, false, Arrays.asList(new SideButton[] { 214 214 new SideButton(selectObjectsAction, false), -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r5958 r6070 75 75 private SelectAction selectAction = new SelectAction(); 76 76 private SelectAndZoomAction selectAndZoomAction = new SelectAndZoomAction(); 77 77 78 78 public CommandStackDialog(final MapFrame mapFrame) { 79 79 super(tr("Command Stack"), "commandstack", tr("Open a list of all commands (undo buffer)."), … … 89 89 undoTree.getSelectionModel().addTreeSelectionListener(undoSelectionListener); 90 90 InputMapUtils.unassignCtrlShiftUpDown(undoTree, JComponent.WHEN_FOCUSED); 91 91 92 92 redoTree.addMouseListener(new MouseEventHandler()); 93 93 redoTree.setRootVisible(false); … … 124 124 new SideButton(redoAction) 125 125 })); 126 126 127 127 InputMapUtils.addEnterAction(undoTree, selectAndZoomAction); 128 128 InputMapUtils.addEnterAction(redoTree, selectAndZoomAction); … … 303 303 return node; 304 304 } 305 305 306 306 /** 307 307 * Return primitives that are affected by some command 308 * @param path GUI elements 309 * @return collection of affected primitives, onluy usable ones 308 * @param path GUI elements 309 * @return collection of affected primitives, onluy usable ones 310 310 */ 311 311 protected static FilteredCollection<OsmPrimitive> getAffectedPrimitives(TreePath path) { … … 354 354 Main.map.mapView.getEditLayer().data.setSelected( getAffectedPrimitives(path)); 355 355 } 356 356 357 357 @Override 358 358 public void updateEnabledState() { … … 377 377 } 378 378 } 379 379 380 380 /** 381 381 * undo / redo switch to reduce duplicate code … … 448 448 super(new CommandStackPopup()); 449 449 } 450 450 451 451 @Override 452 452 public void mouseClicked(MouseEvent evt) { … … 456 456 } 457 457 } 458 458 459 459 private class CommandStackPopup extends JPopupMenu { 460 460 public CommandStackPopup(){ -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r6009 r6070 67 67 /** 68 68 * Replies the color used to paint conflicts. 69 * 69 * 70 70 * @return the color used to paint conflicts 71 71 * @since 1221 … … 83 83 /** the list widget for the list of conflicts */ 84 84 private JList lstConflicts; 85 85 86 86 private final JPopupMenu popupMenu = new JPopupMenu(); 87 87 private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu); … … 115 115 btnResolve, btnSelect 116 116 })); 117 117 118 118 popupMenuHandler.addAction(Main.main.menu.autoScaleActions.get("conflict")); 119 119 } … … 143 143 DataSet.removeSelectionListener(this); 144 144 } 145 145 146 146 /** 147 147 * Add a list selection listener to the conflicts list. … … 152 152 lstConflicts.getSelectionModel().addListSelectionListener(listener); 153 153 } 154 154 155 155 /** 156 156 * Remove the given list selection listener from the conflicts list. … … 161 161 lstConflicts.getSelectionModel().removeListSelectionListener(listener); 162 162 } 163 163 164 164 /** 165 165 * Replies the popup menu handler. … … 218 218 /** 219 219 * Paints all conflicts that can be expressed on the main window. 220 * 220 * 221 221 * @param g The {@code Graphics} used to paint 222 222 * @param nc The {@code NavigatableComponent} used to get screen coordinates of nodes … … 294 294 /** 295 295 * returns the first selected item of the conflicts list 296 * 296 * 297 297 * @return Conflict 298 298 */ … … 331 331 return ht("/Dialog/ConflictList"); 332 332 } 333 333 334 334 class MouseEventHandler extends PopupMenuLauncher { 335 335 public MouseEventHandler() { … … 438 438 } 439 439 DataSet ds = Main.main.getCurrentDataSet(); 440 if (ds != null) { // Can't see how it is possible but it happened in #7942 440 if (ds != null) { // Can't see how it is possible but it happened in #7942 441 441 ds.setSelected(sel); 442 442 } … … 450 450 } 451 451 } 452 452 453 453 /** 454 454 * Warns the user about the number of detected conflicts -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r5360 r6070 108 108 historyTable.getSelectionModel().addListSelectionListener(showHistoryAction); 109 109 historyTable.getSelectionModel().addListSelectionListener(reloadAction); 110 110 111 111 // Show history dialog on Enter/Spacebar 112 112 InputMapUtils.addEnterAction(historyTable, showHistoryAction); -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r6058 r6070 92 92 93 93 private final NewAction newAction; 94 94 95 95 /** the popup menu and its handler */ 96 96 private final JPopupMenu popupMenu = new JPopupMenu(); … … 98 98 99 99 private final JosmTextField filter; 100 100 101 101 // Actions 102 102 /** the edit action */ … … 114 114 /** add all selected primitives to the given relations */ 115 115 private final AddSelectionToRelations addSelectionToRelations = new AddSelectionToRelations(); 116 116 117 117 HighlightHelper highlightHelper = new HighlightHelper(); 118 118 private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); … … 158 158 // Setup popup menu handler 159 159 setupPopupMenuHandler(); 160 160 161 161 JPanel pane = new JPanel(new BorderLayout()); 162 162 pane.add(filter, BorderLayout.NORTH); … … 175 175 176 176 InputMapUtils.unassignCtrlShiftUpDown(displaylist, JComponent.WHEN_FOCUSED); 177 177 178 178 // Select relation on Ctrl-Enter 179 179 InputMapUtils.addEnterAction(displaylist, selectRelationAction); … … 182 182 displaylist.getActionMap().put("edit", editAction); 183 183 displaylist.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.CTRL_MASK), "edit"); 184 184 185 185 updateActionsRelationLists(); 186 186 } 187 187 188 188 // inform all actions about list of relations they need 189 189 private void updateActionsRelationLists() { 190 190 List<Relation> sel = model.getSelectedRelations(); 191 191 popupMenuHandler.setPrimitives(sel); 192 192 193 193 Component focused = FocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); 194 194 195 195 //update highlights 196 196 if (highlightEnabled && focused==displaylist && Main.isDisplayingMapView()) { … … 200 200 } 201 201 } 202 202 203 203 @Override public void showNotify() { 204 204 MapView.addLayerChangeListener(newAction); … … 214 214 DataSet.removeSelectionListener(addSelectionToRelations); 215 215 } 216 216 217 217 private void resetFilter() { 218 218 filter.setText(null); … … 309 309 310 310 class MouseEventHandler extends PopupMenuLauncher { 311 311 312 312 public MouseEventHandler() { 313 313 super(popupMenu); … … 318 318 if (highlightEnabled) highlightHelper.clear(); 319 319 } 320 320 321 321 protected void setCurrentRelationAsSelection() { 322 322 Main.main.getCurrentDataSet().setSelected((Relation)displaylist.getSelectedValue()); … … 326 326 EditRelationAction.launchEditor(getSelected()); 327 327 } 328 328 329 329 @Override public void mouseClicked(MouseEvent e) { 330 330 if (Main.main.getEditLayer() == null) return; … … 338 338 } 339 339 } 340 340 341 341 /** 342 342 * The action for creating a new relation … … 493 493 } 494 494 } 495 495 496 496 private void updateFilteredRelations() { 497 497 if (filter != null) { … … 519 519 return filteredRelations == null ? relations : filteredRelations; 520 520 } 521 521 522 522 private Relation getVisibleRelation(int index) { 523 523 if (index < 0 || index >= getVisibleRelations().size()) return null; … … 584 584 return i; 585 585 } 586 586 587 587 private Integer getVisibleRelationIndex(Relation rel) { 588 588 int i = getVisibleRelations().indexOf(rel); … … 604 604 605 605 private final void setupPopupMenuHandler() { 606 606 607 607 // -- select action 608 608 popupMenuHandler.addAction(selectRelationAction); … … 624 624 popupMenuHandler.addAction(duplicateAction).setVisible(false); 625 625 popupMenuHandler.addAction(deleteRelationsAction).setVisible(false); 626 626 627 627 popupMenuHandler.addAction(addSelectionToRelations); 628 628 } 629 629 630 630 /* ---------------------------------------------------------------------------------- */ 631 631 /* Methods that can be called from plugins */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r6058 r6070 155 155 } 156 156 }); 157 157 158 158 lstPrimitives.addMouseListener(new MouseEventHandler()); 159 159 … … 192 192 super(popupMenu); 193 193 } 194 194 195 195 @Override 196 196 public void mouseClicked(MouseEvent e) { … … 727 727 text.append(tr("Unselectable now")); 728 728 this.sel=new ArrayList<OsmPrimitive>(); // empty selection 729 } 729 } 730 730 if(ways + nodes + relations == 1) 731 731 { -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r6061 r6070 144 144 */ 145 145 protected JCheckBoxMenuItem windowMenuItem; 146 146 147 147 /** 148 148 * The linked preferences class (optional). If set, accessible from the title bar with a dedicated button … … 152 152 /** 153 153 * Constructor 154 * 154 * 155 155 * @param name the name of the dialog 156 156 * @param iconName the name of the icon to be displayed … … 493 493 add(buttonsHide); 494 494 } 495 495 496 496 // show the pref button if applicable 497 497 if (preferenceClass != null) { … … 558 558 return lblTitle.getText(); 559 559 } 560 560 561 561 public class DialogPopupMenu extends JPopupMenu { 562 562 public final JMenu buttonHidingMenu = new JMenu(tr("Side buttons")); … … 589 589 } 590 590 } 591 591 592 592 public void registerMouseListener() { 593 593 addMouseListener(new MouseEventHandler()); 594 594 } 595 595 596 596 class MouseEventHandler extends PopupMenuLauncher { 597 597 public MouseEventHandler() { … … 864 864 buttonsHide.setVisible(false); 865 865 } 866 866 867 867 // Register title bar mouse listener only after buttonActions has been initialized to have a complete popup menu 868 868 titleBar.registerMouseListener(); 869 869 870 870 return data; 871 871 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r6009 r6070 77 77 private final JPopupMenu popupMenu = new JPopupMenu(); 78 78 private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu); 79 79 80 80 /** Last selected element */ 81 81 private DefaultMutableTreeNode lastSelectedNode = null; … … 417 417 tree.addTreeSelectionListener(listener); 418 418 } 419 419 420 420 /** 421 421 * Remove the given tree selection listener from the validator tree. … … 426 426 tree.removeTreeSelectionListener(listener); 427 427 } 428 428 429 429 /** 430 430 * Replies the popup menu handler. … … 435 435 return popupMenuHandler; 436 436 } 437 437 438 438 /** 439 439 * Replies the currently selected error, or {@code null}. … … 451 451 return null; 452 452 } 453 453 454 454 /** 455 455 * Watches for double clicks and launches the popup menu. 456 456 */ 457 457 class MouseEventHandler extends PopupMenuLauncher { 458 458 459 459 public MouseEventHandler() { 460 460 super(popupMenu); 461 461 } 462 462 463 463 @Override 464 464 public void mouseClicked(MouseEvent e) { … … 483 483 } 484 484 } 485 485 486 486 @Override public void launch(MouseEvent e) { 487 487 TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); … … 585 585 // do nothing 586 586 } 587 587 588 588 protected void fixError(TestError error) throws InterruptedException, InvocationTargetException { 589 589 if (error.isFixable()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r5998 r6070 557 557 558 558 class MouseEventHandler extends PopupMenuLauncher { 559 559 560 560 public MouseEventHandler() { 561 561 super(new ChangesetTablePopupMenu()); 562 562 } 563 563 564 564 @Override 565 565 public void mouseClicked(MouseEvent evt) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java
r5765 r6070 51 51 tfChangesetId.getDocument().addDocumentListener(actDownload); 52 52 add(btn); 53 54 if (Main.pref.getBoolean("downloadchangeset.autopaste", true)) { 53 54 if (Main.pref.getBoolean("downloadchangeset.autopaste", true)) { 55 55 tfChangesetId.tryToPasteFromClipboard(); 56 56 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java
r5998 r6070 191 191 } 192 192 break; 193 193 194 194 case 2: 195 195 if (getChangesetQuery() == null) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r6068 r6070 152 152 */ 153 153 private final TagEditHelper editHelper = new TagEditHelper(propertyData, valueCount); 154 154 155 155 private final DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this); 156 156 private final HelpAction helpAction = new HelpAction(); … … 170 170 private final SelectRelationAction selectRelationAction = new SelectRelationAction(false); 171 171 private final SelectRelationAction addRelationToSelectionAction = new SelectRelationAction(true); 172 172 173 173 private final DownloadMembersAction downloadMembersAction = new DownloadMembersAction(); 174 174 private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction = new DownloadSelectedIncompleteMembersAction(); 175 175 176 176 private final SelectMembersAction selectMembersAction = new SelectMembersAction(false); 177 177 private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true); 178 178 179 179 private final HighlightHelper highlightHelper= new HighlightHelper(); 180 180 181 181 /** 182 182 * The Add button (needed to be able to disable it) … … 195 195 */ 196 196 private final PresetListPanel presets = new PresetListPanel(); 197 197 198 198 /** 199 199 * Text to display when nothing selected. … … 214 214 } 215 215 }; 216 216 217 217 // <editor-fold defaultstate="collapsed" desc="Dialog construction and helper methods"> 218 218 219 219 /** 220 220 * Create a new PropertiesDialog … … 231 231 setupMembershipMenu(); 232 232 buildMembershipTable(); 233 233 234 234 // combine both tables and wrap them in a scrollPane 235 235 JPanel bothTables = new JPanel(); … … 249 249 bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2)); 250 250 } 251 251 252 252 setupKeyboardShortcuts(); 253 253 … … 257 257 propertyTable.getSelectionModel().addListSelectionListener(deleteAction); 258 258 membershipTable.getSelectionModel().addListSelectionListener(deleteAction); 259 260 259 260 261 261 JScrollPane scrollPane = (JScrollPane) createLayout(bothTables, true, Arrays.asList(new SideButton[] { 262 262 this.btnAdd, this.btnEdit, this.btnDel … … 273 273 editHelper.loadTagsIfNeeded(); 274 274 } 275 275 276 276 private void buildPropertiesTable() { 277 277 // setting up the properties table … … 280 280 propertyTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 281 281 propertyTable.getTableHeader().setReorderingAllowed(false); 282 282 283 283 propertyTable.getColumnModel().getColumn(1).setCellRenderer(new DefaultTableCellRenderer(){ 284 284 @Override public Component getTableCellRendererComponent(JTable table, Object value, … … 383 383 mod.getColumn(0).setPreferredWidth(200); 384 384 } 385 385 386 386 /** 387 387 * creates the popup menu @field membershipMenu and its launcher on membership table … … 432 432 }); 433 433 } 434 435 /** 436 * creates the popup menu @field propertyMenu and its launcher on property table 434 435 /** 436 * creates the popup menu @field propertyMenu and its launcher on property table 437 437 */ 438 438 private void setupPropertiesMenu() { … … 448 448 propertyTable.addMouseListener(new PopupMenuLauncher(propertyMenu)); 449 449 } 450 450 451 451 /** 452 452 * Assignas all needed keys like Enter and Spacebar to most important actions 453 453 */ 454 454 private void setupKeyboardShortcuts() { 455 455 456 456 // ENTER = editAction, open "edit" dialog 457 457 propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) … … 461 461 .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter"); 462 462 membershipTable.getActionMap().put("onTableEnter",editAction); 463 464 // INSERT button = addAction, open "add property" dialog 463 464 // INSERT button = addAction, open "add property" dialog 465 465 propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) 466 466 .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert"); 467 467 propertyTable.getActionMap().put("onTableInsert",addAction); 468 468 469 469 // unassign some standard shortcuts for JTable to allow upload / download 470 470 InputMapUtils.unassignCtrlShiftUpDown(propertyTable, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); 471 471 472 472 // unassign some standard shortcuts for correct copy-pasting, fix #8508 473 473 propertyTable.setTransferHandler(null); 474 474 475 475 propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) 476 476 .put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),"onCopy"); … … 479 479 // allow using enter to add tags for all look&feel configurations 480 480 InputMapUtils.enableEnter(this.btnAdd); 481 481 482 482 // DEL button = deleteAction 483 483 getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( … … 485 485 ); 486 486 getActionMap().put("delete", deleteAction); 487 487 488 488 // F1 button = custom help action 489 489 getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( … … 491 491 getActionMap().put("onHelp", helpAction); 492 492 } 493 493 494 494 /** 495 495 * This simply fires up an {@link RelationEditor} for the relation shown; everything else … … 506 506 ((MemberInfo) membershipData.getValueAt(row, 1)).role).setVisible(true); 507 507 } 508 508 509 509 private int findRow(TableModel model, Object value) { 510 510 for (int i=0; i<model.getRowCount(); i++) { … … 514 514 return -1; 515 515 } 516 516 517 517 /** 518 518 * Update selection status, call @{link #selectionChanged} function. … … 525 525 } 526 526 } 527 527 528 528 // </editor-fold> 529 529 530 530 // <editor-fold defaultstate="collapsed" desc="Event listeners methods"> 531 531 532 532 @Override 533 533 public void showNotify() { … … 558 558 } 559 559 } 560 560 561 561 @Override 562 562 public void destroy() { … … 625 625 ? e.getValue().keySet().iterator().next() : tr("<different>")); 626 626 } 627 627 628 628 membershipData.setRowCount(0); 629 629 … … 698 698 } 699 699 } 700 700 701 701 /* ---------------------------------------------------------------------------------- */ 702 702 /* EditLayerChangeListener */ … … 721 721 722 722 // <editor-fold defaultstate="collapsed" desc="Methods that are called by plugins to extend fuctionality "> 723 723 724 724 /** 725 725 * Replies the property popup menu handler. … … 752 752 return row > -1 ? (IRelation) membershipData.getValueAt(row, 0) : null; 753 753 } 754 754 755 755 // </editor-fold> 756 756 757 757 /** 758 758 * Class that watches for mouse clicks … … 852 852 } 853 853 }; 854 854 855 855 /** 856 856 * Action handling delete button press in properties dialog. … … 940 940 } else if (membershipTable.getSelectedRowCount() > 0) { 941 941 int[] rows = membershipTable.getSelectedRows(); 942 // delete from last relation to convserve row numbers in the table 942 // delete from last relation to convserve row numbers in the table 943 943 for (int i=rows.length-1; i>=0; i--) { 944 944 deleteFromRelation(rows[i]); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r5925 r6070 415 415 refreshView(r); 416 416 } 417 SwingUtilities.invokeLater(new Runnable() { 418 public void run() { 419 Main.map.repaint(); 420 } 421 }); 417 SwingUtilities.invokeLater(new Runnable() { 418 public void run() { 419 Main.map.repaint(); 420 } 421 }); 422 422 } catch (Exception e) { 423 423 if (canceled) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r6068 r6070 216 216 } 217 217 ); 218 218 219 219 tagEditorPanel.setNextFocusComponent(memberTable); 220 220 selectionTable.setFocusable(false); … … 492 492 tb.add(moveDownAction); 493 493 memberTable.getActionMap().put("moveDown", moveDownAction); 494 494 495 495 tb.addSeparator(); 496 496 … … 499 499 memberTableModel.getSelectionModel().addListSelectionListener(editAction); 500 500 tb.add(editAction); 501 501 502 502 // -- delete action 503 503 RemoveAction removeSelectedAction = new RemoveAction(); … … 505 505 tb.add(removeSelectedAction); 506 506 memberTable.getActionMap().put("removeSelected", removeSelectedAction); 507 507 508 508 tb.addSeparator(); 509 509 // -- sort action … … 536 536 inputMap.put((KeyStroke) moveDownAction.getValue(AbstractAction.ACCELERATOR_KEY),"moveDown"); 537 537 inputMap.put((KeyStroke) downloadIncompleteMembersAction.getValue(AbstractAction.ACCELERATOR_KEY),"downloadIncomplete"); 538 538 539 539 return tb; 540 540 } … … 677 677 } 678 678 679 679 680 680 private void registerCopyPasteAction(AbstractAction action, Object actionName, KeyStroke shortcut) { 681 681 int mods = shortcut.getModifiers(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java
r4238 r6070 26 26 this.ds = ds; 27 27 editor = new AutoCompletingTextField(); 28 editor.setBorder(BorderFactory.createEmptyBorder(1,1,1,1)); 28 editor.setBorder(BorderFactory.createEmptyBorder(1,1,1,1)); 29 29 autoCompletionList = new AutoCompletionList(); 30 30 editor.setAutoCompletionList(autoCompletionList); … … 57 57 return super.stopCellEditing(); 58 58 } 59 59 60 60 /** Returns the edit field for this cell editor. */ 61 61 public AutoCompletingTextField getEditor() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
r6064 r6070 63 63 */ 64 64 protected void init() { 65 MemberRoleCellEditor ce = (MemberRoleCellEditor)getColumnModel().getColumn(0).getCellEditor(); 65 MemberRoleCellEditor ce = (MemberRoleCellEditor)getColumnModel().getColumn(0).getCellEditor(); 66 66 setRowHeight(ce.getEditor().getPreferredSize().height); 67 67 setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); … … 75 75 76 76 initHighlighting(); 77 77 78 78 // install custom navigation actions 79 79 // … … 81 81 getActionMap().put("selectPreviousColumnCell", new SelectPreviousColumnCellAction()); 82 82 } 83 83 84 84 @Override 85 85 protected ZoomToAction buildZoomToAction() { 86 86 return new ZoomToAction(this); 87 87 } 88 88 89 89 @Override 90 90 protected JPopupMenu buildPopupMenu() { … … 99 99 return menu; 100 100 } 101 101 102 102 @Override 103 103 public Dimension getPreferredSize(){ … … 140 140 } 141 141 }}; 142 142 143 143 private void initHighlighting() { 144 144 highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); … … 217 217 MapView.removeLayerChangeListener(zoomToGap); 218 218 } 219 219 220 220 public void stopHighlighting() { 221 221 if (highlighterListener == null) return; -
trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
r5911 r6070 380 380 return updateCount; 381 381 } 382 382 383 383 private void clearErrors() { 384 384 if (errors != null) {
Note:
See TracChangeset
for help on using the changeset viewer.
