|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.GUIUtils
This class serves as a holder for any static gui convenience methods.
Field Summary | |
static java.lang.String |
GENERAL_UNIT_GIGABYTES
|
static java.lang.String |
GENERAL_UNIT_KBPSEC
|
static java.lang.String |
GENERAL_UNIT_KILOBYTES
Localizable constants |
static java.lang.String |
GENERAL_UNIT_MEGABYTES
|
static java.lang.String |
GENERAL_UNIT_TERABYTES
|
Method Summary | |
static MultiLineLabel |
getSizedLabel(java.lang.String msg)
Returns a label with multiple lines that is sized according to the string parameter. |
static java.lang.String |
msec2DateTime(long milliseconds)
Converts number of milliseconds since way back when to a local-formatted date String |
static java.lang.String |
rate2speed(double rate)
Converts an rate into a human readable and localized KB/s speed. |
static java.lang.String |
seconds2time(int seconds)
Converts a value in seconds to: "d:hh:mm:ss" where d=days, hh=hours, mm=minutes, ss=seconds, or "h:mm:ss" where h=hours<24, mm=minutes, ss=seconds, or "m:ss" where m=minutes<60, ss=seconds |
static java.lang.String |
speed2name(int rate)
Converts the following bandwidth value, in kbytes/second, to a human readable. |
static java.lang.String |
toKilobytes(long bytes)
This static method converts the passed in number of bytes into a kilobyte string grouping digits with locale-dependant thousand separator and with "KB" locale-dependant unit at the end. |
static java.lang.String |
toLocalizedInteger(long value)
This static method converts the passed in number into a localizable representation of an integer, with digit grouping using locale dependant separators. |
static java.lang.String |
toUnitbytes(long bytes)
Converts the passed in number of bytes into a byte-size string. |
static java.lang.String |
toUnitnumber(double value,
boolean allowFractional)
Converts the passed in number into a short localized string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String GENERAL_UNIT_KILOBYTES
public static final java.lang.String GENERAL_UNIT_MEGABYTES
public static final java.lang.String GENERAL_UNIT_GIGABYTES
public static final java.lang.String GENERAL_UNIT_TERABYTES
public static final java.lang.String GENERAL_UNIT_KBPSEC
Method Detail |
public static java.lang.String toLocalizedInteger(long value)
value
- the number to convert to a numeric String.
public static java.lang.String toKilobytes(long bytes)
bytes
- the number of bytes to convert to a kilobyte String.
bytes
argument evaluates to, with "KB" appended
at the end. If the input value is negative, the string
returned will be "? KB".public static java.lang.String toUnitbytes(long bytes)
bytes
- the number of bytes to convert to a size String.
bytes
argument evaluates to, with
"KB"/"MB"/"GB"/TB" appended at the end. If the input value is
negative, the string returned will be "? KB".public static java.lang.String toUnitnumber(double value, boolean allowFractional)
value
- the number of bytes to convert to a size String.allowFractional
- enables 1 fractional digit for values lower than
999.95; 1 fractional digit is always enabled
for values greater than or equal to 99999.5,
which have a unit appended.
String
representing the number that the
value
argument evaluates to, with a
possible "k"/"M"/"G"/T" unit appended at the end.public static MultiLineLabel getSizedLabel(java.lang.String msg)
msg
- the string that will be contained in the label.
public static java.lang.String speed2name(int rate)
public static java.lang.String rate2speed(double rate)
public static java.lang.String seconds2time(int seconds)
public static java.lang.String msec2DateTime(long milliseconds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |