use of pcgen.core.Language in project pcgen by PCGen.
the class LanguageChooserFacadeImpl method refreshLangListContents.
/**
* Replace the contents of a list facade with the given languages.
*
* @param langList The source list of languages
* @param langListFacade The list facade to be populated
*/
private void refreshLangListContents(List<? extends Language> langList, DefaultListFacade<LanguageFacade> langListFacade) {
Collections.sort(langList);
langListFacade.clearContents();
for (Language language : langList) {
langListFacade.addElement(language);
}
}
use of pcgen.core.Language in project pcgen by PCGen.
the class StartingLanguageFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
CDOMObject cdo1 = new PCTemplate();
cdo1.setName("Template1");
CDOMObject cdo2 = new Race();
cdo2.setName("Race1");
Language l1 = new Language();
l1.setName("Language1");
Language l2 = new Language();
l2.setName("Language2");
CDOMDirectSingleRef<Language> ref1 = new CDOMDirectSingleRef<>(l1);
SimpleAssociatedObject apo1 = new SimpleAssociatedObject();
cdo1.putToList(Language.STARTING_LIST, ref1, apo1);
CDOMDirectSingleRef<Language> ref2 = new CDOMDirectSingleRef<>(l2);
SimpleAssociatedObject apo2 = new SimpleAssociatedObject();
cdo2.putToList(Language.STARTING_LIST, ref2, apo2);
source = new CDOMObject[] { cdo1, cdo2 };
target = new Language[] { l1, l2 };
}
Aggregations