Package name.abuchen.portfolio.ui.dialogs

Examples of name.abuchen.portfolio.ui.dialogs.CheckedListSelectionDialog


            return promptToSaveMultiple(dirtyParts);
    }

    private Save[] promptToSaveMultiple(Collection<MPart> dirtyParts)
    {
        CheckedListSelectionDialog dialog = new CheckedListSelectionDialog(Display.getDefault().getActiveShell(),
                        new PartLabelProvider());
        dialog.setTitle(Messages.SaveHandlerTitle);
        dialog.setMessage(Messages.SaveHandlerMsgSelectFileToSave);
        dialog.setElements(dirtyParts);

        int returnCode = dialog.open();

        Save[] answer = new Save[dirtyParts.size()];

        if (returnCode == Dialog.OK)
        {
            Arrays.fill(answer, Save.NO);
            if (dialog.getResult() != null)
            {
                List<MPart> parts = new ArrayList<MPart>(dirtyParts);
                for (Object toBeSaved : dialog.getResult())
                    answer[parts.indexOf(toBeSaved)] = Save.YES;
            }
        }
        else if (returnCode == Dialog.CANCEL)
        {
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.ui.dialogs.CheckedListSelectionDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.