Crossfire JXClient, Trunk
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater Class Referenceabstract
Inheritance diagram for com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater:
Collaboration graph

Public Member Functions

abstract void dispose ()
 
void setGauge (@NotNull final GUIGaugeListener gauge)
 

Protected Member Functions

 GaugeUpdater (@NotNull final ExperienceTable experienceTable, final boolean hideIfEmpty)
 
long getExperienceToNextLevel (final int level, final long experience)
 
int getPercentsToNextLevel (final int level, final long experience)
 
void setValues (final int curValue, final int minValue, final int maxValue)
 
void setValues (final int curValue, final int minValue, final int maxValue, @NotNull final String labelText, @NotNull final String tooltipText)
 

Private Attributes

final ExperienceTable experienceTable
 
GUIGaugeListener gauge
 
final boolean hideIfEmpty
 

Detailed Description

Updates the displayed values in a GUIGauge.

Author
Andreas Kirschbaum

Definition at line 33 of file GaugeUpdater.java.

Constructor & Destructor Documentation

◆ GaugeUpdater()

com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.GaugeUpdater ( @NotNull final ExperienceTable  experienceTable,
final boolean  hideIfEmpty 
)
protected

Creates a new instance.

Parameters
experienceTablethe experience table to query
hideIfEmptyif true the gauge will be hidden if all values are 0

Definition at line 57 of file GaugeUpdater.java.

References com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.experienceTable, and com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.hideIfEmpty.

Member Function Documentation

◆ dispose()

abstract void com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.dispose ( )
abstract

◆ getExperienceToNextLevel()

long com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.getExperienceToNextLevel ( final int  level,
final long  experience 
)
protected

Returns the experience needed to reach next level.

Parameters
levelthe level
experiencethe experience
Returns
the needed experience

Definition at line 128 of file GaugeUpdater.java.

References com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.experienceTable, and com.realtime.crossfire.jxclient.stats.ExperienceTable.getExperienceToNextLevel().

Referenced by com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.updateExperienceNextLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPercentsToNextLevel()

int com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.getPercentsToNextLevel ( final int  level,
final long  experience 
)
protected

Returns the experience fraction of the current level.

Parameters
levelthe level
experiencethe experience
Returns
the fraction in percents

Definition at line 118 of file GaugeUpdater.java.

References com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.experienceTable, and com.realtime.crossfire.jxclient.stats.ExperienceTable.getPercentsToNextLevel().

Referenced by com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater2.update(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.updateExperienceNextLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGauge()

void com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.setGauge ( @NotNull final GUIGaugeListener  gauge)

◆ setValues() [1/2]

void com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.setValues ( final int  curValue,
final int  minValue,
final int  maxValue 
)
protected

◆ setValues() [2/2]

void com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.setValues ( final int  curValue,
final int  minValue,
final int  maxValue,
@NotNull final String  labelText,
@NotNull final String  tooltipText 
)
protected

Updates the gauge values.

Parameters
curValuethe current value
minValuethe minimum value
maxValuethe maximum value
labelTextthe text to draw on the gauge
tooltipTextthe tooltip suffix

Definition at line 106 of file GaugeUpdater.java.

References com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.gauge, and com.realtime.crossfire.jxclient.gui.gauge.GUIGaugeListener.setValues().

Here is the call graph for this function:

Member Data Documentation

◆ experienceTable

final ExperienceTable com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.experienceTable
private

◆ gauge

GUIGaugeListener com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.gauge
private

◆ hideIfEmpty

final boolean com.realtime.crossfire.jxclient.gui.gauge.GaugeUpdater.hideIfEmpty
private

The documentation for this class was generated from the following file: