Package com.salas.bb.core

Examples of com.salas.bb.core.GlobalController


    {
        final ITaggable[] taggables = getSelectedTaggables();

        if (taggables != null)
        {
            GlobalController controller = GlobalController.SINGLETON;
            MainFrame mainFrame = controller.getMainFrame();
            ITagsStorage tagsNetworker = controller.getTagsStorage();
            final AbstractTagsDialog dialog = getTagsDialog(mainFrame, tagsNetworker);

            GlobalModel model = GlobalModel.SINGLETON;
            final UserPreferences userPreferences = model.getUserPreferences();
View Full Code Here


     */
    private static void restoreSelection(IGuide aSelectedGuide, IFeed aSelectedFeed)
    {
        if (aSelectedFeed == null || aSelectedGuide == null) return;

        GlobalController controller = GlobalController.SINGLETON;
        if (controller != null)
        {
            // EDT !!!
            controller.selectGuide(aSelectedGuide, false);
            controller.selectFeed(aSelectedFeed);
        }
    }
View Full Code Here

     */
    public void actionPerformed(ActionEvent e)
    {
        SearchListener listener = new SearchListener();

        GlobalController controller = GlobalController.SINGLETON;
        SearchDialog dialog = new SearchDialog(controller.getMainFrame(),
            controller.getSearchEngine(), listener);

        dialog.open();
    }
View Full Code Here

            ResultItem item = list.getSelectedItem();
            if (item == null) return;

            Object obj = item.getObject();

            GlobalController controller = GlobalController.SINGLETON;
            if (obj instanceof IGuide)
            {
                IGuide guide = (IGuide)obj;
                controller.selectGuide(guide, false);
            } else if (obj instanceof IFeed)
            {
                IFeed feed = (IFeed)obj;
                selectFeed(feed);
            } else if (obj instanceof IArticle)
            {
                IArticle article = (IArticle)obj;
                controller.selectArticle(article);
            }
        }
View Full Code Here

         *
         * @param aFeed feed.
         */
        private void selectFeed(IFeed aFeed)
        {
            GlobalController aController = GlobalController.SINGLETON;
            IGuide[] guides = aFeed.getParentGuides();
            if (guides.length != 0)
            {
                aController.selectGuide(GlobalController.chooseBestGuide(guides), false);
                aController.selectFeed(aFeed, true);
            }
        }
View Full Code Here

    public void actionPerformed(ActionEvent e)
    {
        BloggingPreferences bloggingPreferences = GlobalModel.SINGLETON.getUserPreferences().getBloggingPreferences();
        if (type.isAvailable() && bloggingPreferences.getBlogsCount() > 0)
        {
            GlobalController controller = GlobalController.SINGLETON;

            TargetBlog targetBlog = bloggingPreferences.getDefaultBlog();

            String templateName = e.getActionCommand();
            if (!Templates.isExisting(templateName))
            {
                templateName = targetBlog.getTemplateName();

                // See if the user wants to change the template dynamically
                if ((e.getModifiers() & KeyEvent.SHIFT_MASK) != 0 && type.isTemplateChangeSupported())
                {
                    // Ask for mode in a popup menu and repeat the event
                    MainFrame frame = controller.getMainFrame();
                    Point point = MouseInfo.getPointerInfo().getLocation();
                    SwingUtilities.convertPointFromScreen(point, frame);

                    JPopupMenu menu = new JPopupMenu();
                    Collection<Template> templates = Templates.getUserTemplates().values();
                    for (Template template : templates)
                    {
                        menu.add(new PostToBlogTemplateAction(template.getName()));
                    }
                    menu.show(frame, (int)point.getX(), (int)point.getY());

                    return;
                }
            }

            AbstractPostEditor editor;
            MainFrame frame = controller.getMainFrame();
            FeatureManager fm = controller.getFeatureManager();
            boolean isRichEditor = bloggingPreferences.isRichEditor() || !fm.isPtbAdvanced();
            if (fm.isPtbAdvanced())
            {
                PostEditorAdv edAdv = new PostEditorAdv(frame, isRichEditor);
                java.util.List<TargetBlog> blogs = bloggingPreferences.getBlogs();
View Full Code Here

    {
        if (getLogger().isLoggable(Level.INFO)) getLogger().info("Terminating...");

        if (aDoNormalExit)
        {
            GlobalController controller = GlobalController.SINGLETON;
            if (controller != null)
            {
                controller.prepareToClose(true);
            }
        }

        System.exit(1);
    }
View Full Code Here

     */
    public void actionPerformed(ActionEvent e)
    {
        ActionListener listener = new WhatsHotListener();

        GlobalController controller = GlobalController.SINGLETON;
        GuidesSet set = controller.getModel().getGuidesSet();
        Dialog dialog = new Dialog(controller.getMainFrame(), new Engine(set), set, listener);

        dialog.open();
    }
View Full Code Here

     *
     * @return <code>TRUE</code> if action of this type is available.
     */
    public boolean isAvailable()
    {
        GlobalController controller = GlobalController.SINGLETON;
        GlobalModel model = controller.getModel();
        FeatureManager fm = controller.getFeatureManager();

        boolean ptbEnabled = fm.isPtbEnabled();
        boolean ptbAdvanced = fm.isPtbAdvanced();
        boolean blogRecordsPresent = model.getUserPreferences().getBloggingPreferences().getBlogsCount() > 0;

View Full Code Here

     *
     * @param searchFeed serach feed.
     */
    private void showSearchFeedProperties(final SearchFeed searchFeed)
    {
        GlobalController controller = GlobalController.SINGLETON;
        SearchFeedPropertiesDialog dialog =
            new SearchFeedPropertiesDialog(searchFeed, controller.getMainFrame());

        int articlesLimit = searchFeed.getArticlesLimit();
        String title = searchFeed.getBaseTitle();
        Query query = searchFeed.getQuery();
        boolean dedupEnabled = searchFeed.isDedupEnabled();
View Full Code Here

TOP

Related Classes of com.salas.bb.core.GlobalController

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.