@@ -96,9 +96,11 @@ private void addComment(final Row row, final String label, final String text)
9696 }
9797 }
9898
99+ /** {@inheritDoc} */
99100 @ Override
100101 protected void printExportInfo (final PrintStream out ) throws Exception
101102 {
103+ // Called first and may throw Exception, so create workbook etc in here
102104 wb = new HSSFWorkbook ();
103105
104106 comment_style = wb .createCellStyle ();
@@ -120,6 +122,7 @@ protected void printExportInfo(final PrintStream out) throws Exception
120122 .createDataFormat ()
121123 .getFormat ("yyyy-mm-dd hh:mm:ss.000" ));
122124
125+ // Create sheet with summary of exported data
123126 sheet = wb .createSheet ("Archive Data" );
124127
125128 addComment (row = sheet .createRow (0 ), "Created by CS-Studio Data Browser" , null );
@@ -133,6 +136,10 @@ else if (source == Source.LINEAR_INTERPOLATION)
133136 addComment (row = sheet .createRow (row .getRowNum () + 1 ), "Interpolation Interval" , SecondsParser .formatSeconds (optimize_parameter ));
134137 }
135138
139+ /** @param row Row where to create time stamp cell
140+ * @param time Timestamp to place in cell
141+ * @return The cell in column 0 of row
142+ */
136143 private Cell createTimeCell (final Row row , final Instant time )
137144 {
138145 Cell cell = row .createCell (0 , CellType .NUMERIC );
@@ -146,6 +153,11 @@ private Cell createTimeCell(final Row row, final Instant time)
146153 return cell ;
147154 }
148155
156+ /** @param row Row where to create value cell
157+ * @param column Column index
158+ * @param value Value to show
159+ * @return Cell that was created for the value
160+ */
149161 private Cell createValueCell (final Row row , final int column , final VType value )
150162 {
151163 final Cell cell ;
@@ -179,6 +191,12 @@ else if (value == null)
179191 return cell ;
180192 }
181193
194+ /** Create basic value cell as well as optional min/max and sevr/stat cells
195+ * @param row Row where to create cells
196+ * @param column Index of first cell column
197+ * @param value Value to show in cell(s)
198+ * @return Last cell created
199+ */
182200 private Cell createValueCells (final Row row , final int column , final VType value )
183201 {
184202 Cell cell = createValueCell (row , column , value );
@@ -243,6 +261,7 @@ protected void performExport(final JobMonitor monitor, final PrintStream out) th
243261 wb .write (out );
244262 }
245263
264+ /** Export data in combined table */
246265 private void exportTable (final JobMonitor monitor ) throws Exception
247266 {
248267 // Spreadsheet data header
@@ -305,6 +324,7 @@ private void exportTable(final JobMonitor monitor) throws Exception
305324 iter .close ();
306325 }
307326
327+ /** Export data as list of single-channel tables */
308328 private void exportList (final JobMonitor monitor ) throws Exception
309329 {
310330 for (ModelItem item : model .getItems ())
0 commit comments