Changeset 7254 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2014-06-19T11:09:04+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r7171 r7254 170 170 171 171 public boolean required = false; 172 p ubliclong count = 0;172 private long count = 0; 173 173 174 174 public void setType(String types) throws SAXException { … … 191 191 } 192 192 193 /* return either argument, the highest possible value or the lowest 194 allowed value */ 195 public long getValidCount(long c) 196 { 197 if(count > 0 && !required) 193 public void setCount(String count) { 194 this.count = Long.parseLong(count); 195 } 196 197 /** 198 * Return either argument, the highest possible value or the lowest allowed value 199 */ 200 public long getValidCount(long c) { 201 if (count > 0 && !required) 198 202 return c != 0 ? count : 0; 199 else if(count > 0) 203 else if (count > 0) 200 204 return count; 201 else if(!required) 202 return c != 0 205 else if (!required) 206 return c != 0 ? c : 0; 203 207 else 204 return c != 0 ? c : 1; 205 } 208 return c != 0 ? c : 1; 209 } 210 206 211 public boolean addToPanel(JPanel p, Collection<OsmPrimitive> sel) { 207 212 String cstring;
Note:
See TracChangeset
for help on using the changeset viewer.