Search in sources :

Example 11 with LabelOnly

use of name.abuchen.portfolio.ui.util.LabelOnly in project portfolio by buchen.

the class DataSeriesConfig method menuAboutToShow.

@Override
public void menuAboutToShow(IMenuManager manager) {
    manager.appendToGroup(DashboardView.INFO_MENU_GROUP_NAME, new LabelOnly(dataSeries.getLabel()));
    MenuManager subMenu = new MenuManager(Messages.LabelDataSeries);
    subMenu.add(new LabelOnly(dataSeries.getLabel()));
    subMenu.add(new Separator());
    subMenu.add(new SimpleAction(Messages.MenuSelectDataSeries, a -> doAddSeries(false)));
    if (supportsBenchmarks)
        subMenu.add(new SimpleAction(Messages.MenuSelectBenchmarkDataSeries, a -> doAddSeries(true)));
    manager.add(subMenu);
}
Also used : Separator(org.eclipse.jface.action.Separator) Dashboard(name.abuchen.portfolio.model.Dashboard) MenuManager(org.eclipse.jface.action.MenuManager) DataSeries(name.abuchen.portfolio.ui.views.dataseries.DataSeries) SimpleAction(name.abuchen.portfolio.ui.util.SimpleAction) Display(org.eclipse.swt.widgets.Display) Collectors(java.util.stream.Collectors) List(java.util.List) IMenuManager(org.eclipse.jface.action.IMenuManager) Messages(name.abuchen.portfolio.ui.Messages) ListSelectionDialog(name.abuchen.portfolio.ui.dialogs.ListSelectionDialog) LabelOnly(name.abuchen.portfolio.ui.util.LabelOnly) DataSeriesLabelProvider(name.abuchen.portfolio.ui.views.dataseries.DataSeriesLabelProvider) LabelOnly(name.abuchen.portfolio.ui.util.LabelOnly) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) SimpleAction(name.abuchen.portfolio.ui.util.SimpleAction) Separator(org.eclipse.jface.action.Separator)

Aggregations

LabelOnly (name.abuchen.portfolio.ui.util.LabelOnly)11 IMenuManager (org.eclipse.jface.action.IMenuManager)8 Messages (name.abuchen.portfolio.ui.Messages)7 SimpleAction (name.abuchen.portfolio.ui.util.SimpleAction)7 Action (org.eclipse.jface.action.Action)7 MenuManager (org.eclipse.jface.action.MenuManager)6 Separator (org.eclipse.jface.action.Separator)6 List (java.util.List)4 Images (name.abuchen.portfolio.ui.Images)4 SWT (org.eclipse.swt.SWT)4 Composite (org.eclipse.swt.widgets.Composite)4 Display (org.eclipse.swt.widgets.Display)4 Client (name.abuchen.portfolio.model.Client)3 Collections (java.util.Collections)2 Collectors (java.util.stream.Collectors)2 Inject (javax.inject.Inject)2 Dashboard (name.abuchen.portfolio.model.Dashboard)2 Security (name.abuchen.portfolio.model.Security)2 CurrencyConverter (name.abuchen.portfolio.money.CurrencyConverter)2 CurrencyConverterImpl (name.abuchen.portfolio.money.CurrencyConverterImpl)2