Search in sources :

Example 1 with BonusChangeFacet

use of pcgen.cdom.facet.BonusChangeFacet in project pcgen by PCGen.

the class CharacterLevelsFacadeImpl method initForCharacter.

/**
	 * Initialise the instance for the current character. 
	 */
private void initForCharacter() {
    classLevels = new ArrayList<>();
    charLevels = new ArrayList<>();
    refreshClassList();
    charID = theCharacter.getCharID();
    SkillFacet skillFacet = FacetLibrary.getFacet(SkillFacet.class);
    skillFacet.addDataFacetChangeListener(this);
    BonusChangeFacet bcf = FacetLibrary.getFacet(BonusChangeFacet.class);
    for (SkillFacade skillFacade : dataSetFacade.getSkills()) {
        bcf.addBonusChangeListener(this, "SKILLRANK", skillFacade.getKeyName().toUpperCase());
    }
}
Also used : BonusChangeFacet(pcgen.cdom.facet.BonusChangeFacet) SkillFacade(pcgen.facade.core.SkillFacade) SkillFacet(pcgen.cdom.facet.model.SkillFacet)

Example 2 with BonusChangeFacet

use of pcgen.cdom.facet.BonusChangeFacet in project pcgen by PCGen.

the class CharacterLevelsFacadeImpl method closeCharacter.

/**
	 * Tidy up character listeners when closing the character. 
	 */
protected void closeCharacter() {
    SkillFacet skillFacet = FacetLibrary.getFacet(SkillFacet.class);
    skillFacet.removeDataFacetChangeListener(this);
    BonusChangeFacet bcf = FacetLibrary.getFacet(BonusChangeFacet.class);
    for (SkillFacade skillFacade : dataSetFacade.getSkills()) {
        bcf.removeBonusChangeListener(this, "SKILLRANK", skillFacade.getKeyName().toUpperCase());
    }
    theCharacter = null;
    charDisplay = null;
    charID = null;
}
Also used : BonusChangeFacet(pcgen.cdom.facet.BonusChangeFacet) SkillFacade(pcgen.facade.core.SkillFacade) SkillFacet(pcgen.cdom.facet.model.SkillFacet)

Aggregations

BonusChangeFacet (pcgen.cdom.facet.BonusChangeFacet)2 SkillFacet (pcgen.cdom.facet.model.SkillFacet)2 SkillFacade (pcgen.facade.core.SkillFacade)2