diff --git a/src/com/jpexs/decompiler/flash/gui/TagInfoPanel.java b/src/com/jpexs/decompiler/flash/gui/TagInfoPanel.java
index 1305a6c11..3a35d4ead 100644
--- a/src/com/jpexs/decompiler/flash/gui/TagInfoPanel.java
+++ b/src/com/jpexs/decompiler/flash/gui/TagInfoPanel.java
@@ -111,25 +111,26 @@ public class TagInfoPanel extends JPanel {
private void updateHtmlContent(boolean expand, boolean showDetails) {
String categoryName = "general";
- String result = "
";
+ StringBuilder result = new StringBuilder();
+ result.append("");
Boolean flipFlop = false;
List items = tagInfo.getInfos().get(categoryName);
if (View.isOceanic()) {
- result += "";
+ result.append("
");
} else {
- result += "
";
+ result.append("");
}
- result += String.format(
+ result.append(String.format(
"%s | ",
mainPanel.translate("tagInfo.header.name")
- );
- result += String.format(
+ ));
+ result.append(String.format(
"%s | ",
mainPanel.translate("tagInfo.header.value")
- );
- result += "";
+ ));
+ result.append("");
SWF swf = tagInfo.getSwf();
for (TagInfo.TagInfoItem item : items) {
@@ -137,9 +138,9 @@ public class TagInfoPanel extends JPanel {
flipFlop = !flipFlop;
if (View.isOceanic()) {
- result += "";
+ result.append("
");
} else {
- result += "
";
+ result.append("
");
}
String name = item.getName();
@@ -156,16 +157,17 @@ public class TagInfoPanel extends JPanel {
}
}
- result += "| " + name + " | ";
+ result.append("").append(name).append(" | ");
+ StringBuilder valueBuilder = new StringBuilder();
Object value = item.getValue();
if (value instanceof Boolean) {
boolean boolValue = (boolean) value;
- value = boolValue ? AppStrings.translate("yes") : AppStrings.translate("no");
+ valueBuilder.append(boolValue ? AppStrings.translate("yes") : AppStrings.translate("no"));
} else if (convertToLinkList) {
String[] strIds = ((String) value).split(", ");
List sortedIds = new ArrayList<>();
- String strValue = "";
+ StringBuilder strValue = new StringBuilder();
for (String strId : strIds) {
sortedIds.add(Integer.parseInt(strId));
@@ -188,7 +190,7 @@ public class TagInfoPanel extends JPanel {
} else {
charName = Helper.escapeHTML(character.toString());
}
- strValue += String.format("%s
", scheme, id, charName, id);
+ strValue.append(String.format("%s
", scheme, id, charName, id));
} else {
if (swf == null || character == null) {
charName = "???";
@@ -196,30 +198,33 @@ public class TagInfoPanel extends JPanel {
charName = character.getTagName();
}
- strValue += String.format("%s (%d)
", scheme, id, charName, id);
+ strValue.append(String.format("%s (%d)
", scheme, id, charName, id));
}
} else {
- strValue += String.format("%d, ", scheme, id, displayId);
+ strValue.append(String.format("%d, ", scheme, id, displayId));
}
}
- value = strValue.substring(0, strValue.length() - 2);
+ String sVal = strValue.toString();
+ valueBuilder.append(sVal.substring(0, sVal.length() - 2));
if (!frameList && !expand) {
- value = value + " +";
+ valueBuilder.append(" +");
} else if (!frameList && expand && !showDetails) {
- value = value + "
+";
+ valueBuilder.append("
+");
}
+ } else {
+ valueBuilder.append(value.toString());
}
- result += "" + value + " | ";
+ result.append("").append(valueBuilder.toString()).append(" | ");
- result += "
";
+ result.append("");
}
- result += "
";
+ result.append("
");
- editorPane.setText(result);
+ editorPane.setText(result.toString());
}
private void buildHtmlContent() {