Examples of StandardGuide


Examples of com.salas.bb.domain.StandardGuide

    protected void setUp() throws Exception
    {
        cgs = new GuidesSet();

        cg1 = new StandardGuide();
        cg1.setTitle("1");
        cg2 = new StandardGuide();
        cg2.setTitle("2");
        cg3 = new StandardGuide();
        cg3.setTitle("3");

        cgs.add(cg1);
        cgs.add(cg2);
        cgs.add(cg3);
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        final IFeed feed = GlobalModel.SINGLETON.getSelectedFeed();
        final IGuide guide = GlobalModel.SINGLETON.getSelectedGuide();

        // Reorderings are allowed only for standard guides
        if (!(guide instanceof StandardGuide)) return;
        StandardGuide sGuide = (StandardGuide)guide;

        final GuideModel model = GlobalModel.SINGLETON.getGuideModel();

        // Move channel down if this one isn't already bottom-most.
        final int index = model.indexOf(feed) + 1;
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        GuidesSet set = GlobalController.SINGLETON.getModel().getGuidesSet();
        Set titles = set.getGuidesTitles();
        String unique = ImportGuidesAction.getUniqueTitle(title, titles);

        // Create new guide
        StandardGuide guide = new StandardGuide();
        guide.setTitle(unique);
        guide.setIconKey(ImportGuidesAction.getUnusedIcon(set));

        // Add guide
        set.add(guide);

        subscribe(guide, urls);
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        final IGuide guide = GlobalModel.SINGLETON.getSelectedGuide();

        // Reorderings are allowed only for standard guides
        if (!(guide instanceof StandardGuide)) return;

        StandardGuide sguide = (StandardGuide)guide;

        final GuideModel model = GlobalModel.SINGLETON.getGuideModel();

        // Move channel up one step if it's not already top-most.
        final int index = model.indexOf(feed);
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

         *
         * @return existing guide.
         */
        public StandardGuide getSelectedExistingGuide()
        {
            StandardGuide guide = null;

            Object item = cbGuides.getSelectedItem();
            if (item instanceof GuideHolder)
            {
                guide = ((GuideHolder)item).getGuide();
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

            {
                // Fill guides box
                int selectedGuideIndex = -1;
                for (int i = 0; i < guides.length; i++)
                {
                    StandardGuide guide = guides[i];
                    GuideHolder holder = new GuideHolder(guide);
                    cbGuides.addItem(holder);

                    if (guide == selectedGuide) selectedGuideIndex = i;
                }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        if (position != newPosition) updatePosition(guide, newPosition);

        // If guide is standard and reading lists changed
        if (guide instanceof StandardGuide)
        {
            StandardGuide sguide = (StandardGuide)guide;
            ReadingList[] aReadingLists = sguide.getReadingLists();

            List<ReadingList> oldLists = Arrays.asList(aReadingLists);
            List<ReadingList> newLists = Arrays.asList(dialog.getReadingLists());

            boolean addedReadingList = false;

            // Add missing
            for (ReadingList list : newLists)
            {
                if (!oldLists.contains(list))
                {
                    sguide.add(list);
                    addedReadingList = true;
                }
            }

            // Remove deleted
            for (ReadingList list : oldLists)
            {
                if (!newLists.contains(list)) sguide.remove(list, true);
            }

            if (addedReadingList) GlobalController.SINGLETON.getPoller().update(sguide);
        }
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

        dialog.setMergeGuides(guides);
        dialog.open();

        if (!dialog.hasBeenCanceled())
        {
            final StandardGuide mergeGuide = dialog.getSelectedMergeGuide();
            if (mergeGuide != null)
            {
                GlobalController.SINGLETON.mergeGuides(mergeGuides, mergeGuide);
            }
        }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

    {
        List guidesLeft = new ArrayList(allGuides.length - guidesToFilter.length);

        for (int i = 0; i < allGuides.length; i++)
        {
            StandardGuide guide = allGuides[i];
            if (!contains(guide, guidesToFilter)) guidesLeft.add(guide);
        }

        return (StandardGuide[])guidesLeft.toArray(new StandardGuide[guidesLeft.size()]);
    }
View Full Code Here

Examples of com.salas.bb.domain.StandardGuide

     *
     * @return <code>TRUE</code> if matches.
     */
    private static boolean matchGuide(String title, String pattern, boolean pinnedArticlesOnly)
    {
        StandardGuide guide = new StandardGuide();
        guide.setTitle(title);

        return SearchEngine.createMatcher(pattern, pinnedArticlesOnly).matches(guide);
    }
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.