Crossfire JXClient, Trunk
ActiveSkillGaugeUpdater.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff
19  * Copyright (C) 2006-2017,2019-2023 Andreas Kirschbaum
20  * Copyright (C) 2010-2012,2014-2018,2020-2023 Nicolas Weeger
21  */
22 
23 package com.realtime.crossfire.jxclient.gui.gauge;
24 
28 import org.jetbrains.annotations.NotNull;
29 
34 public class ActiveSkillGaugeUpdater extends GaugeUpdater {
35 
39  @NotNull
40  private final String skill;
41 
45  @NotNull
46  private final Stats stats;
47 
51  @NotNull
52  private final StatsListener statsListener = new StatsListener() {
53 
54  @Override
55  public void resetBefore() {
56  // ignore
57  }
58 
59  @Override
60  public void resetAfter() {
61  // ignore
62  }
63 
64  @Override
65  public void statChanged(final int statNo, final int value) {
66  // ignore
67  }
68 
69  @Override
70  public void simpleWeaponSpeedChanged(final boolean simpleWeaponSpeed) {
71  // ignore
72  }
73 
74  @Override
75  public void titleChanged(@NotNull final String title) {
76  // ignore
77  }
78 
79  @Override
80  public void godNameChanged(@NotNull final String godName) {
81  // ignore
82  }
83 
84  @Override
85  public void rangeChanged(@NotNull final String range) {
86  // ignore
87  }
88 
89  @Override
90  public void activeSkillChanged(@NotNull final String activeSkill) {
91  setValues(activeSkill.equals(skill) ? 1 : 0, 0, 1);
92  }
93 
94  @Override
95  public void experienceChanged(final long exp) {
96  // ignore
97  }
98 
99  @Override
100  public void experienceNextLevelChanged(final long expNextLevel) {
101  // ignore
102  }
103 
104  };
105 
112  public ActiveSkillGaugeUpdater(@NotNull final ExperienceTable experienceTable, @NotNull final String skill, @NotNull final Stats stats) {
113  super(experienceTable, false);
114  this.skill = skill;
115  this.stats = stats;
117  }
118 
119  @Override
120  public void dispose() {
122  }
123 
124 }
com.realtime.crossfire.jxclient
com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater.skill
final String skill
Definition: ActiveSkillGaugeUpdater.java:40
com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater
Definition: GaugeUpdater.java:33
com.realtime.crossfire.jxclient.stats.Stats
Definition: Stats.java:44
com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater.ActiveSkillGaugeUpdater
ActiveSkillGaugeUpdater(@NotNull final ExperienceTable experienceTable, @NotNull final String skill, @NotNull final Stats stats)
Definition: ActiveSkillGaugeUpdater.java:112
com.realtime.crossfire.jxclient.stats.StatsListener
Definition: StatsListener.java:32
com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater.dispose
void dispose()
Definition: ActiveSkillGaugeUpdater.java:120
com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater.stats
final Stats stats
Definition: ActiveSkillGaugeUpdater.java:46
com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater.statsListener
final StatsListener statsListener
Definition: ActiveSkillGaugeUpdater.java:52
com.realtime.crossfire.jxclient.stats.ExperienceTable
Definition: ExperienceTable.java:33
com.realtime.crossfire.jxclient.stats.Stats.addCrossfireStatsListener
void addCrossfireStatsListener(@NotNull final StatsListener statsListener)
Definition: Stats.java:963
com.realtime.crossfire
com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.experienceTable
final ExperienceTable experienceTable
Definition: GaugeUpdater.java:39
com.realtime
com
com.realtime.crossfire.jxclient.stats.Stats.removeCrossfireStatsListener
void removeCrossfireStatsListener(@NotNull final StatsListener statsListener)
Definition: Stats.java:971
com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.setValues
void setValues(final int curValue, final int minValue, final int maxValue)
Definition: GaugeUpdater.java:85
com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater
Definition: ActiveSkillGaugeUpdater.java:34
com.realtime.crossfire.jxclient.stats
Definition: ActiveSkillWatcher.java:23