Package com.sun.star.wizards.ui.event

Examples of com.sun.star.wizards.ui.event.Task


    public CGDocument(String url, XMultiServiceFactory xmsf, Task task) throws Exception
    {
        cp_URL = getSettings().getFileAccess(xmsf).getURL(url);
        if (task == null)
        {
            task = new Task("", "", 5);
        }
        validate(xmsf, task);
    }
View Full Code Here


        errorHandler = er;

        ucb = new UCB(xmsf);

        int taskSteps = getTaskSteps();
        myTask = new Task(TASK, TASK_PREPARE, taskSteps);

    }
View Full Code Here

    public void refresh(CGSettings settings)
            throws Exception
    {
        Document doc = (Document) settings.cp_DefaultSession.createDOM();
        CGLayout layout = settings.cp_DefaultSession.getLayout();
        Task task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 10000);
        Process.generate(xmsf, layout, doc, fileAccess, tempDir, task);
        Process.copyLayoutFiles(ucb, fileAccess, settings, layout, tempDir);
        xDispatch.dispatch(openHyperlink, loadArgs); //Dispatch.dispatch(openHyperlink, loadArgs);     
    }
View Full Code Here

        setSaveSessionName(settings.cp_DefaultSession);

        ilLayouts.setListModel(settings.cp_Layouts);
        ilLayouts.create(this);

        checkContent(settings.cp_DefaultSession.cp_Content, new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, 99999), this.xControl);

        //saved sessions, styles, combobox save session.
        // also set the chosen saved session...
        fillLists();
        makeDataAware();
View Full Code Here

    {
        try
        {
            final StatusDialog sd = getStatusDialog();

            final Task task = new Task("LoadDocs", PropertyNames.EMPTY_STRING, 10);

            sd.execute(this, task, resources.resLoadingSession);
            task.start();

            setSelectedDoc(EMPTY_SHORT_ARRAY);
            Helper.setUnoPropertyValue(getModel(lstDocuments), PropertyNames.SELECTED_ITEMS, EMPTY_SHORT_ARRAY);
            Helper.setUnoPropertyValue(getModel(lstDocuments), PropertyNames.STRING_ITEM_LIST, EMPTY_STRING_ARRAY);

            Object view = null;

            if (sessionToLoad.equals(PropertyNames.EMPTY_STRING))
            {
                view = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH + "/DefaultSession", false);
            }
            else
            {
                view = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH + "/SavedSessions", false);
                view = Configuration.getNode(sessionToLoad, view);
            }

            CGSession session = new CGSession();
            session.setRoot(settings);
            session.readConfiguration(view, CONFIG_READ_PARAM);
            task.setMax(session.cp_Content.cp_Documents.getSize() * 5 + 7);
            task.advance(true);

            if (sessionToLoad.equals(PropertyNames.EMPTY_STRING))
            {
                setSaveSessionName(session);
            }
            mount(session, task, false, sd.xControl);

            checkSteps();
            currentSession = sessionToLoad;

            while (task.getStatus() <= task.getMax())
            {
                task.advance(false);
            }
            task.removeTaskListener(sd);
        }
        catch (Exception ex)
        {
            unexpectedError(ex);
        }
View Full Code Here

        final String[] files = getDocAddDialog().callOpenDialog(true, settings.cp_DefaultSession.cp_InDirectory);
        if (files == null)
        {
            return;
        }
        final Task task = new Task(PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING, files.length * 5);

        /*
         * If more than a certain number
         * of documents have been added,
         * open the status dialog.
         */
        if (files.length > MIN_ADD_FILES_FOR_DIALOG)
        {
            StatusDialog sd = getStatusDialog();
            sd.setLabel(resources.resValidatingDocuments);
            sd.execute(this, task, resources.prodName); // new LoadDocs( sd.xControl, files, task )
            LoadDocs oLoadDocs = new LoadDocs(this.xControl, files, task);
            oLoadDocs.loadDocuments();
            task.removeTaskListener(sd);
        }
        /*
         * When adding a single document, do not use a
         * status dialog...
         */
 
View Full Code Here

        errorHandler = er;

        ucb = new UCB(xmsf);

        int taskSteps = getTaskSteps();
        myTask = new Task(TASK, TASK_PREPARE, taskSteps);

    }
View Full Code Here

    {
        try
        {
            final StatusDialog sd = getStatusDialog();

            final Task task = new Task("LoadDocs", "", 10);

            sd.execute(this, task, resources.resLoadingSession);
            task.start();

            setSelectedDoc(EMPTY_SHORT_ARRAY);
            Helper.setUnoPropertyValue(getModel(lstDocuments), "SelectedItems", EMPTY_SHORT_ARRAY);
            Helper.setUnoPropertyValue(getModel(lstDocuments), "StringItemList", EMPTY_STRING_ARRAY);

            Object view = null;

            if (sessionToLoad.equals(""))
            {
                view = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH + "/DefaultSession", false);
            }
            else
            {
                view = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH + "/SavedSessions", false);
                view = Configuration.getNode(sessionToLoad, view);
            }

            CGSession session = new CGSession();
            session.setRoot(settings);
            session.readConfiguration(view, CONFIG_READ_PARAM);
            task.setMax(session.cp_Content.cp_Documents.getSize() * 5 + 7);
            task.advance(true);

            if (sessionToLoad.equals(""))
            {
                setSaveSessionName(session);
            }
            mount(session, task, false, sd.xControl);

            checkSteps();
            currentSession = sessionToLoad;

            while (task.getStatus() <= task.getMax())
            {
                task.advance(false);
            }
            task.removeTaskListener(sd);
        }
        catch (Exception ex)
        {
            unexpectedError(ex);
        }
View Full Code Here

        final String[] files = getDocAddDialog().callOpenDialog(true, settings.cp_DefaultSession.cp_InDirectory);
        if (files == null)
        {
            return;
        }
        final Task task = new Task("", "", files.length * 5);

        /*
         * If more than a certain number
         * of documents have been added,
         * open the status dialog.
         */
        if (files.length > MIN_ADD_FILES_FOR_DIALOG)
        {
            StatusDialog sd = getStatusDialog();
            sd.setLabel(resources.resValidatingDocuments);
            sd.execute(this, task, resources.prodName); // new LoadDocs( sd.xControl, files, task )
            LoadDocs oLoadDocs = new LoadDocs(this.xControl, files, task);
            oLoadDocs.loadDocuments();
            task.removeTaskListener(sd);
        }
        /*
         * When adding a single document, do not use a
         * status dialog...
         */
 
View Full Code Here

    public CGDocument(String url, XMultiServiceFactory xmsf, Task task) throws Exception
    {
        cp_URL = getSettings().getFileAccess(xmsf).getURL(url);
        if (task == null)
        {
            task = new Task("", "", 5);
        }
        validate(xmsf, task);
    }
View Full Code Here

TOP

Related Classes of com.sun.star.wizards.ui.event.Task

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.