Changeset 16672 in josm for trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
- Timestamp:
- 2020-06-17T21:47:17+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
r16237 r16672 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.BorderLayout;7 6 import java.awt.GridBagLayout; 8 7 import java.awt.event.ActionEvent; … … 20 19 21 20 import javax.swing.BorderFactory; 21 import javax.swing.BoxLayout; 22 22 import javax.swing.JCheckBox; 23 23 import javax.swing.JEditorPane; … … 76 76 protected JPanel buildUploadCommentPanel() { 77 77 JPanel pnl = new JPanel(new GridBagLayout()); 78 pnl.setBorder(BorderFactory.createTitledBorder(tr("Tags of changeset {0}", ""))); 79 80 JEditorPane commentLabel = new JMultilineLabel("<html><b>" + tr("Provide a brief comment for the changes you are uploading:")); 81 pnl.add(commentLabel, GBC.eol().insets(0, 5, 10, 3).fill(GBC.HORIZONTAL)); 78 pnl.setBorder(BorderFactory.createTitledBorder(tr("Provide a brief comment for the changes you are uploading:"))); 79 82 80 hcbUploadComment.setToolTipText(tr("Enter an upload comment")); 83 81 hcbUploadComment.setMaxTextLength(Changeset.MAX_CHANGESET_TAG_LENGTH); … … 87 85 hcbUploadComment.getEditorComponent().addFocusListener(commentModelListener); 88 86 pnl.add(hcbUploadComment, GBC.eol().fill(GBC.HORIZONTAL)); 89 90 JEditorPane sourceLabel = new JMultilineLabel("<html><b>" + tr("Specify the data source for the changes") + ":</b>"); 91 pnl.add(sourceLabel, GBC.eol().insets(0, 8, 10, 0).fill(GBC.HORIZONTAL)); 87 JLabel hcbUploadCommentFeedback = new JLabel(); 88 pnl.add(hcbUploadCommentFeedback, GBC.eol().insets(0, 3, 0, 0).fill(GBC.HORIZONTAL)); 89 new UploadTextComponentValidator.UploadCommentValidator(hcbUploadComment.getEditorComponent(), hcbUploadCommentFeedback); 90 return pnl; 91 } 92 93 protected JPanel buildUploadSourcePanel() { 94 JPanel pnl = new JPanel(new GridBagLayout()); 95 pnl.setBorder(BorderFactory.createTitledBorder(tr("Specify the data source for the changes"))); 96 92 97 JEditorPane obtainSourceOnce = new JMultilineLabel( 93 98 "<html>(<a href=\"urn:changeset-source\">" + tr("just once") + "</a>)</html>"); … … 119 124 hcbUploadSource.getEditorComponent().addFocusListener(sourceModelListener); 120 125 pnl.add(hcbUploadSource, GBC.eol().fill(GBC.HORIZONTAL)); 126 JLabel hcbUploadSourceFeedback = new JLabel(); 127 pnl.add(hcbUploadSourceFeedback, GBC.eol().insets(0, 3, 0, 0).fill(GBC.HORIZONTAL)); 128 new UploadTextComponentValidator.UploadSourceValidator(hcbUploadSource.getEditorComponent(), hcbUploadSourceFeedback); 121 129 if (obtainSourceAutomatically.isSelected()) { 122 130 automaticallyAddSource(); … … 181 189 182 190 protected void build() { 183 setLayout(new Bo rderLayout());191 setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); 184 192 setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); 185 add(buildUploadCommentPanel(), BorderLayout.NORTH); 186 add(pnlUploadParameterSummary, BorderLayout.CENTER); 193 add(buildUploadCommentPanel()); 194 add(buildUploadSourcePanel()); 195 add(pnlUploadParameterSummary); 187 196 if (Config.getPref().getBoolean("upload.show.review.request", true)) { 188 add(cbRequestReview, BorderLayout.SOUTH); 197 JPanel pnl = new JPanel(new GridBagLayout()); 198 pnl.add(cbRequestReview, GBC.eol().fill(GBC.HORIZONTAL)); 199 add(pnl); 189 200 cbRequestReview.addItemListener(e -> changesetReviewModel.setReviewRequested(e.getStateChange() == ItemEvent.SELECTED)); 190 201 }
Note:
See TracChangeset
for help on using the changeset viewer.