Examples of GuidesSet


Examples of com.salas.bb.domain.GuidesSet

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

        GuidesSet set = model.getGuidesSet();

        IGuide selectedGuide = model.getSelectedGuide();

        sortGuidesSet(set);
View Full Code Here

Examples of com.salas.bb.domain.GuidesSet

        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.GuidesSet

     * @param guide       guide to move.
     * @param newPosition new position in list.
     */
    private void updatePosition(final IGuide guide, final int newPosition)
    {
        final GuidesSet cgs = GlobalModel.SINGLETON.getGuidesSet();

        // SHOULD BE IN EDT HERE
        cgs.relocateGuide(guide, newPosition);

        // Select guide in view
        final MainFrame mainFrame = GlobalController.SINGLETON.getMainFrame();
        final GuidesPanel cgp = mainFrame.getGudiesPanel();
        cgp.selectGuide(newPosition);
View Full Code Here

Examples of com.salas.bb.domain.GuidesSet

     * @param e action event details object.
     */
    public void actionPerformed(ActionEvent e)
    {
        final IGuide[] mergeGuides = GlobalController.SINGLETON.getSelectedGuides();
        final GuidesSet cgs = GlobalModel.SINGLETON.getGuidesSet();
        StandardGuide[] guides = GuidesUtils.filterGuides(cgs.getStandardGuides(null), mergeGuides);

        MergeGuideDialog dialog = new MergeGuideDialog(GlobalController.SINGLETON.getMainFrame());
        dialog.setMergeGuides(guides);
        dialog.open();

View Full Code Here

Examples of com.salas.bb.domain.GuidesSet

        // Init most modern database
        initManager("/resources");
        manager = new HsqlGuidesPM(pm);

        set = new GuidesSet();
    }
View Full Code Here

Examples of com.salas.bb.domain.GuidesSet

        manager.insertGuide(guide1, 1);
        set.add(1, guide1);
        pm.commit();

        // Check if the order is initially right
        GuidesSet s = new GuidesSet();
        pm.loadGuidesSet(s);
        assertEquals(2, s.getGuidesCount());
        assertEquals(guide0.getID(), s.getGuideAt(0).getID());

        // Move the second guide to top and check again
        set.relocateGuide(guide1, 0);
        pm.updateGuidePositions(set);

        s = new GuidesSet();
        pm.loadGuidesSet(s);
        assertEquals(2, s.getGuidesCount());
        assertEquals(guide1.getID(), s.getGuideAt(0).getID());
    }
View Full Code Here

Examples of com.salas.bb.domain.GuidesSet

     *
     * @return <code>TRUE</code> if user confirms deletion.
     */
    private boolean processComplexDelete(final IGuide[] guidesToDelete)
    {
        final GuidesSet cgs = GlobalModel.SINGLETON.getGuidesSet();
        StandardGuide[] guides = GuidesUtils.filterGuides(cgs.getStandardGuides(null), guidesToDelete);

        final MainFrame mainFrame = GlobalController.SINGLETON.getMainFrame();
        DeleteGuideDialog dialog = new DeleteGuideDialog(mainFrame, guidesToDelete.length > 1);

        dialog.setReassignGuides(guides);
View Full Code Here

Examples of com.salas.bb.domain.GuidesSet

     */
    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);

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.