+ setCurrentTitle(meta.getTitle());
+
+ table.setRowData(new String[][] { //
+ new String[] { " Author", meta.getAuthor() }, //
+ new String[] { " Publication date", formatDate(meta.getDate()) },
+ new String[] { " Word count", format(meta.getWords()) },
+ new String[] { " Source", meta.getSource() } //
+ });
+ table.setHeaders(Arrays.asList("key", "value"), false);
+ table.toTop();
+ }
+
+ private String format(long value) {
+ String display = "";
+
+ while (value > 0) {
+ if (!display.isEmpty()) {
+ display = "." + display;
+ }
+ display = (value % 1000) + display;
+ value = value / 1000;
+ }
+
+ return display;
+ }
+
+ private String formatDate(String date) {
+ long ms = 0;
+
+ try {
+ ms = StringUtils.toTime(date);
+ } catch (ParseException e) {
+ }