use of delta.games.lotro.stats.traitPoints.TraitPointsStatus in project lotro-companion by dmorcellet.
the class MainTestTraitPointsWindow method doIt.
private void doIt() {
CharacterFile file = new LotroTestUtils().getToonByName("Meva");
TraitPointsStatus status = new TraitPointsStatus();
CharacterSummary summary = file.getSummary();
TraitPointsEditionWindowController windowController = new TraitPointsEditionWindowController(null, summary, status);
windowController.show(true);
System.out.println(status);
}
use of delta.games.lotro.stats.traitPoints.TraitPointsStatus in project lotro-companion by dmorcellet.
the class CharacterFileWindowController method editTraitPoints.
private void editTraitPoints() {
CharacterSummary summary = _toon.getSummary();
TraitPointsStatus pointsStatus = TraitPoints.get().load(_toon);
TraitPointsEditionWindowController controller = new TraitPointsEditionWindowController(this, summary, pointsStatus);
TraitPointsStatus newStatus = controller.editModal();
if (newStatus != null) {
TraitPoints.get().save(_toon, newStatus);
}
}
use of delta.games.lotro.stats.traitPoints.TraitPointsStatus in project lotro-companion by dmorcellet.
the class TraitPointsStatusXMLParser method parseXML.
/**
* Parse the XML file.
* @param source Source file.
* @return Parsed status or <code>null</code>.
*/
public TraitPointsStatus parseXML(File source) {
TraitPointsStatus status = null;
Element root = DOMParsingTools.parse(source);
if (root != null) {
status = parseStatus(root);
}
return status;
}
use of delta.games.lotro.stats.traitPoints.TraitPointsStatus in project lotro-companion by dmorcellet.
the class TraitPointsStatusXMLParser method parseStatus.
private TraitPointsStatus parseStatus(Element root) {
TraitPointsStatus status = new TraitPointsStatus();
List<Element> pointTags = DOMParsingTools.getChildTagsByName(root, TraitPointsRegistryXMLConstants.TRAIT_POINT_TAG, false);
for (Element pointTag : pointTags) {
NamedNodeMap attrs = pointTag.getAttributes();
String id = DOMParsingTools.getStringAttribute(attrs, TraitPointsRegistryXMLConstants.TRAIT_POINT_ID_ATTR, null);
status.setStatus(id, true);
}
return status;
}
Aggregations