use of name.abuchen.portfolio.ui.util.ContextMenu in project portfolio by buchen.
the class AttributeListTab method createTab.
@Override
public CTabItem createTab(CTabFolder folder) {
Composite container = new Composite(folder, SWT.NONE);
TableColumnLayout layout = new TableColumnLayout();
container.setLayout(layout);
tableViewer = new TableViewer(container, SWT.FULL_SELECTION | SWT.MULTI);
ColumnEditingSupport.prepare(tableViewer);
ShowHideColumnHelper support = new ShowHideColumnHelper(AttributeListTab.class.getSimpleName(), preferences, tableViewer, layout);
addColumns(support);
support.createColumns();
tableViewer.getTable().setHeaderVisible(true);
tableViewer.getTable().setLinesVisible(true);
tableViewer.setContentProvider(new ArrayContentProvider());
tableViewer.setInput(client.getSettings().getAttributeTypes().toArray());
tableViewer.refresh();
new ContextMenu(tableViewer.getTable(), m -> fillContextMenu(m)).hook();
CTabItem item = new CTabItem(folder, SWT.NONE);
item.setText(Messages.AttributeTypeTitle);
item.setControl(container);
return item;
}
Aggregations