use of delta.games.lotro.lore.crafting.ProfessionComparator in project lotro-companion by dmorcellet.
the class CraftingSynopsisTableController method buildProfessionColumn.
private TableColumnController<CraftingSynopsisItem, Profession> buildProfessionColumn() {
CellDataProvider<CraftingSynopsisItem, Profession> professionCell = new CellDataProvider<CraftingSynopsisItem, Profession>() {
@Override
public Profession getData(CraftingSynopsisItem item) {
return item.getProfession();
}
};
TableColumnController<CraftingSynopsisItem, Profession> professionColumn = new TableColumnController<CraftingSynopsisItem, Profession>("Profession", Profession.class, professionCell);
professionColumn.setWidthSpecs(50, 50, 50);
// Header renderer
JPanel emptyHeaderPanel = GuiFactory.buildBackgroundPanel(new GridBagLayout());
TableCellRenderer headerRenderer = buildSimpleCellRenderer(emptyHeaderPanel);
professionColumn.setHeaderCellRenderer(headerRenderer);
// Cell renderer
TableCellRenderer cellRenderer = buildProfessionCellRenderer();
professionColumn.setCellRenderer(cellRenderer);
// Comparator
ProfessionComparator comparator = new ProfessionComparator();
professionColumn.setComparator(comparator);
return professionColumn;
}
Aggregations