Examples of AddGuideDialog


Examples of com.salas.bb.dialogs.guide.AddGuideDialog

        FeatureManager featureManager = GlobalController.SINGLETON.getFeatureManager();
        int pubLimit = featureManager.getPublicationLimit();
        boolean pubLimitReached = pubLimit > -1 && cgs.countPublishedGuides() >= pubLimit;

        boolean actAvailable = model.getServicePreferences().isAccountInformationEntered();
        AddGuideDialog dialog = new AddGuideDialog(controller.getMainFrame(), actAvailable, pubLimit, pubLimitReached);
        String urls = dialog.open(cgs);

        if (!dialog.hasBeenCanceled())
        {
            final String title = dialog.getGuideTitle();
            final String iconKey = dialog.getIconKey();
            final boolean autoFeedDiscovery = dialog.isAutoFeedDiscovery();

            StandardGuide guide = controller.createStandardGuide(title, iconKey, autoFeedDiscovery);
            if (guide != null)
            {
                // Propagate publishing information
                boolean publishingEnabled = dialog.isPublishingEnabled();
                guide.setPublishingEnabled(publishingEnabled);
                guide.setPublishingTitle(dialog.getPublishingTitle());
                guide.setPublishingTags(dialog.getPublishingTags());
                guide.setPublishingPublic(dialog.isPublishingPublic());
                guide.setPublishingRating(dialog.getPublishingRating() - 1);

                guide.setNotificationsAllowed(dialog.isNotificationsAllowed());

                ReadingList[] readingLists = dialog.getReadingLists();
                if (readingLists != null)
                {
                    for (ReadingList readingList : readingLists) guide.add(readingList);

                    // if there were reading lists -- update them immediately
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.