com.limegroup.gnutella.gui.statistics
Class StatisticsConstructor

java.lang.Object
  extended bycom.limegroup.gnutella.gui.statistics.StatisticsConstructor

public final class StatisticsConstructor
extends java.lang.Object

This class constructs all of the elements of the statistics window. To add a new statistic, this class should be used. This class allows for statistics to be added to already existing panes as well as for statistics to be added to new panes that you can also add here. To add a new top-level pane, create a new StatisticsPaneImpl and call the addStatisticPane method. To add statistic items to that pane, add subclasses of AbstractPaneItem.


Constructor Summary
StatisticsConstructor(com.limegroup.gnutella.gui.statistics.StatisticsTreeManager treeManager, StatisticsPaneManager paneManager)
          The constructor create all of the statistics windows and their components.
 
Method Summary
static javax.swing.JComponent getComponent()
          Returns the main Component instance for the statistics window, allowing other components to position themselves accordingly.
static java.awt.Component getMainComponent()
          Returns the main Component instance for the statistics window, allowing other components to position themselves accordingly.
static javax.swing.JComponent getStatDisplayComponent()
          Accessor for the component that contains the displayed statistics, as opposed to the navigational component.
 boolean isStatisticsVisible()
          Returns if the statistics window is visible.
 void setStatisticsVisible(boolean visible)
          Makes the statistics window either visible or not visible depending on the boolean argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsConstructor

public StatisticsConstructor(com.limegroup.gnutella.gui.statistics.StatisticsTreeManager treeManager,
                             StatisticsPaneManager paneManager)
The constructor create all of the statistics windows and their components.

Parameters:
treeManager - the StatisticsTreeManager instance to use for constructing the main panels and adding elements
paneManager - the StatisticsPaneManager instance to use for constructing the main panels and adding elements
Method Detail

setStatisticsVisible

public void setStatisticsVisible(boolean visible)
Makes the statistics window either visible or not visible depending on the boolean argument.

Parameters:
visible - boolean value specifying whether the statistics window should be made visible or not visible

isStatisticsVisible

public boolean isStatisticsVisible()
Returns if the statistics window is visible.

Returns:
true if the statistics window is visible, false otherwise

getMainComponent

public static java.awt.Component getMainComponent()
Returns the main Component instance for the statistics window, allowing other components to position themselves accordingly.

Returns:
the main statistics Component window

getComponent

public static javax.swing.JComponent getComponent()
Returns the main Component instance for the statistics window, allowing other components to position themselves accordingly.

Returns:
the main statistics Component window

getStatDisplayComponent

public static javax.swing.JComponent getStatDisplayComponent()
Accessor for the component that contains the displayed statistics, as opposed to the navigational component.

Returns:
the component that contains the displayed statistics, as opposed to the navigational component