Java 1.5 compatibility (String.isEmpty() appeared in 1.6)

git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@438 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
angryziber 2009-03-16 20:38:24 +00:00
parent d4cb43176f
commit 2ac2464fed
2 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@ public class DetailsWindow extends AbstractModalDialog {
}
public void focusLost(FocusEvent e) {
if (commentsText.getText().isEmpty()) {
if (commentsText.getText().length() == 0) {
commentsText.setText(defaultText);
commentsText.setForeground(commentsText.getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
}

View File

@ -47,10 +47,10 @@ public class StatisticsDialog extends InfoDialog {
}
String prepareText() {
title2 = Labels.getLabel(scanningResults.getScanInfo().isCompletedNormally() ?
"text.scan.completed" : "text.scan.incomplete");
ScanInfo scanInfo = scanningResults.getScanInfo();
title2 = Labels.getLabel(scanInfo.isCompletedNormally() ?
"text.scan.completed" : "text.scan.incomplete");
String ln = System.getProperty("line.separator");
StringBuilder text = new StringBuilder();
text.append(Labels.getLabel("text.scan.time.total"))