Package com.salas.bb.core

Examples of com.salas.bb.core.GlobalController


        setEnabled(queryparam != null);
    }

    public void actionPerformed(ActionEvent e)
    {
        GlobalController controller = GlobalController.SINGLETON;
        QueryFeed feed = controller.createQueryFeed(null, queryname, QueryType.TYPE_TWITTER, queryparam, 30);
        controller.selectFeed(feed, true);
    }
View Full Code Here


     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        GlobalController controller = GlobalController.SINGLETON;
        final MainFrame mainFrame = controller.getMainFrame();
        IFeedDisplay feedDisplay = mainFrame.getArticlesListPanel().getFeedView();

        boolean selected = feedDisplay.selectNextArticle(INavigationModes.MODE_NORMAL);
        if (!selected)
        {
            IArticleListNavigationListener nav = controller.getNavigationListener();
            nav.nextFeed(INavigationModes.MODE_NORMAL);
        }
    }
View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        final GlobalController controller = GlobalController.SINGLETON;
        final GlobalModel model = controller.getModel();

        if (model != null)
        {
            final IGuide currentGuide = model.getSelectedGuide();
            final GuidesSet cgs = model.getGuidesSet();
View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        GlobalController controller = GlobalController.SINGLETON;
        final MainFrame mainFrame = controller.getMainFrame();
        IFeedDisplay feedDisplay = mainFrame.getArticlesListPanel().getFeedView();
        boolean selected = feedDisplay.selectPreviousArticle(INavigationModes.MODE_NORMAL);
        if (!selected)
        {
            IArticleListNavigationListener nav = controller.getNavigationListener();
            nav.prevFeed(INavigationModes.MODE_NORMAL);
        }
    }
View Full Code Here

    /** Invoked when an action occurs. */
    public void actionPerformed(ActionEvent e)
    {
        GlobalModel model = GlobalModel.SINGLETON;
        GlobalController controller = GlobalController.SINGLETON;
        GuidesList guidesList = controller.getMainFrame().getGudiesPanel().getGuidesList();

        GuidesSet set = model.getGuidesSet();

        IGuide selectedGuide = model.getSelectedGuide();

        sortGuidesSet(set);

        if (selectedGuide != null)
        {
            int index = controller.getGuidesListModel().indexOf(selectedGuide);
            if (index != -1) guidesList.getSelectionModel().setSelectionInterval(index, index);
        }
    }
View Full Code Here

        {
            userLinkPopupAdapter = new PopupAdapter()
            {
                protected JPopupMenu buildPopupMenu(MouseEvent anevent)
                {
                    GlobalController controller = GlobalController.SINGLETON;
                    MainFrame frame = controller.getMainFrame();
                    JPopupMenu menu = frame.createNonLockingPopupMenu("User Link");

                    FollowAction actFollow = FollowAction.getInstance();
                    SubscribeAction actSubscribe = (SubscribeAction)ActionManager.get(ActionsTable.CMD_TWITTER_SUBSCRIBE);

                    // Set links to the actions as the hovered link will be reset upon
                    // the menu opening as the mouse pointer will move away off the link.
                    URL link = controller.getHoveredHyperLink();
                    actFollow.setUserURL(link);
                    ReplyAction.getInstance().setUserURL(link);
                    actSubscribe.setUserURL(link);

                    if (actFollow.isAvailable()) menu.add(actFollow);
View Full Code Here

        {
            hashtagLinkPopupAdapter = new PopupAdapter()
            {
                protected JPopupMenu buildPopupMenu(MouseEvent anevent)
                {
                    GlobalController controller = GlobalController.SINGLETON;
                    MainFrame frame = controller.getMainFrame();
                    JPopupMenu menu = frame.createNonLockingPopupMenu("Hashtag Link");

                    SubscribeAction action = (SubscribeAction)ActionManager.get(ActionsTable.CMD_TWITTER_SUBSCRIBE);

                    // Set links to the actions as the hovered link will be reset upon
                    // the menu opening as the mouse pointer will move away off the link.
                    URL link = controller.getHoveredHyperLink();
                    action.setUserURL(link);
                   
                    menu.add(action);

                    return menu;
View Full Code Here

        maxRuns = getMaxRuns();
        IStressScript script = getStressScript();

        runner = new StressRunner(maxRuns, script);
        handler = new ThreadTerminatingHandler(runner, Level.SEVERE);
        GlobalController controller = GlobalController.SINGLETON;
        controller.addControllerListener(this);
    }
View Full Code Here

            {
                protected JPopupMenu buildPopupMenu(MouseEvent anevent)
                {
                    JPopupMenu menu = new NonlockingPopupMenu(Strings.message("ui.popup.hyperlinks"));

                    GlobalController controller = GlobalController.SINGLETON;

                    NetworkFeed hoveredFeed = controller.getFeedByHoveredHyperLink();

                    // Set links to the actions as the hovered link will be reset upon
                    // the menu opening as the mouse pointer will move away off the link.
                    URL link = controller.getHoveredHyperLink();
                    HyperLinkOpenAction.setLink(link);
                    HyperLinkCopyAction.setLink(link);
                    HyperLinkSaveAsAction.setLink(link);
                    HyperLinkEmailAction.setLink(link);
View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        GlobalController controller = GlobalController.SINGLETON;
        ArticleListPanel articlesListPanel = controller.getMainFrame().getArticlesListPanel();
        IFeedDisplay feedDisplay = articlesListPanel.getFeedView();

        GlobalModel model = GlobalModel.SINGLETON;
        IArticle selectedArticle = model.getSelectedArticle();
        boolean articleWasSelected = feedDisplay.selectNextArticle(INavigationModes.MODE_UNREAD);

        if (selectedArticle != null)
        {
            // Mark an article as read and update stats
            GlobalController.readArticles(true,
                model.getSelectedGuide(),
                model.getSelectedFeed(),
                selectedArticle);

            // Focus traversal is asynchronous. During the next article selection
            // it was moved to the next article, but when current article will be
            // removed the focus will be forwarded away from the display. We need
            // to get it back.
            feedDisplay.focus();
        }

        if (!articleWasSelected)
        {
            IArticleListNavigationListener nav = controller.getNavigationListener();
            nav.nextFeed(INavigationModes.MODE_UNREAD);
        }
    }
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.