Changeset 29584 in osm for applications
- Timestamp:
- 2013-05-11T22:58:27+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/geochat/src/geochat
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/geochat/src/geochat/ChatMessage.java
r29568 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/ChatPaneManager.java
r29582 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnection.java
r29582 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/ChatServerConnectionListener.java
r29558 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java
r29582 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/GeoChatPlugin.java
r29540 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/GeoChatPopupAdapter.java
r29581 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/JPanelTextField.java
r29582 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 … … 4 5 import java.awt.event.KeyEvent; 5 6 import java.util.*; 6 import org.openstreetmap.josm.gui.widgets.JosmTextField;7 import javax.swing. KeyStroke;7 import javax.swing.*; 8 import javax.swing.text.DefaultEditorKit; 8 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 11 import static org.openstreetmap.josm.tools.I18n.tr; 9 12 10 13 /** 11 14 * JTextField tweaked to work in a JOSM panel. It prevents unwanted keystrokes 12 15 * to be caught by the editor. 13 * 16 * 14 17 * @author zverik 15 18 */ 16 public class JPanelTextField extends J osmTextField {19 public class JPanelTextField extends JTextField { 17 20 18 21 public JPanelTextField() { 19 22 setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, new HashSet<KeyStroke>()); 23 PopupMenuLauncher launcher = new PopupMenuLauncher(createEditMenu()); 24 addMouseListener(launcher); 25 } 26 27 private JPopupMenu createEditMenu() { 28 JPopupMenu menu = new JPopupMenu(); 29 menu.add(createMenuItem(DefaultEditorKit.cutAction, tr("Cut"))); 30 menu.add(createMenuItem(DefaultEditorKit.copyAction, tr("Copy"))); 31 menu.add(createMenuItem(DefaultEditorKit.pasteAction, tr("Paste"))); 32 menu.add(createMenuItem(DefaultEditorKit.selectAllAction, tr("Select All"))); 33 return menu; 34 } 35 36 private JMenuItem createMenuItem( String action, String label ) { 37 JMenuItem item = new JMenuItem(getActionMap().get(action)); 38 item.setText(label); 39 return item; 20 40 } 21 41 -
applications/editors/josm/plugins/geochat/src/geochat/JsonQueryCallback.java
r29540 r29584 1 // License: WTFPL 1 2 package geochat; 2 3 -
applications/editors/josm/plugins/geochat/src/geochat/JsonQueryUtil.java
r29563 r29584 1 // License: WTFPL 1 2 package geochat; 2 3
Note:
See TracChangeset
for help on using the changeset viewer.