Examples of IGuide


Examples of com.salas.bb.domain.IGuide

         * @param row index of row to attach to.
         * @param forceUpdate <code>TRUE</code> to force button update even if already in place
         */
        void attachButton(int row, boolean forceUpdate)
        {
            IGuide guide = (IGuide)guidesList.getModel().getElementAt(row);

            boolean sameButton = (row == attachedRow && guide == attachedGuide);

            if (sameButton && !forceUpdate) return;

View Full Code Here

Examples of com.salas.bb.domain.IGuide

            boolean showUnread = RenderingManager.isShowUnreadInGuides();

            if (attachedRow >= 0)
            {
                int row = attachedRow;
                IGuide guide = attachedGuide;

                // update attachment
                ListModel mdl = guidesList.getModel();
                if (showUnread && mdl.getSize() > row && mdl.getElementAt(row) == guide)
                {
View Full Code Here

Examples of com.salas.bb.domain.IGuide

         *
         * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
         */
        public void actionPerformed(ActionEvent e)
        {
            IGuide guide = (IGuide)e.getSource();

            if (guide != null)
            {
                // Mark visible feeds as read, but don't touch feeds
                // not currently shown.
View Full Code Here

Examples of com.salas.bb.domain.IGuide

        final GlobalController controller = GlobalController.SINGLETON;
        final GlobalModel model = controller.getModel();

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

            IGuide guide = findNextGuideWithUnread(cgs, currentGuide);

            // EDT !!!
            if (guide != null) GlobalController.SINGLETON.selectGuide(guide, false);
        }
    }
View Full Code Here

Examples of com.salas.bb.domain.IGuide

     * @return guide or <code>NULL</code> if no such guides found.
     */
    static IGuide findNextGuideWithUnread(final GuidesSet cgs,
        final IGuide currentGuide)
    {
        IGuide guide = currentGuide;
        boolean found = false;

        GuidesListModel glm = GlobalController.SINGLETON.getGuidesListModel();

        while (!found)
        {
            guide = nextGuide(cgs, guide);
            found = guide == currentGuide || (!guide.isRead() && glm.indexOf(guide) != -1);
        }

        return currentGuide == guide ? null : guide;
    }
View Full Code Here

Examples of com.salas.bb.domain.IGuide

        // use for our own purpose.
        int index = Integer.parseInt(e.getActionCommand()) - 1;
        final GuidesSet cgs = GlobalModel.SINGLETON.getGuidesSet();
        if (index < cgs.getGuidesCount())
        {
            final IGuide guide = cgs.getGuideAt(index);
            if (GlobalModel.SINGLETON.getSelectedGuide() != guide)
            {
                // EDT !!!
                GlobalController.SINGLETON.selectGuideAndFeed(guide);
            }
View Full Code Here

Examples of com.salas.bb.domain.IGuide

        GlobalController controller = GlobalController.SINGLETON;
        GuidesList guidesList = controller.getMainFrame().getGudiesPanel().getGuidesList();

        GuidesSet set = model.getGuidesSet();

        IGuide selectedGuide = model.getSelectedGuide();

        sortGuidesSet(set);

        if (selectedGuide != null)
        {
View Full Code Here

Examples of com.salas.bb.domain.IGuide

         * @throws ClassCastException if the arguments' types prevent them from being compared by this
         *                            Comparator.
         */
        public int compare(Object o1, Object o2)
        {
            IGuide g1 = (IGuide)o1;
            IGuide g2 = (IGuide)o2;

            String t1 = g1 == null ? null : g1.getTitle();
            String t2 = g2 == null ? null : g2.getTitle();

            return t1 == null
                ? t2 == null ? 0 : -1
                : t2 == null ? 1 : t1.compareToIgnoreCase(t2);
        }
View Full Code Here

Examples of com.salas.bb.domain.IGuide

     * @param event original event object.
     */
    public void actionPerformed(ActionEvent event)
    {
        GlobalModel model = GlobalModel.SINGLETON;
        final IGuide guide = model.getSelectedGuide();
        if (guide != null)
        {
            boolean oldPublishingEnabled = guide.isPublishingEnabled();

            GuidesSet set = model.getGuidesSet();
            MainFrame mainFrame = GlobalController.SINGLETON.getMainFrame();

            // Figure out if the publishing limit is already hit
            FeatureManager featureManager = GlobalController.SINGLETON.getFeatureManager();
            int pubLimit = featureManager.getPublicationLimit();
            boolean pubLimitReached = pubLimit > -1 && set.countPublishedGuides() >= pubLimit;

            boolean actAvailable = model.getServicePreferences().isAccountInformationEntered();
            EditGuideDialog dialog = new EditGuideDialog(mainFrame, actAvailable, pubLimit, pubLimitReached);
            dialog.open(set, guide);

            if (!dialog.hasBeenCanceled())
            {
                performUpdates(guide, dialog, set.indexOf(guide));

                boolean newPublishingEnabled = guide.isPublishingEnabled();
                if (newPublishingEnabled && !oldPublishingEnabled)
                {
                    GlobalController.SINGLETON.showNewPublishingDialog();
                }
            }
View Full Code Here

Examples of com.salas.bb.domain.IGuide

            int rows = stmt.executeUpdate();
            if (rows == 0)
            {
                IFeed feed = article.getFeed();
                IGuide guide = null;
                if (feed != null)
                {
                    IGuide[] guides = feed.getParentGuides();
                    guide = guides.length == 0 ? null : guides[0];
                }
                String feedId = feed == null ? "no feed" : Long.toString(feed.getID());
                String guideId = guide == null ? "no guide" : Long.toString(guide.getID());

                throw new SQLException(MessageFormat.format(
                    Strings.error("db.hsql.removed.0.rows.for.articleid.0.feedid.1.guideid.2"),
                    article.getID(), feedId, guideId));
            }
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.