Changeset 6654 in josm for trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
- Timestamp:
- 2014-01-06T21:46:07+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
r6631 r6654 21 21 import javax.swing.Action; 22 22 import javax.swing.BorderFactory; 23 import javax.swing.J Label;23 import javax.swing.JEditorPane; 24 24 import javax.swing.JPanel; 25 import javax.swing.event.HyperlinkEvent; 26 import javax.swing.event.HyperlinkListener; 25 27 26 28 import org.openstreetmap.josm.Main; 27 29 import org.openstreetmap.josm.data.osm.Changeset; 28 30 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 31 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 29 32 import org.openstreetmap.josm.tools.CheckParameterUtil; 30 33 import org.openstreetmap.josm.tools.GBC; … … 54 57 pnl.setLayout(new GridBagLayout()); 55 58 56 pnl.add(new JLabel(tr("Provide a brief comment for the changes you are uploading:")), GBC.eol().insets(0, 5, 10, 3)); 59 final JEditorPane commentLabel = JosmEditorPane.createJLabelLikePane(); 60 commentLabel.setText("<html><b>" + tr("Provide a brief comment for the changes you are uploading:")); 61 pnl.add(commentLabel, GBC.eol().insets(0, 5, 10, 3)); 57 62 hcbUploadComment.setToolTipText(tr("Enter an upload comment")); 58 63 hcbUploadComment.setMaxTextLength(Changeset.MAX_COMMENT_LENGTH); … … 65 70 pnl.add(hcbUploadComment, GBC.eol().fill(GBC.HORIZONTAL)); 66 71 67 pnl.add(new JLabel(tr("Specify the data source for the changes:")), GBC.eol().insets(0, 8, 10, 3)); 72 final JEditorPane sourceLabel = JosmEditorPane.createJLabelLikePane(); 73 sourceLabel.setText("<html><b>" + tr("Specify the data source for the changes") 74 + "</b> (<a href=\"urn:changeset-source\">" + tr("obtain from current layers") + "</a>)<b>:</b>"); 75 sourceLabel.addHyperlinkListener(new HyperlinkListener() { 76 @Override 77 public void hyperlinkUpdate(HyperlinkEvent e) { 78 if (HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())) { 79 hcbUploadSource.setText(Main.map.mapView.getLayerInformationForSourceTag()); 80 } 81 } 82 }); 83 pnl.add(sourceLabel, GBC.eol().insets(0, 8, 10, 3)); 84 68 85 hcbUploadSource.setToolTipText(tr("Enter a source")); 69 List<String> sourceHistory = new LinkedList<String>(Main.pref.getCollection(SOURCE_HISTORY_KEY, Arrays.asList("knowledge", "survey"))); 86 List<String> sourceHistory = new LinkedList<String>(Main.pref.getCollection(SOURCE_HISTORY_KEY, Arrays.asList("knowledge", "survey", "Bing"))); 70 87 Collections.reverse(sourceHistory); // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement() 71 88 hcbUploadSource.setPossibleItems(sourceHistory);
Note:
See TracChangeset
for help on using the changeset viewer.
