Example #1
0
 @Override
 public String getLabel(PrintNameFile value) {
   String printName = value.getPrintName();
   CharacterReference reference = createReference(value);
   CharacterType characterType = scanner.getCharacterType(reference);
   String characterString = new CharacterTypeUi(resources).getLabel(characterType);
   Identifier casteType = scanner.getCasteType(reference);
   if (casteType == CasteType.NULL_CASTE_TYPE) {
     return resources.getString(
         "LoadCharacter.PrintNameFile.ShortMessage", printName, characterString);
   }
   String casteTypeString = resources.getString("Caste." + casteType.getId());
   String casteString = resources.getString(characterType.getId() + ".Caste.Label");
   return resources.getString(
       "LoadCharacter.PrintNameFile.Message",
       printName,
       characterString,
       casteTypeString,
       casteString);
 }
Example #2
0
 @Override
 public RelativePath getIconsRelativePath(PrintNameFile value) {
   CharacterType characterType = scanner.getCharacterType(createReference(value));
   return new CharacterUI().getSmallTypeIconPath(characterType);
 }