stella.jview
Class JTargetHistory.TargetNameFormat

java.lang.Object
  extended by java.text.Format
      extended by java.text.NumberFormat
          extended by stella.jview.JTargetHistory.TargetNameFormat
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
JTargetHistory

private static class JTargetHistory.TargetNameFormat
extends NumberFormat

A special number formatter that translates the index of the target in y-direction to a target name.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.NumberFormat
NumberFormat.Field
 
Field Summary
private  List targetname
          The list of targets.
 
Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
 
Constructor Summary
private JTargetHistory.TargetNameFormat(Collection targets)
          Construct with a collection of targets.
 
Method Summary
 StringBuffer format(double index, StringBuffer append, FieldPosition fp)
          We round the double to a long and pass it to the date formatter.
 StringBuffer format(long index, StringBuffer append, FieldPosition fp)
          We constructe a date object from the argument and pass it to the date formatter specified on construct.
 Number parse(String text, ParsePosition pp)
          Parses a date using the underlying date formatter and returns the time in ms divided by the multiplication factor.
 
Methods inherited from class java.text.NumberFormat
clone, equals, format, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode
 
Methods inherited from class java.text.Format
format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetname

private List targetname
The list of targets.

Constructor Detail

JTargetHistory.TargetNameFormat

private JTargetHistory.TargetNameFormat(Collection targets)
Construct with a collection of targets. The collection must reflect the correct order.

Method Detail

format

public StringBuffer format(double index,
                           StringBuffer append,
                           FieldPosition fp)
We round the double to a long and pass it to the date formatter.

Specified by:
format in class NumberFormat
See Also:
format(long,StringBuffer,FieldPosition)

format

public StringBuffer format(long index,
                           StringBuffer append,
                           FieldPosition fp)
We constructe a date object from the argument and pass it to the date formatter specified on construct.

Specified by:
format in class NumberFormat

parse

public Number parse(String text,
                    ParsePosition pp)
Parses a date using the underlying date formatter and returns the time in ms divided by the multiplication factor.

Specified by:
parse in class NumberFormat