java.lang.Object com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater
public class StatGaugeUpdater
A GaugeUpdater
which monitors a stat value.
Field Summary | |
---|---|
private boolean |
active
Whether the low food event should be generated. |
private ItemSet |
itemSet
The ItemSet instance to watch. |
private ItemSetListener |
itemSetListener
The listener to detect a changed player name. |
private static int |
LOWFOOD_LIMIT
The LOWFOOD indicator is turned on if the FOOD value falls below this value. |
private int |
stat
The stat value to monitor. |
private Stats |
stats
The Stats instance to watch. |
private StatsListener |
statsListener
The StatsListener registered to be notified about stat changes. |
Constructor Summary | |
---|---|
StatGaugeUpdater(ExperienceTable experienceTable,
int stat,
Stats stats,
ItemSet itemSet)
Creates a new instance. |
Method Summary | |
---|---|
void |
dispose()
Frees allocated resources. |
private void |
updateExperienceNextLevel()
Updates information for CrossfireStatsListener.C_STAT_EXP_NEXT_LEVEL . |
Methods inherited from class com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater |
---|
getExperienceToNextLevel, getPercentsToNextLevel, setGauge, setValues, setValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean active
@NotNull private final ItemSet itemSet
ItemSet
instance to watch.
@NotNull private final ItemSetListener itemSetListener
private static final int LOWFOOD_LIMIT
private final int stat
@NotNull private final Stats stats
Stats
instance to watch.
@NotNull private final StatsListener statsListener
StatsListener
registered to be notified about stat changes.
Constructor Detail |
---|
public StatGaugeUpdater(@NotNull ExperienceTable experienceTable, int stat, @NotNull Stats stats, @NotNull ItemSet itemSet)
experienceTable
- the experience table to querystat
- the stat value to monitorstats
- the instance to watchitemSet
- the item set to watchMethod Detail |
---|
public void dispose()
dispose
in class GaugeUpdater
private void updateExperienceNextLevel()
CrossfireStatsListener.C_STAT_EXP_NEXT_LEVEL
.