Class CountsLabel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
PlotStatsLabel

public class CountsLabel extends JLabel
Component whose text gives a number of (name, count) pairs.
Since:
29 Nov 2005
Author:
Mark Taylor
See Also:
  • Constructor Details

    • CountsLabel

      public CountsLabel(String[] titles)
      Constructs a new CountsLable with given count headings.
      Parameters:
      titles - count headings
  • Method Details

    • setValues

      public void setValues(int[] values)
      Sets the count values to report. The values array should generally have the same number of elements as the titles array given at construction time. It may however be null indicating no known values. Currently, each of the counts will be formatted in the same number of spaces as that of the longest (formatted) one. This is an attempt to reduce the amount of visual changes when the values are modified (only applies when used in certain ways, obviously).
      Parameters:
      values - values array