Examples of GlobalModel


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

Examples of com.salas.bb.core.GlobalModel

        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

Examples of com.salas.bb.core.GlobalModel

    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

Examples of com.salas.bb.core.GlobalModel

                    }

                    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

Examples of com.salas.bb.core.GlobalModel

    {
        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

Examples of com.salas.bb.core.GlobalModel

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

Examples of com.salas.bb.core.GlobalModel

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

Examples of com.salas.bb.core.GlobalModel

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

Examples of org.switchyard.component.common.knowledge.config.model.GlobalModel

        Assert.assertEquals("rules", rules.getType());
        OperationModel operation = rules.getOperations().getOperations().get(0);
        Assert.assertEquals("theEventId", operation.getEventId());
        Assert.assertEquals("process", operation.getName());
        Assert.assertEquals(RulesOperationType.FIRE_UNTIL_HALT, operation.getType());
        GlobalModel globalModel = operation.getGlobals().getGlobals().get(0);
        Assert.assertEquals("context['foobar']", globalModel.getFrom());
        Assert.assertEquals("globalVar", globalModel.getTo());
        InputModel inputModel = operation.getInputs().getInputs().get(0);
        Assert.assertEquals("message.content.nested", inputModel.getFrom());
        Assert.assertEquals("inputVar", inputModel.getTo());
        OutputModel outputModel = operation.getOutputs().getOutputs().get(0);
        Assert.assertEquals("outputVar", outputModel.getFrom());
View Full Code Here

Examples of org.switchyard.component.common.knowledge.config.model.GlobalModel

     * @param desc the descriptor
     */
    public V1GlobalsModel(Configuration config, Descriptor desc) {
        super(config, desc);
        for (Configuration global_config : config.getChildren(GLOBAL)) {
            GlobalModel global = (GlobalModel)readModel(global_config);
            if (global != null) {
                _globals.add(global);
            }
        }
        setModelChildrenOrder(GLOBAL);
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.