Changeset 8461 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2015-06-03T14:05:30+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r8443 r8461 525 525 .append("</strong>="); 526 526 String value = tags.get(key); 527 while (value.length() != 0) {527 while (!value.isEmpty()) { 528 528 sb.append(value.substring(0,Math.min(50, value.length()))); 529 529 if (value.length() > 50) { -
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r8441 r8461 492 492 493 493 // Ensure all required variables are available 494 if (rememberSizePref.length() != 0&& defaultWindowGeometry != null) {494 if (!rememberSizePref.isEmpty() && defaultWindowGeometry != null) { 495 495 if(visible) { 496 496 initWindowGeometry().applySafe(this); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
r8444 r8461 1025 1025 @Override 1026 1026 public boolean isValid() { 1027 return getComponent().getText().trim().length() > 0;1027 return !getComponent().getText().trim().isEmpty(); 1028 1028 } 1029 1029 -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r8394 r8461 305 305 306 306 protected final void updateEnabledState() { 307 setEnabled( cbSearchExpression.getText().trim().length() > 0);307 setEnabled(!cbSearchExpression.getText().trim().isEmpty()); 308 308 } 309 309 -
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r8444 r8461 117 117 String commentText = comment.getText(); 118 118 //closing a note creates an empty comment that we don't want to show 119 if (commentText != null && commentText.trim().length() > 0) {119 if (commentText != null && !commentText.trim().isEmpty()) { 120 120 sb.append("<hr/>"); 121 121 String userName = XmlWriter.encode(comment.getUser().getName()); -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r8442 r8461 408 408 @Override 409 409 public boolean isValid() { 410 return getComponent().getText().trim().length() > 0;410 return !getComponent().getText().trim().isEmpty(); 411 411 } 412 412 … … 429 429 @Override 430 430 public boolean isValid() { 431 return getComponent().getText().trim().length() > 0;431 return !getComponent().getText().trim().isEmpty(); 432 432 } 433 433 -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
r6890 r8461 82 82 @Override 83 83 public boolean isValid() { 84 return getComponent().getText().trim().length() > 0;84 return !getComponent().getText().trim().isEmpty(); 85 85 } 86 86 -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r8444 r8461 489 489 // Get icon 490 490 String iconName = tps.getIconName(); 491 ImageIcon icon = iconName != null && iconName.length() > 0? ImageProvider.get("preferences", iconName) : null;491 ImageIcon icon = iconName != null && !iconName.isEmpty() ? ImageProvider.get("preferences", iconName) : null; 492 492 // See #6985 - Force icons to be 48x48 pixels 493 493 if (icon != null && (icon.getIconHeight() != 48 || icon.getIconWidth() != 48)) { -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r8444 r8461 218 218 skip('='); 219 219 String paramValue = readTillChar(',',')'); 220 if ( paramName.length() > 0 && paramValue.length() > 0) {220 if (!paramName.isEmpty() && !paramValue.isEmpty()) { 221 221 ActionParameter<?> actionParam = actionParams.get(paramName); 222 222 if (actionParam != null) { … … 235 235 skip('='); 236 236 String paramValue = readTillChar(',','}'); 237 if ("icon".equals(paramName) && paramValue.length() > 0) {237 if ("icon".equals(paramName) && !paramValue.isEmpty()) { 238 238 result.setIcon(paramValue); 239 } else if("name".equals(paramName) && paramValue.length() > 0) {239 } else if("name".equals(paramName) && !paramValue.isEmpty()) { 240 240 result.setName(paramValue); 241 241 } … … 289 289 boolean first = true; 290 290 String tmp = action.getName(); 291 if (tmp.length() != 0) {291 if (!tmp.isEmpty()) { 292 292 result.append(first ? "{" : ","); 293 293 result.append("name="); … … 296 296 } 297 297 tmp = action.getIcon(); 298 if (tmp.length() != 0) {298 if (!tmp.isEmpty()) { 299 299 result.append(first ? "{" : ","); 300 300 result.append("icon="); … … 385 385 ActionParameter<Object> param = getParam(paramIndex); 386 386 387 if (param != null && val.length() > 0) {387 if (param != null && !val.isEmpty()) { 388 388 currentAction.getParameters().put(param.getName(), param.readFromString((String)aValue)); 389 389 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java
r6529 r8461 23 23 @Override 24 24 public boolean isValid() { 25 return getComponent().getText().trim().length() > 0;25 return !getComponent().getText().trim().isEmpty(); 26 26 } 27 27 -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r8441 r8461 104 104 try { 105 105 Long.parseLong(str); 106 if ( curText.length() != 0)106 if (!curText.isEmpty()) 107 107 Long.parseLong(curText); 108 108 item = lookupItem(curText, true);
Note:
See TracChangeset
for help on using the changeset viewer.