Search in sources :

Example 1 with ClassPointRewardFilter

use of delta.games.lotro.common.rewards.filters.ClassPointRewardFilter in project lotro-companion by dmorcellet.

the class DeedFilterController method buildClassPointsCombobox.

private ComboBoxController<Boolean> buildClassPointsCombobox() {
    ComboBoxController<Boolean> combo = build3StatesBooleanCombobox();
    ItemSelectionListener<Boolean> listener = new ItemSelectionListener<Boolean>() {

        @Override
        public void itemSelected(Boolean value) {
            ClassPointRewardFilter filter = _filter.getClassPointsFilter();
            filter.setHasClassPointFlag(value);
            filterUpdated();
        }
    };
    combo.addListener(listener);
    return combo;
}
Also used : ItemSelectionListener(delta.common.ui.swing.combobox.ItemSelectionListener) ClassPointRewardFilter(delta.games.lotro.common.rewards.filters.ClassPointRewardFilter)

Example 2 with ClassPointRewardFilter

use of delta.games.lotro.common.rewards.filters.ClassPointRewardFilter in project lotro-companion by dmorcellet.

the class DeedFilterController method setFilter.

private void setFilter() {
    // Name
    DeedNameFilter nameFilter = _filter.getNameFilter();
    String contains = nameFilter.getPattern();
    if (contains != null) {
        _contains.setText(contains);
    }
    // Type
    DeedTypeFilter typeFilter = _filter.getTypeFilter();
    DeedType type = typeFilter.getDeedType();
    _type.selectItem(type);
    // Category
    DeedCategoryFilter categoryFilter = _filter.getCategoryFilter();
    String category = categoryFilter.getDeedCategory();
    _category.selectItem(category);
    // Requirements:
    // - class
    DeedClassRequirementFilter classFilter = _filter.getClassFilter();
    CharacterClass requiredClass = classFilter.getCharacterClass();
    _class.selectItem(requiredClass);
    // - race
    DeedRaceRequirementFilter raceFilter = _filter.getRaceFilter();
    Race requiredRace = raceFilter.getRace();
    _race.selectItem(requiredRace);
    // Rewards:
    // Reputation
    ReputationRewardFilter factionFilter = _filter.getReputationFilter();
    Faction faction = factionFilter.getFaction();
    _reputation.selectItem(faction);
    // LOTRO points
    LotroPointsRewardFilter lotroPointsFilter = _filter.getLotroPointsFilter();
    Boolean lotroPoints = lotroPointsFilter.getHasLotroPointsFlag();
    _lotroPoints.selectItem(lotroPoints);
    // Class point
    ClassPointRewardFilter classPointFilter = _filter.getClassPointsFilter();
    Boolean classPoint = classPointFilter.getHasClassPointFlag();
    _classPoints.selectItem(classPoint);
    // Trait
    TraitRewardFilter traitFilter = _filter.getTraitFilter();
    String trait = traitFilter.getTrait();
    _trait.selectItem(trait);
    // Skill
    SkillRewardFilter skillFilter = _filter.getSkillFilter();
    String skill = skillFilter.getSkill();
    _skill.selectItem(skill);
    // Title
    TitleRewardFilter titleFilter = _filter.getTitleFilter();
    String title = titleFilter.getTitle();
    _title.selectItem(title);
    // Virtue
    VirtueRewardFilter virtueFilter = _filter.getVirtueFilter();
    VirtueId virtueId = virtueFilter.getVirtueId();
    _virtue.selectItem(virtueId);
    // Emote
    EmoteRewardFilter emoteFilter = _filter.getEmoteFilter();
    String emote = emoteFilter.getEmote();
    _emote.selectItem(emote);
    // Item
    ItemRewardFilter itemFilter = _filter.getItemFilter();
    Integer itemId = itemFilter.getItemId();
    _item.selectItem(itemId);
}
Also used : DeedRaceRequirementFilter(delta.games.lotro.lore.deeds.filters.DeedRaceRequirementFilter) TitleRewardFilter(delta.games.lotro.common.rewards.filters.TitleRewardFilter) DeedTypeFilter(delta.games.lotro.lore.deeds.filters.DeedTypeFilter) CharacterClass(delta.games.lotro.common.CharacterClass) SkillRewardFilter(delta.games.lotro.common.rewards.filters.SkillRewardFilter) EmoteRewardFilter(delta.games.lotro.common.rewards.filters.EmoteRewardFilter) TraitRewardFilter(delta.games.lotro.common.rewards.filters.TraitRewardFilter) VirtueId(delta.games.lotro.common.VirtueId) ReputationRewardFilter(delta.games.lotro.common.rewards.filters.ReputationRewardFilter) Race(delta.games.lotro.common.Race) DeedCategoryFilter(delta.games.lotro.lore.deeds.filters.DeedCategoryFilter) LotroPointsRewardFilter(delta.games.lotro.common.rewards.filters.LotroPointsRewardFilter) DeedClassRequirementFilter(delta.games.lotro.lore.deeds.filters.DeedClassRequirementFilter) DeedNameFilter(delta.games.lotro.lore.deeds.filters.DeedNameFilter) DeedType(delta.games.lotro.lore.deeds.DeedType) ItemRewardFilter(delta.games.lotro.common.rewards.filters.ItemRewardFilter) Faction(delta.games.lotro.lore.reputation.Faction) ClassPointRewardFilter(delta.games.lotro.common.rewards.filters.ClassPointRewardFilter) VirtueRewardFilter(delta.games.lotro.common.rewards.filters.VirtueRewardFilter)

Aggregations

ClassPointRewardFilter (delta.games.lotro.common.rewards.filters.ClassPointRewardFilter)2 ItemSelectionListener (delta.common.ui.swing.combobox.ItemSelectionListener)1 CharacterClass (delta.games.lotro.common.CharacterClass)1 Race (delta.games.lotro.common.Race)1 VirtueId (delta.games.lotro.common.VirtueId)1 EmoteRewardFilter (delta.games.lotro.common.rewards.filters.EmoteRewardFilter)1 ItemRewardFilter (delta.games.lotro.common.rewards.filters.ItemRewardFilter)1 LotroPointsRewardFilter (delta.games.lotro.common.rewards.filters.LotroPointsRewardFilter)1 ReputationRewardFilter (delta.games.lotro.common.rewards.filters.ReputationRewardFilter)1 SkillRewardFilter (delta.games.lotro.common.rewards.filters.SkillRewardFilter)1 TitleRewardFilter (delta.games.lotro.common.rewards.filters.TitleRewardFilter)1 TraitRewardFilter (delta.games.lotro.common.rewards.filters.TraitRewardFilter)1 VirtueRewardFilter (delta.games.lotro.common.rewards.filters.VirtueRewardFilter)1 DeedType (delta.games.lotro.lore.deeds.DeedType)1 DeedCategoryFilter (delta.games.lotro.lore.deeds.filters.DeedCategoryFilter)1 DeedClassRequirementFilter (delta.games.lotro.lore.deeds.filters.DeedClassRequirementFilter)1 DeedNameFilter (delta.games.lotro.lore.deeds.filters.DeedNameFilter)1 DeedRaceRequirementFilter (delta.games.lotro.lore.deeds.filters.DeedRaceRequirementFilter)1 DeedTypeFilter (delta.games.lotro.lore.deeds.filters.DeedTypeFilter)1 Faction (delta.games.lotro.lore.reputation.Faction)1