| | |
| | |
|
| | | private final JLabel branchLabel;
|
| | |
|
| | | public MessageRenderer() {
|
| | | this(null);
|
| | | }
|
| | |
|
| | | public MessageRenderer(GitblitClient gitblit) {
|
| | | super(new FlowLayout(FlowLayout.LEFT, 10, 1));
|
| | | this.gitblit = gitblit;
|
| | |
| | | .getForeground());
|
| | | SyndicatedEntryModel entry = (SyndicatedEntryModel) value;
|
| | |
|
| | | if (gitblit == null) {
|
| | | // no gitblit client, just display message
|
| | | messageLabel.setText(entry.title);
|
| | | } else {
|
| | | // show message in BOLD if its a new entry
|
| | | if (entry.published.after(gitblit.getLastFeedRefresh(entry.repository, entry.branch))) {
|
| | | messageLabel.setText("<html><body><b>" + entry.title);
|
| | | } else {
|
| | | messageLabel.setText(entry.title);
|
| | | }
|
| | | }
|
| | |
|
| | | // reset ref label
|
| | | branchLabel.setText("");
|