Search in sources :

Example 1 with CharacterEventType

use of delta.games.lotro.character.events.CharacterEventType in project lotro-companion by dmorcellet.

the class CraftingSynopsisPanelController method eventOccurred.

/**
 * Handle character events.
 * @param event Source event.
 */
@Override
public void eventOccurred(CharacterEvent event) {
    CharacterEventType type = event.getType();
    if (type == CharacterEventType.CHARACTER_CRAFTING_UPDATED) {
        CharacterFile toon = event.getToonFile();
        List<CharacterFile> currentToons = _tableController.getToons();
        if (currentToons.contains(toon)) {
            _tableController.updateToon(toon);
        }
    }
}
Also used : CharacterEventType(delta.games.lotro.character.events.CharacterEventType) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 2 with CharacterEventType

use of delta.games.lotro.character.events.CharacterEventType in project lotro-companion by dmorcellet.

the class ReputationSynopsisPanelController method eventOccurred.

/**
 * Handle character events.
 * @param event Source event.
 */
@Override
public void eventOccurred(CharacterEvent event) {
    CharacterEventType type = event.getType();
    if (type == CharacterEventType.CHARACTER_REPUTATION_UPDATED) {
        CharacterFile toon = event.getToonFile();
        List<CharacterFile> currentToons = _tableController.getToons();
        if (currentToons.contains(toon)) {
            _tableController.updateToon(toon);
        }
    }
}
Also used : CharacterEventType(delta.games.lotro.character.events.CharacterEventType) CharacterFile(delta.games.lotro.character.CharacterFile)

Example 3 with CharacterEventType

use of delta.games.lotro.character.events.CharacterEventType in project lotro-companion by dmorcellet.

the class AllEssencesEditionWindowController method eventOccurred.

/**
 * Handle character events.
 * @param event Source event.
 */
@Override
public void eventOccurred(CharacterEvent event) {
    CharacterEventType type = event.getType();
    if (type == CharacterEventType.CHARACTER_DATA_UPDATED) {
        CharacterData data = event.getToonData();
        if (data == _toon) {
            _editionController.update();
            getWindow().pack();
        }
    }
}
Also used : CharacterEventType(delta.games.lotro.character.events.CharacterEventType) CharacterData(delta.games.lotro.character.CharacterData)

Example 4 with CharacterEventType

use of delta.games.lotro.character.events.CharacterEventType in project lotro-companion by dmorcellet.

the class EssencesSummaryWindowController method eventOccurred.

/**
 * Handle character events.
 * @param event Source event.
 */
@Override
public void eventOccurred(CharacterEvent event) {
    CharacterEventType type = event.getType();
    if (type == CharacterEventType.CHARACTER_DATA_UPDATED) {
        CharacterData data = event.getToonData();
        if (data == _toon) {
            _summaryController.update();
            getWindow().pack();
        }
    }
}
Also used : CharacterEventType(delta.games.lotro.character.events.CharacterEventType) CharacterData(delta.games.lotro.character.CharacterData)

Example 5 with CharacterEventType

use of delta.games.lotro.character.events.CharacterEventType in project lotro-companion by dmorcellet.

the class CharacterDataTableController method eventOccurred.

/**
 * Handle character events.
 * @param event Source event.
 */
@Override
public void eventOccurred(CharacterEvent event) {
    CharacterEventType type = event.getType();
    if (type == CharacterEventType.CHARACTER_DATA_UPDATED) {
        CharacterData data = event.getToonData();
        _tableController.refresh(data);
    }
    if ((type == CharacterEventType.CHARACTER_DATA_ADDED) || (type == CharacterEventType.CHARACTER_DATA_REMOVED)) {
        _tableController.refresh();
    }
}
Also used : CharacterEventType(delta.games.lotro.character.events.CharacterEventType) CharacterData(delta.games.lotro.character.CharacterData)

Aggregations

CharacterEventType (delta.games.lotro.character.events.CharacterEventType)6 CharacterData (delta.games.lotro.character.CharacterData)4 CharacterFile (delta.games.lotro.character.CharacterFile)3 BasicStatsSet (delta.games.lotro.character.stats.BasicStatsSet)1 CharacterStatsComputer (delta.games.lotro.character.stats.CharacterStatsComputer)1