Examples of GlobalModel


Examples of com.salas.bb.core.GlobalModel

     * @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;

        return ptbEnabled && ptbAdvanced && blogRecordsPresent;
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     *
     * @param event original event object.
     */
    protected void doAction(ActionEvent event)
    {
        GlobalModel model = GlobalModel.SINGLETON;
        IFeed[] feeds = getFeeds();
        GlobalController.readFeeds(false, model.getSelectedGuide(), feeds);
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     *
     * @return feed.
     */
    protected IFeed getFeed()
    {
        GlobalModel model = GlobalModel.SINGLETON;
        return model.getSelectedFeed();
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     */
    protected void doAction(ActionEvent event)
    {
        GlobalController controller = GlobalController.SINGLETON;
        final MainFrame mainFrame = controller.getMainFrame();
        final GlobalModel model = controller.getModel();
        new BlogStarzDialog(mainFrame, model).open();
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     * @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 articleSelected = model.getSelectedArticle() != null;
        boolean manyArticlesSelected = articleSelected && model.getSelectedArticles().length > 1;
        boolean blogRecordsPresent = model.getUserPreferences().getBloggingPreferences().getBlogsCount() > 0;

        return ptbEnabled && blogRecordsPresent && articleSelected &&
            (!manyArticlesSelected || fm.isPtbAdvanced());
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

    public FeedDisplayAdapter(IFeedDisplay aDisplay)
    {
        display = aDisplay;
        display.addListener(new FeedDisplayListener());

        GlobalModel model = GlobalModel.SINGLETON;
        if (model != null)
        {
            UserPreferences prefs = model.getUserPreferences();
            initMarker(aDisplay, prefs);
        }
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

        aController.addControllerListener(this);
        if (aController.isInitializationFinished()) initializationFinished();

        connectionState.addPropertyChangeListener(new ConnectionStateListener());

        GlobalModel model = aController.getModel();
        guideSelected(model == null ? null : model.getSelectedGuide());
        feedSelected(model == null ? null : model.getSelectedFeed());
        articleSelected(model == null ? null : model.getSelectedArticle());
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     *
     * @param listURL URL of the list or <code>NULL</code> for no URL.
     */
    public static void subscribe(URL listURL)
    {
        GlobalModel model = GlobalController.SINGLETON.getModel();
        IGuide selectedGuide = model.getSelectedGuide();
        StandardGuide[] guides = model.getGuidesSet().getStandardGuides(null);

        SubscribeToReadingListDialog dialog = new SubscribeToReadingListDialog(
            GlobalController.SINGLETON.getMainFrame());
        dialog.open(guides, selectedGuide, listURL == null ? null : listURL.toString());
        if (!dialog.hasBeenCanceled())
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        GlobalModel model = GlobalModel.SINGLETON;
        IArticle[] articles = model.getSelectedArticles();
        if (articles == null) return;
       
        for (IArticle article : articles)
        {
            URL url = article.getLink();

            if (url != null)
            {
                // Register clickthrough
                IFeed feed = article.getFeed();
                if (feed != null) feed.setClickthroughs(feed.getClickthroughs() + 1);

                final UserPreferences preferences = model.getUserPreferences();
                BrowserLauncher.showDocument(url, preferences.getInternetBrowser());
            }
        }

        // Mark all articles as read
        GlobalController.readArticles(true,
            model.getSelectedGuide(),
            model.getSelectedFeed(),
            articles);
    }
View Full Code Here

Examples of com.salas.bb.core.GlobalModel

     *
     * @param event original event object.
     */
    protected void doAction(ActionEvent event)
    {
        GlobalModel model = GlobalModel.SINGLETON;

        IArticle selectedArticle = model.getSelectedArticle();
        if (selectedArticle != null)
        {
            boolean newRead = !selectedArticle.isRead();

            GlobalController.readArticles(newRead,
                model.getSelectedGuide(),
                model.getSelectedFeed(),
                model.getSelectedArticles());
        }
    }
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.