MCPcopy Create free account
hub / github.com/PCGen/pcgen / getFormattedCampaigns

Method getFormattedCampaigns

code/src/java/pcgen/gui2/PCGenFrame.java:1125–1147  ·  view source on GitHub ↗
(SourceSelectionFacade sources)

Source from the content-addressed store, hash-verified

1123 }
1124
1125 private static String getFormattedCampaigns(SourceSelectionFacade sources)
1126 {
1127 StringBuilder campList = new StringBuilder(100);
1128 campList.append("<UL>");
1129 int count = 1;
1130 final int maxListLen = 6;
1131 for (Campaign facade : sources.getCampaigns())
1132 {
1133 campList.append("<li>");
1134 if (count >= maxListLen && sources.getCampaigns().getSize() > maxListLen)
1135 {
1136 int numExtra = sources.getCampaigns().getSize() - maxListLen + 1;
1137 campList.append(
1138 LanguageBundle.getFormattedString("in_loadPcDiffSourcesExcessSources", String.valueOf(numExtra)));
1139 break;
1140 }
1141 campList.append(facade);
1142 campList.append("</li>");
1143 count++;
1144 }
1145 campList.append("</UL>");
1146 return campList.toString();
1147 }
1148
1149 /**
1150 * Asynchronously load the sources required for a character and then load the character.

Callers 1

loadCharacterFromFileMethod · 0.95

Calls 6

getFormattedStringMethod · 0.95
getCampaignsMethod · 0.65
getSizeMethod · 0.65
toStringMethod · 0.65
appendMethod · 0.45
valueOfMethod · 0.45

Tested by

no test coverage detected