use of name.abuchen.portfolio.ui.Sidebar.Entry in project portfolio by buchen.
the class ClientEditorSidebar method addAndOpenTaxonomy.
private void addAndOpenTaxonomy(Taxonomy taxonomy) {
editor.getClient().addTaxonomy(taxonomy);
editor.markDirty();
Entry entry = createTaxonomyEntry(taxonomies, taxonomy);
sidebar.select(entry);
sidebar.layout();
scrolledComposite.setMinSize(sidebar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
use of name.abuchen.portfolio.ui.Sidebar.Entry in project portfolio by buchen.
the class ClientEditorSidebar method createTaxonomyDataSection.
private void createTaxonomyDataSection(final Sidebar sidebar) {
taxonomies = new Entry(sidebar, Messages.LabelTaxonomies);
taxonomies.setAction(new Action(Messages.LabelTaxonomies, Images.PLUS.descriptor()) {
@Override
public void run() {
showCreateTaxonomyMenu();
}
});
for (Taxonomy taxonomy : editor.getClient().getTaxonomies()) createTaxonomyEntry(taxonomies, taxonomy);
}
use of name.abuchen.portfolio.ui.Sidebar.Entry in project portfolio by buchen.
the class ClientEditorSidebar method createTaxonomyEntry.
private Entry createTaxonomyEntry(Entry section, final Taxonomy taxonomy) {
Entry entry = new Entry(section, taxonomy.getName());
// $NON-NLS-1$
entry.setAction(new ActivateViewAction(taxonomy.getName(), "taxonomy.Taxonomy", taxonomy, null));
entry.setContextMenu((e, m) -> taxonomyContextMenuAboutToShow(taxonomy, e, m));
return entry;
}
use of name.abuchen.portfolio.ui.Sidebar.Entry in project portfolio by buchen.
the class ClientEditorSidebar method createMasterDataSection.
private void createMasterDataSection(Sidebar sidebar) {
Entry section = new Entry(sidebar, Messages.ClientEditorLabelClientMasterData);
new Entry(section, new // $NON-NLS-1$
ActivateViewAction(// $NON-NLS-1$
Messages.LabelAccounts, // $NON-NLS-1$
"AccountList", Images.ACCOUNT.descriptor())).setContextMenu(setAsStartPage);
new Entry(section, new // $NON-NLS-1$
ActivateViewAction(// $NON-NLS-1$
Messages.LabelPortfolios, // $NON-NLS-1$
"PortfolioList", Images.PORTFOLIO.descriptor())).setContextMenu(setAsStartPage);
new Entry(section, new // $NON-NLS-1$
ActivateViewAction(// $NON-NLS-1$
Messages.LabelInvestmentPlans, // $NON-NLS-1$
"InvestmentPlanList", Images.INVESTMENTPLAN.descriptor())).setContextMenu(setAsStartPage);
}
use of name.abuchen.portfolio.ui.Sidebar.Entry in project portfolio by buchen.
the class ClientEditorSidebar method createGeneralDataSection.
private void createGeneralDataSection(final Sidebar sidebar) {
final Entry section = new Entry(sidebar, Messages.LabelSecurities);
section.setAction(new Action(Messages.LabelSecurities, Images.PLUS.descriptor()) {
@Override
public void run() {
String name = askWatchlistName(Messages.WatchlistNewLabel);
if (name == null)
return;
Watchlist watchlist = new Watchlist();
watchlist.setName(name);
editor.getClient().getWatchlists().add(watchlist);
editor.markDirty();
createWatchlistEntry(section, watchlist);
sidebar.layout();
scrolledComposite.setMinSize(sidebar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
});
allSecurities = new Entry(section, new // $NON-NLS-1$
ActivateViewAction(// $NON-NLS-1$
Messages.LabelAllSecurities, // $NON-NLS-1$
"SecurityList", Images.SECURITY.descriptor()));
allSecurities.setContextMenu(setAsStartPage);
for (Watchlist watchlist : editor.getClient().getWatchlists()) createWatchlistEntry(section, watchlist);
}
Aggregations