ListTableModel<DaemonState> () { final ColumnInfo<DaemonState, String> pidColumn = new TableColumn(GradleBundle.message("column.name.daemon.PID"), 80) { @Nullable @Override public String valueOf(DaemonState daemonState) { return String.valueOf(daemonState.getPid()); } @Nullable @Override public Comparator<DaemonState> getComparator() { return Comparator.comparing(DaemonState::getPid); } }; final ColumnInfo<DaemonState, String> statusColumn = new TableColumn(GradleBundle.message("column.name.daemon.status"), 100) { @Nullable @Override public String valueOf(DaemonState daemonState) { return daemonState.getStatus(); } @Nullable @Override public Comparator<DaemonState> getComparator() { return Comparator.comparing(DaemonState::getStatus); } }; final ColumnInfo<DaemonState, String> timeColumn = new TableColumn(GradleBundle.message("column.name.daemon.timestamp"), 150) { @NotNull @Override public String valueOf(DaemonState daemonState) { return DateFormatUtil.formatPrettyDateTime(daemonState.getTimestamp()); } @Nullable @Override public Comparator<DaemonState> getComparator() { return Comparator.comparing(DaemonState::getTimestamp); } }; final ColumnInfo<DaemonState, String> infoColumn = new TableColumn(GradleBundle.message("column.name.daemon.info"), -1) { @NotNull @Override public String valueOf(DaemonState daemonState) { return daemonState.getVersion() != null ? daemonState.getVersion() : StringUtil.capitalize(daemonState.getReason()); } }; ColumnInfo[] columnInfos = new ColumnInfo[]{pidColumn, statusColumn, infoColumn, timeColumn}; return new ListTableModel<>(columnInfos, new ArrayList<>(), 3, SortOrder.DESCENDING); }