Opened 14 years ago

Last modified 10 years ago

#4429 closed enhancement

[Patch] right click menu "cut, copy, paste" for each text component in josm — at Version 2

Reported by: bastiK Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc: akks

Description (last modified by Don-vip)

On most platforms you can copy text by right clicking on the selection and then choose copy from the context menu.

Some users will miss this and it certainly adds to the foreign feel when using java apps.

The java bug for this:
http://bugs.sun.com/view_bug.do?bug_id=4818418

Change History (4)

by anonymous, 11 years ago

Attachment: textfield.patch added

Patch for context menu

comment:1 by anonymous, 11 years ago

The textfield.patch adds a right click menu to the JTextField.
It's a basic variant and adapted from the sun example.

comment:2 by Don-vip, 11 years ago

Description: modified (diff)
Summary: right click menu "cut, copy, paste" for each text component in josm[Patch] right click menu "cut, copy, paste" for each text component in josm

Thanks for the patch, this is highly appreciated. Some work remains to be done before being considered for merging:

  1. org.openstreetmap.josm.gui.MyTextField should become org.openstreetmap.josm.gui.widgets.JosmTextField
  2. All text displayed must be translated by using JOSM translation system (example: "Paste" becomes tr("Paste"), with import static org.openstreetmap.josm.tools.I18n.tr;
  3. The Sun patch is Windows-oriented. Has this patch been tested under Linux as well ?
  4. Please no debug stuff (the main method in comments). Unused imports should be removed instead of being commented.
  5. We credit patch authors. Who are you ? :)

by NooN, 11 years ago

Attachment: josmtextfield_01.patch added
Note: See TracTickets for help on using tickets.