/**
* Shows the zk application statistic data. <br>
*/
private void showStatistic() {
/**
* These Statistic Class is activated in the zk.xml
*/
// Statistic stat = de.forsthaus.statistic.Statistic.getStatistic();
// new Statistic class since 20.08.2010
final FDStatistic stat = de.forsthaus.statistic.FDStatistic.getStatistic();
final Panel panel = new Panel();
panel.setWidth("400px");
panel.setBorder("normal");
panel.setStyle("align:left; color:red;");
panel.setParent(this.tableChildrenStatistic);
final Panelchildren panelchildren = new Panelchildren();
panelchildren.setParent(panel);
panelchildren.setStyle("background-color: #EBEBEB;");
final Caption caption = new Caption();
caption.setParent(panel);
caption.setImage("/images/icons/monitorView.gif");
caption.setLabel("Application Statistic");
caption.setStyle("color: #000000;font-weight:bold; text-align:left ");
final Grid grid = new Grid();
grid.setWidth("100%");
grid.setParent(panelchildren);
final Columns columns = new Columns();
columns.setSizable(true);
columns.setParent(grid);
final Column column1 = new Column();
column1.setWidth("65%");
column1.setLabel("Subject");
column1.setParent(columns);
final Column column2 = new Column();
column2.setWidth("35%");
column2.setLabel("value");
column2.setParent(columns);
final Rows rows = new Rows();
rows.setParent(grid);
// short date
String date = ZksampleDateFormat.getDateTimeFormater().format(stat.getStartTime());
addNewRow(rows, "Application Start-Time", date);
addNewRow(rows, "Application runing hours", getRoundedDouble(stat.getRuningHours()));
addNewRow(rows, "Count of active Desktops", String.valueOf(stat.getActiveDesktopCount()));
addNewRow(rows, "Count of active Sessions", String.valueOf(stat.getActiveSessionCount()));
addNewRow(rows, "Count of active Updates", String.valueOf(stat.getActiveUpdateCount()));
addNewRow(rows, "Average Count of active Desktops/hour", getRoundedDouble(stat.getAverageDesktopCount())); // String.valueOf(stat.getAverageDesktopCount()));
addNewRow(rows, "Average Count of active Sessions/hour", getRoundedDouble(stat.getAverageSessionCount()));
addNewRow(rows, "Average Count of active Updates/hour", getRoundedDouble(stat.getAverageUpdateCount()));
addNewRow(rows, "Count of total Desktops since start", String.valueOf(stat.getTotalDesktopCount()));
addNewRow(rows, "Count of total Sessions since start", String.valueOf(stat.getTotalSessionCount()));
addNewRow(rows, "Count of total Updates since start", String.valueOf(stat.getTotalUpdateCount()));
// Get the number of processors that are available for the JAVA VM
final int countCPU = Runtime.getRuntime().availableProcessors();
addNewRow(rows, "available CPUs to the JAVA VM", countCPU, "red");
}