Class SimpleValueFormat

java.lang.Object
java.text.Format
org.yamcs.studio.data.vtype.ValueFormat
org.yamcs.studio.data.vtype.SimpleValueFormat
All Implemented Interfaces:
Serializable, Cloneable

public class SimpleValueFormat extends ValueFormat
Default implementation for formatting.
See Also:
  • Constructor Details

    • SimpleValueFormat

      public SimpleValueFormat(int maxElements)
      Formats any scalar and array, by using the server side formatting and limiting the elements of the array displayed to maxElements.
      Parameters:
      maxElements - maximum number of array elements converted to string
  • Method Details

    • format

      protected StringBuffer format(Scalar scalar, StringBuffer toAppendTo, FieldPosition pos)
      Description copied from class: ValueFormat
      Formats a scalar.
      Specified by:
      format in class ValueFormat
      Parameters:
      scalar - data object to format
      toAppendTo - output buffer
      pos - the field position
      Returns:
      the output buffer
    • format

      protected StringBuffer format(VNumberArray array, StringBuffer toAppendTo, FieldPosition pos)
      Formats a numeric array. This method can be overridden to change the way numeric arrays are formatted.
      Parameters:
      array - the array to format
      toAppendTo - the buffer to append to
      pos - the position of the field
      Returns:
      the string buffer
    • format

      protected StringBuffer format(List<String> data, StringBuffer toAppendTo, FieldPosition pos)
      Formats a string array. This method can be overridden to change the way string arrays are formatted.
      Parameters:
      data - the data to format
      toAppendTo - the buffer to append to
      pos - the position of the field
      Returns:
      the string buffer
    • format

      protected StringBuffer format(ListBoolean data, StringBuffer toAppendTo, FieldPosition pos)
      Formats a boolean array. This method can be overridden to change the way string arrays are formatted.
      Parameters:
      data - the data to format
      toAppendTo - the buffer to append to
      pos - the position of the field
      Returns:
      the string buffer
    • format

      protected StringBuffer format(Array array, StringBuffer toAppendTo, FieldPosition pos)
      Description copied from class: ValueFormat
      Formats an array.
      Specified by:
      format in class ValueFormat
      Parameters:
      array - data object to format
      toAppendTo - output buffer
      pos - the field position
      Returns:
      the output buffer