com.limegroup.gnutella.gui.statistics.panes
Interface StatisticDisplayer


public interface StatisticDisplayer

Interface for a class that visually displays a statistic or group of statistics, whether a graph, a table of stats, etc.


Method Summary
 javax.swing.JComponent getComponent()
          Returns the component that displays the statistic.
 void refresh()
          Refresh the stat data.
 void registerDualStatistic(com.limegroup.gnutella.statistics.Statistic stat0, com.limegroup.gnutella.statistics.Statistic stat1, java.lang.String displayName)
          Registered the specified two Statistics to be displayed.
 void registerStatistic(com.limegroup.gnutella.statistics.Statistic stat, java.lang.String displayName)
          Registered the specified Statistic for display, with the specified display name.
 void setWriteStatsToFile(boolean write)
          Sets whether or not the stats for this pane should be written out to files.
 

Method Detail

registerStatistic

public void registerStatistic(com.limegroup.gnutella.statistics.Statistic stat,
                              java.lang.String displayName)
Registered the specified Statistic for display, with the specified display name.

Parameters:
stat - the Statistic to register
displayName - the name for the statistic to display

registerDualStatistic

public void registerDualStatistic(com.limegroup.gnutella.statistics.Statistic stat0,
                                  com.limegroup.gnutella.statistics.Statistic stat1,
                                  java.lang.String displayName)
Registered the specified two Statistics to be displayed. This can be useful, for example, for a custom stat display that is calculated from two other statistics.

Parameters:
stat0 - the first Statistic to register
stat1 - the second Statistic to register
displayName - the name for the statistic to display

refresh

public void refresh()
Refresh the stat data.


setWriteStatsToFile

public void setWriteStatsToFile(boolean write)
Sets whether or not the stats for this pane should be written out to files.

Parameters:
write - specifies whether or not the stats should be written

getComponent

public javax.swing.JComponent getComponent()
Returns the component that displays the statistic.

Returns:
the component that displays the statistic