![]() |
Crossfire JXClient, Trunk
|
A GaugeUpdater which monitors a stat value. More...
Public Member Functions | |
void | dispose () |
Frees allocated resources. More... | |
StatGaugeUpdater (@NotNull final ExperienceTable experienceTable, final int stat, @NotNull final Stats stats, @NotNull final ItemSet itemSet) | |
Creates a new instance. More... | |
![]() | |
void | setGauge (@NotNull final GUIGaugeListener gauge) |
Sets the gauge to update. More... | |
Private Member Functions | |
void | updateExperienceNextLevel () |
Updates information for Stats#C_STAT_EXP_NEXT_LEVEL. More... | |
Private Attributes | |
boolean | active |
Whether the low food event should be generated. More... | |
final ItemSet | itemSet |
The ItemSet instance to watch. More... | |
final ItemSetListener | itemSetListener |
The listener to detect a changed player name. More... | |
final int | stat |
The stat value to monitor. More... | |
final Stats | stats |
The Stats instance to watch. More... | |
final StatsListener | statsListener |
The StatsListener registered to be notified about stat changes. More... | |
Static Private Attributes | |
static final int | LOWFOOD_LIMIT = 100 |
The LOWFOOD indicator is turned on if the FOOD value falls below this value. More... | |
Additional Inherited Members | |
![]() | |
GaugeUpdater (@NotNull final ExperienceTable experienceTable, final boolean hideIfEmpty) | |
Creates a new instance. More... | |
long | getExperienceToNextLevel (final int level, final long experience) |
Returns the experience needed to reach next level. More... | |
int | getPercentsToNextLevel (final int level, final long experience) |
Returns the experience fraction of the current level. More... | |
void | setValues (final int curValue, final int minValue, final int maxValue) |
Updates the gauge values. More... | |
void | setValues (final int curValue, final int minValue, final int maxValue, @NotNull final String labelText, @NotNull final String tooltipText) |
Updates the gauge values. More... | |
A GaugeUpdater which monitors a stat value.
Definition at line 39 of file StatGaugeUpdater.java.
com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.StatGaugeUpdater | ( | @NotNull final ExperienceTable | experienceTable, |
final int | stat, | ||
@NotNull final Stats | stats, | ||
@NotNull final ItemSet | itemSet | ||
) |
Creates a new instance.
experienceTable | the experience table to query |
stat | the stat value to monitor |
stats | the instance to watch |
itemSet | the item set to watch |
Definition at line 212 of file StatGaugeUpdater.java.
References com.realtime.crossfire.jxclient.items.ItemSet.addItemSetListener(), com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_GOLEM_HP, com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.experienceTable, com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.itemSet, com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.itemSetListener, com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.stat, com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.stats, and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.statsListener.
void com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.dispose | ( | ) |
Frees allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.
Definition at line 222 of file StatGaugeUpdater.java.
References com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.itemSet, com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.itemSetListener, com.realtime.crossfire.jxclient.stats.Stats.removeCrossfireStatsListener(), com.realtime.crossfire.jxclient.items.ItemSet.removeItemSetListener(), com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.stats, and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.statsListener.
|
private |
Updates information for Stats#C_STAT_EXP_NEXT_LEVEL.
Definition at line 230 of file StatGaugeUpdater.java.
References com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_LEVEL, com.realtime.crossfire.jxclient.util.Formatter.formatLong(), com.realtime.crossfire.jxclient.stats.Stats.getExperience(), com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.getExperienceToNextLevel(), com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.getPercentsToNextLevel(), com.realtime.crossfire.jxclient.stats.Stats.getStat(), com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.setValues(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.stats.
|
private |
Whether the low food event should be generated.
Definition at line 67 of file StatGaugeUpdater.java.
|
private |
The ItemSet instance to watch.
Definition at line 62 of file StatGaugeUpdater.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.dispose(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.StatGaugeUpdater().
|
private |
The listener to detect a changed player name.
Definition at line 191 of file StatGaugeUpdater.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.dispose(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.StatGaugeUpdater().
|
staticprivate |
The LOWFOOD indicator is turned on if the FOOD value falls below this value.
Definition at line 45 of file StatGaugeUpdater.java.
|
private |
The stat value to monitor.
Definition at line 50 of file StatGaugeUpdater.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.StatGaugeUpdater().
|
private |
The Stats instance to watch.
Definition at line 56 of file StatGaugeUpdater.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.dispose(), com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.StatGaugeUpdater(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.updateExperienceNextLevel().
|
private |
The StatsListener registered to be notified about stat changes.
Definition at line 73 of file StatGaugeUpdater.java.
Referenced by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.dispose(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.StatGaugeUpdater().