com.realtime.crossfire.jxclient.gui.gauge
Class StatGaugeUpdater

java.lang.Object
  extended by com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater
      extended by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater

public class StatGaugeUpdater
extends GaugeUpdater

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

active

private boolean active
Whether the low food event should be generated.


itemSet

@NotNull
private final ItemSet itemSet
The ItemSet instance to watch.


itemSetListener

@NotNull
private final ItemSetListener itemSetListener
The listener to detect a changed player name.


LOWFOOD_LIMIT

private static final int LOWFOOD_LIMIT
The LOWFOOD indicator is turned on if the FOOD value falls below this value.

See Also:
Constant Field Values

stat

private final int stat
The stat value to monitor.


stats

@NotNull
private final Stats stats
The Stats instance to watch.


statsListener

@NotNull
private final StatsListener statsListener
The StatsListener registered to be notified about stat changes.

Constructor Detail

StatGaugeUpdater

public StatGaugeUpdater(@NotNull
                        ExperienceTable experienceTable,
                        int stat,
                        @NotNull
                        Stats stats,
                        @NotNull
                        ItemSet itemSet)
Creates a new instance.

Parameters:
experienceTable - the experience table to query
stat - the stat value to monitor
stats - the instance to watch
itemSet - the item set to watch
Method Detail

dispose

public void dispose()
Frees allocated resources.

Specified by:
dispose in class GaugeUpdater

updateExperienceNextLevel

private void updateExperienceNextLevel()
Updates information for CrossfireStatsListener.C_STAT_EXP_NEXT_LEVEL.