Search in sources :

Example 1 with StatContribsWindowController

use of delta.games.lotro.gui.character.stats.contribs.StatContribsWindowController 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 StatContribsWindowController

use of delta.games.lotro.gui.character.stats.contribs.StatContribsWindowController in project lotro-companion by dmorcellet.

the class CharacterStatsSummaryPanelController method doContribs.

private void doContribs() {
    StatContribsWindowController contribsController = getContribsController();
    if (contribsController == null) {
        contribsController = new StatContribsWindowController(_parent, _toon);
        _childControllers.registerWindow(contribsController);
        contribsController.update();
        contribsController.getWindow().setLocationRelativeTo(_parent.getWindow());
    }
    contribsController.bringToFront();
}
Also used : StatContribsWindowController(delta.games.lotro.gui.character.stats.contribs.StatContribsWindowController)

Aggregations

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