Search in sources :

Example 1 with DetailedCharacterStatsWindowController

use of delta.games.lotro.gui.character.stats.details.DetailedCharacterStatsWindowController in project lotro-companion by dmorcellet.

the class CharacterStatsSummaryPanelController method update.

/**
 * Update contents.
 */
public void update() {
    STAT[] stats = STAT.values();
    int nbStats = stats.length;
    for (int i = 0; i < nbStats; i++) {
        String statValue = "";
        if (_toon != null) {
            BasicStatsSet characterStats = _toon.getStats();
            FixedDecimalsInteger value = characterStats.getStat(stats[i]);
            if (value != null) {
                statValue = String.valueOf(value.intValue());
            } else {
                statValue = "-";
            }
        }
        if (_statValues[i] != null) {
            _statValues[i].setText(statValue);
        }
    }
    DetailedCharacterStatsWindowController detailsStatsController = getDetailsController();
    if (detailsStatsController != null) {
        detailsStatsController.update();
    }
    StatContribsWindowController contribsController = getContribsController();
    if (contribsController != null) {
        contribsController.update();
    }
}
Also used : STAT(delta.games.lotro.character.stats.STAT) StatContribsWindowController(delta.games.lotro.gui.character.stats.contribs.StatContribsWindowController) FixedDecimalsInteger(delta.games.lotro.utils.FixedDecimalsInteger) DetailedCharacterStatsWindowController(delta.games.lotro.gui.character.stats.details.DetailedCharacterStatsWindowController) BasicStatsSet(delta.games.lotro.character.stats.BasicStatsSet)

Example 2 with DetailedCharacterStatsWindowController

use of delta.games.lotro.gui.character.stats.details.DetailedCharacterStatsWindowController in project lotro-companion by dmorcellet.

the class CharacterStatsSummaryPanelController method doDetails.

private void doDetails() {
    DetailedCharacterStatsWindowController detailsStatsController = getDetailsController();
    if (detailsStatsController == null) {
        detailsStatsController = new DetailedCharacterStatsWindowController(_parent, _toon);
        _childControllers.registerWindow(detailsStatsController);
        BasicStatsSet referenceStats = new BasicStatsSet(_toon.getStats());
        detailsStatsController.setStats(referenceStats, _toon.getStats());
        detailsStatsController.getWindow().setLocationRelativeTo(_parent.getWindow());
    }
    detailsStatsController.bringToFront();
}
Also used : DetailedCharacterStatsWindowController(delta.games.lotro.gui.character.stats.details.DetailedCharacterStatsWindowController) BasicStatsSet(delta.games.lotro.character.stats.BasicStatsSet)

Aggregations

BasicStatsSet (delta.games.lotro.character.stats.BasicStatsSet)2 DetailedCharacterStatsWindowController (delta.games.lotro.gui.character.stats.details.DetailedCharacterStatsWindowController)2 STAT (delta.games.lotro.character.stats.STAT)1 StatContribsWindowController (delta.games.lotro.gui.character.stats.contribs.StatContribsWindowController)1 FixedDecimalsInteger (delta.games.lotro.utils.FixedDecimalsInteger)1