Changeset 4508 in josm
- Timestamp:
- 2011-10-09T03:05:35+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
r2686 r4508 17 17 */ 18 18 public final class Changeset implements Tagged { 19 20 /** The maximum changeset comment text length allowed by API 0.6 **/ 21 public static final int MAX_COMMENT_LENGTH = 255; 22 19 23 /** the changeset id */ 20 24 private int id; -
trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
r3530 r4508 24 24 25 25 import org.openstreetmap.josm.Main; 26 import org.openstreetmap.josm.data.osm.Changeset; 26 27 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 27 28 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 50 51 hcbUploadComment = new HistoryComboBox(); 51 52 hcbUploadComment.setToolTipText(tr("Enter an upload comment")); 53 hcbUploadComment.setMaxTextLength(Changeset.MAX_COMMENT_LENGTH); 52 54 List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>())); 53 55 // we have to reverse the history, because ComboBoxHistory will reverse it again -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r4176 r4508 14 14 import javax.swing.JList; 15 15 import javax.swing.ListCellRenderer; 16 import javax.swing.text.AbstractDocument; 16 17 import javax.swing.text.AttributeSet; 17 18 import javax.swing.text.BadLocationException; … … 21 22 22 23 import org.openstreetmap.josm.Main; 24 import org.openstreetmap.josm.gui.DocumentSizeFilter; 23 25 24 26 /** … … 149 151 setMaximumRowCount(maxsize); 150 152 } 153 154 public void setMaxTextLength(int length) 155 { 156 JTextComponent editor = (JTextComponent) this.getEditor().getEditorComponent(); 157 AbstractDocument doc = (AbstractDocument) editor.getDocument(); 158 doc.setDocumentFilter(new DocumentSizeFilter(length)); 159 } 151 160 152 161 /**
Note:
See TracChangeset
for help on using the changeset viewer.