Class ncsa.horizon.coordinates.formatters.
MetricVelocityFormatter
java.lang.Object
|
+--ncsa.horizon.coordinates.formatters.GenericAxisPosFormatter
|
+--ncsa.horizon.coordinates.formatters.MetricAxisPosFormatter
|
+--ncsa.horizon.coordinates.formatters.MetricVelocityFormatter
- public class MetricVelocityFormatter
- extends MetricAxisPosFormatter
support for printing out velocities (double values) as floating
point numbers appended by a metric velocity unit.
- See Also:
- Serialized Form
|
Field Summary
|
|
static java.lang.String
|
myname
|
|
static java.lang.String
|
velAbbrev
|
|
static java.lang.String
|
velUnit
|
| Fields inherited from class ncsa.horizon.coordinates.formatters.MetricAxisPosFormatter |
| abbmap, abbreviate, abbreviations, abbrevList, fixed, ipower, minpow, myname, opower, powerList, prefixes, prefixList, prefmap, unit |
|
Constructor Summary
|
MetricVelocityFormatter()
format velocity values with "m/s" as the unit assuming that the
native unit of the values is meters/second. |
MetricVelocityFormatter(boolean useAbbreviation)
format velocity values assuming that the
native unit of the values is meters/second. |
MetricVelocityFormatter(int inPower,
boolean useAbbreviation)
format velocity values assuming that the
native unit of the values is meters/second. |
MetricVelocityFormatter(int inPower,
boolean useAbbreviation,
int outPower)
format frequencies using the prefix for the specified power |
|
Method Summary
|
|
void
|
initialize()
loads the prefix and abbreviation lists |
|
void
|
setAbbreviated(boolean useAbbreviation)
set whether abbreviations are used |
| Methods inherited from class ncsa.horizon.coordinates.formatters.MetricAxisPosFormatter |
| AbbrevFor, clone, fixPrefix, fixPrefix, freePrefix, getDefPrefixPower, initialize, isAbbreviated, isFixed, main, maxPower, prefixFor, revmap, scaleValue, setAbbreviated, setMinPower, setUnit, setUnitPower, toString, toString, useAbbrev, usePrefix, valueOf |
| Methods inherited from class java.lang.Object |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
velUnit
protected static java.lang.String velUnit
velAbbrev
protected static java.lang.String velAbbrev
myname
protected static final java.lang.String myname
MetricVelocityFormatter
public MetricVelocityFormatter()
- format velocity values with "m/s" as the unit assuming that the
native unit of the values is meters/second.
MetricVelocityFormatter
public MetricVelocityFormatter(boolean useAbbreviation)
- format velocity values assuming that the
native unit of the values is meters/second.
- Parameters:
useAbbreviation
- if true, an abbreviation should be used.
MetricVelocityFormatter
public MetricVelocityFormatter(int inPower,
boolean useAbbreviation)
- format velocity values assuming that the
native unit of the values is meters/second.
- Parameters:
inPower
- assume that values input to toString(double) will
be in units of 10^inPower, relative to unit
useAbbreviation
- if true, an abbreviation should be used.
MetricVelocityFormatter
public MetricVelocityFormatter(int inPower,
boolean useAbbreviation,
int outPower)
- format frequencies using the prefix for the specified power
- Parameters:
inPower
- assume that values input to toString(double) will
be in units of 10^inPower, relative to unit
useAbbreviation
- if true, the prefix abbreviation should be
used.
outPower
- the power for the prefix to be used; if a prefix
for this power is not known, the highest valued
prefix that is less than request will be used.
initialize
protected void initialize()
- loads the prefix and abbreviation lists
- Overrides:
- initialize in class MetricAxisPosFormatter
setAbbreviated
public void setAbbreviated(boolean useAbbreviation)
- set whether abbreviations are used
- Overrides:
- setAbbreviated in class MetricAxisPosFormatter