Crossfire JXClient, Trunk
Static Public Member Functions | Private Member Functions | List of all members
com.realtime.crossfire.jxclient.util.Formatter Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.util.Formatter:
Collaboration graph

Static Public Member Functions

static String formatFloat (final double value, final int digits)
 
static String formatLong (final long value)
 

Private Member Functions

 Formatter ()
 

Detailed Description

Utility class for formatting values into strings.

Author
Andreas Kirschbaum

Definition at line 31 of file Formatter.java.

Constructor & Destructor Documentation

◆ Formatter()

com.realtime.crossfire.jxclient.util.Formatter.Formatter ( )
private

Private constructor to prevent instantiation.

Definition at line 36 of file Formatter.java.

Member Function Documentation

◆ formatFloat()

static String com.realtime.crossfire.jxclient.util.Formatter.formatFloat ( final double  value,
final int  digits 
)
static

Formats a float value for display.

Parameters
valuethe float value
digitsthe number of fraction digits; must be between 1..3 inclusive
Returns
the formatted value

Definition at line 77 of file Formatter.java.

Referenced by com.realtime.crossfire.jxclient.gui.label.GUILabelStats.getTooltip().

Here is the caller graph for this function:

◆ formatLong()

static String com.realtime.crossfire.jxclient.util.Formatter.formatLong ( final long  value)
static

Returns a

long

value formatted as a human-readable string.

Parameters
valuethe value
Returns
return the formatted value

Definition at line 45 of file Formatter.java.

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

Here is the caller graph for this function:

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