use of pcgen.facade.core.CharacterLevelsFacade.SkillBreakdown in project pcgen by PCGen.
the class SkillTreeViewModel method getData.
@Override
public Object getData(SkillFacade obj, int column) {
if (selectionModel.isSelectionEmpty()) {
switch(column) {
case 0:
case 1:
case 4:
return 0;
case 2:
return 0.0;
case 3:
case 5:
return null;
case 6:
return obj.getSource();
default:
return null;
}
}
int index = selectionModel.getMinSelectionIndex();
CharacterLevelFacade level = levels.getElementAt(index);
SkillBreakdown skillBreakdown = levels.getSkillBreakdown(level, obj);
switch(column) {
case 0:
return skillBreakdown.total;
case 1:
return skillBreakdown.modifier;
case 2:
return skillBreakdown.ranks;
case 3:
return levels.getSkillCost(level, obj) == SkillCost.CLASS ? //$NON-NLS-1$
LanguageBundle.getString("in_yes") : //$NON-NLS-1$
LanguageBundle.getString("in_no");
case 4:
return levels.getSkillCost(level, obj).getCost();
case 5:
return character.getInfoFactory().getDescription(obj);
case 6:
return obj.getSource();
default:
return null;
}
}
Aggregations