use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class FeedsPanel method getSelectedSyndicatedEntry.
protected FeedEntryModel getSelectedSyndicatedEntry() {
int viewRow = table.getSelectedRow();
int modelRow = table.convertRowIndexToModel(viewRow);
FeedEntryModel entry = tableModel.get(modelRow);
return entry;
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class SearchDialog method viewCommit.
protected void viewCommit() {
FeedEntryModel entry = getSelectedSyndicatedEntry();
Utils.browse(entry.link);
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class SearchDialog method getSelectedSyndicatedEntry.
protected FeedEntryModel getSelectedSyndicatedEntry() {
int viewRow = table.getSelectedRow();
int modelRow = table.convertRowIndexToModel(viewRow);
FeedEntryModel entry = tableModel.get(modelRow);
return entry;
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class SearchDialog method viewCommitDiff.
protected void viewCommitDiff() {
FeedEntryModel entry = getSelectedSyndicatedEntry();
Utils.browse(entry.link.replace("/commit/", "/commitdiff/"));
}
use of com.gitblit.models.FeedEntryModel in project gitblit by gitblit.
the class FeedsPanel method updateTable.
protected void updateTable(boolean pack) {
tableModel.entries.clear();
tableModel.entries.addAll(gitblit.getSyndicatedEntries());
tableModel.fireTableDataChanged();
header.setText(Translation.get("gb.activity") + " (" + gitblit.getSyndicatedEntries().size() + (page > 0 ? (", pg " + (page + 1)) : "") + ")");
if (pack) {
Utils.packColumns(table, Utils.MARGIN);
}
table.scrollRectToVisible(new Rectangle(table.getCellRect(0, 0, true)));
if (page == 0) {
// determine unique repositories
Set<String> uniqueRepositories = new HashSet<String>();
for (FeedEntryModel entry : tableModel.entries) {
uniqueRepositories.add(entry.repository);
}
// repositories
List<String> sortedRespositories = new ArrayList<String>(uniqueRepositories);
StringUtils.sortRepositorynames(sortedRespositories);
repositoryChoices.removeAllElements();
repositoryChoices.addElement(ALL);
for (String repo : sortedRespositories) {
repositoryChoices.addElement(repo);
}
}
// update pagination buttons
next.setEnabled(tableModel.entries.size() > 0);
prev.setEnabled(page > 0);
}
Aggregations