Package com.salas.bb.core

Examples of com.salas.bb.core.GlobalModel


     * Creates and initializes view components.
     */
    private void initComponents()
    {
        Date date = article.getPublicationDate();
        GlobalModel model = GlobalModel.SINGLETON;

        tfText  = createTextArea();
        tfFullText = createTextArea();
        tfFullText.setBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createEmptyBorder(0, 30, 0, 0),
                BorderFactory.createCompoundBorder(
                    BorderFactory.createMatteBorder(0, 5, 0, 0, Color.lightGray),
                    BorderFactory.createEmptyBorder(0, 10, 0, 0)
                )));

        lbDate  = new JLabel(SimpleDateFormat.getDateInstance().format(date), SwingConstants.LEFT);
        lbPin   = new ArticlePinControl(model.getSelectedGuide(), model.getSelectedFeed(), article);
        lnHideText = new LinkButton("hide.text.button")
        {
            protected void doAction()
            {
                setTextButton(true);
View Full Code Here


        JPanel panel = new JPanel(new FormLayout("p, p, 2px, p, p", "pref"));

        lbDate = new JLabel(getDateFormat().format(date), SwingConstants.LEFT);
        lbTime = new JLabel(getTimeFormat().format(date), SwingConstants.LEFT);

        GlobalModel model = GlobalModel.SINGLETON;
        lbPin = new ArticlePinControl(model.getSelectedGuide(), model.getSelectedFeed(), article);
        lbColorCode = createColorCode();

        panel.add(lbDate, CELL_CONSTRAINTS.xy(1, 1));
        panel.add(lbTime, CELL_CONSTRAINTS.xy(2, 1));
        panel.add(lbPin, CELL_CONSTRAINTS.xy(4, 1));
View Full Code Here

    private boolean dbInitialized = false;
    private static final int NUM_CHANNELS = 3;

    protected void setUp() throws Exception
    {
        GlobalModel gm = new GlobalModel(null);
        GlobalModel.setSINGLETON(gm);
        ResourceUtils.setBundlePath("Resource");
    }
View Full Code Here

                    }

                    if (link != null && !popupTriggered) fireLinkClicked(link);
                    if (article != null)
                    {
                        GlobalModel model = GlobalModel.SINGLETON;
                        GlobalController.readArticles(true, model.getSelectedGuide(), model.getSelectedFeed(), article);
                    }
                }
                break;

            default:
View Full Code Here

    {
        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
View Full Code Here

     *
     * @param event original event object.
     */
    protected void doAction(ActionEvent event)
    {
        GlobalModel model = GlobalModel.SINGLETON;
        GlobalController.readArticles(false,
            model.getSelectedGuide(),
            model.getSelectedFeed(),
            model.getSelectedArticles());
    }
View Full Code Here

     * @param event original event object.
     */
    public void actionPerformed(ActionEvent event)
    {
        GlobalController controller = GlobalController.SINGLETON;
        GlobalModel model = controller.getModel();
        GuidesSet cgs = model.getGuidesSet();

        // Figure out if the publishing limit is already hit
        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())
        {
View Full Code Here

     *
     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        GlobalModel model = GlobalModel.SINGLETON;
        IArticle article = model.getSelectedArticle();
        URL url = article.getLink();

        IFeed feed = article.getFeed();
        String subject = MessageFormat.format(Strings.message("article.link.email.subject"),
            new Object[] { article.getTitle(), feed.getTitle() });

        UserPreferences preferences = model.getUserPreferences();
        BrowserLauncher.emailThis(null, subject, url.toString(), preferences.getInternetBrowser());
    }
View Full Code Here

TOP

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

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.