@Override public void initPresentation() { for (Identifier generatorType : model.getGeneratorTypes()) { String formattedLabel = resources.getString(generatorType.getId()); view.addNameGeneratorType(formattedLabel, generatorType); } initSelectedGeneratorTypePresentation(); initGenerationPresentation(); }
@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); }
private void initGenerationPresentation() { String label = resources.getString("Namegenerator.GenerateButton.Label"); view.addGenerationAction( label, new Command() { @Override public void execute() { String[] generatedNames = model.generateNames(50); view.setResult(Joiner.on("\n").join(generatedNames)); } }); }
protected String getString(String key) { return resources.getString(key); }
@Override public String getTitle() { return resources.getString("Sheet.Magic.Name"); }
public String getLabel(CharacterType type) { return resources.getString("CharacterGenerator.NewCharacter." + type.getId() + ".Name"); }
@Override protected String labelForExistingValue(Spell value) { return resources.getString(value.getId()); }