Package com.openkm.openoffice.ui

Examples of com.openkm.openoffice.ui.ErrorForm


            documentFile = new DocumentFile();
            lang = new Lang();
            imageUtil = new ImageUtil();
            waitWindow = new WaitWindow();
        } catch (OKMException ex) {
            new ErrorForm(ex);
        }
    };
View Full Code Here


                {
                    try {
                        ConfigForm configForm = new ConfigForm(configFile);
                        configForm.setVisible(true);
                    } catch (OKMException ex) {
                        new ErrorForm(ex);
                    }
                    return;
                }

                if ( aURL.Path.compareTo("edit") == 0 )
                {
                    try {
                        ConfigBean configBean = configFile.read();
                        ExplorerForm explorerForm = new ExplorerForm(documentFile,imageUtil);
                        explorerForm.initServices(configFile.read().getHost());
                        explorerForm.startUp(m_xFrame, configBean.getUser(), configBean.getPassword());
                        explorerForm.setVisible(true);
                    } catch (OKMException ex) {
                        new ErrorForm(ex);
                    }
                    return;
                }
                if ( aURL.Path.compareTo("add") == 0 )
                {
                    String documentPath = getCurrentDocumentPath();
                    if (documentPath!=null && !documentPath.equals("")) {
                        try {
                            ConfigBean configBean = configFile.read();
                            TreeForm treeForm = new TreeForm(imageUtil);
                            treeForm.initServices(configFile.read().getHost());
                            treeForm.startUp(configBean.getUser(), configBean.getPassword(),documentPath);
                            treeForm.setVisible(true);
                        } catch (OKMException ex) {
                            new ErrorForm(ex);
                        }
                    } else {
                        new ErrorForm(new OKMException(lang.getString("main.error.save.file")));
                    }
                    return;
                }
                if ( aURL.Path.compareTo("checkin") == 0 )
                {
                    try {
                        String documentPath = getCurrentDocumentPath();
                        if (documentPath != null && !documentPath.equals("")) {
                            if (documentFile.isOpenKMDocument(documentPath)) {
                                new ConfirmationForm("main.question.update",ConfirmationForm.OPERATION_CHECKIN, documentPath);
                            }
                        }
                    } catch (OKMException ex) {
                        waitWindow.setVisible(false);
                        new ErrorForm(ex);
                    }
                    return;
                }
                if ( aURL.Path.compareTo("cancelcheckin") == 0 )
                {
                    try {
                        String documentPath = getCurrentDocumentPath();
                        if (documentPath != null && !documentPath.equals("")) {
                            if (documentFile.isOpenKMDocument(documentPath)) {
                                new ConfirmationForm("main.question.cancel.edit",ConfirmationForm.OPERATION_CANCELCHECKIN, documentPath);
                            }
                        }
                    } catch (OKMException ex) {
                        waitWindow.setVisible(false);
                        new ErrorForm(ex);
                    }
                    return;
                }
                if ( aURL.Path.compareTo("help") == 0 )
                {
                    try {
                        XMultiComponentFactory xFact = m_xContext.getServiceManager();
                        Object xObject = xFact.createInstanceWithContext("com.sun.star.system.SystemShellExecute", m_xContext);
                        XSystemShellExecute shell = (XSystemShellExecute) UnoRuntime.queryInterface( XSystemShellExecute.class, xObject );
                        shell.execute("http://www.openkm.com", "", 0);
                    } catch (Exception ex) {
                        new ErrorForm(ex);
                    }

                    return;
                }
            }
        } catch (OKMException ex) {
            new ErrorForm(ex);
        }
    }
View Full Code Here

            DocumentLogic.create(configBean.getHost(), configBean.getUser(), configBean.getPassword(), document);
            waitWindow.setVisible(false);
            new ConfirmationForm("main.document.added",ConfirmationForm.OPERATION_DOCUMENT_ADDED, "");
        } else {
            waitWindow.setVisible(false);
            new ErrorForm(new OKMException(lang.getString("main.error.save.file")));
        }
    }
View Full Code Here

            m_xFrame.dispose();
            File file = new File(documentPath);
            file.delete(); // file is always locally deleted
        } catch (OKMException ex) {
            waitWindow.setVisible(false);
            new ErrorForm(ex);
        }
    }
View Full Code Here

            m_xFrame.dispose();
            File file = new File(documentPath);
            file.delete(); // file is always locally deleted
        } catch (OKMException ex) {
            waitWindow.setVisible(false);
            new ErrorForm(ex);
        }
    }
View Full Code Here

TOP

Related Classes of com.openkm.openoffice.ui.ErrorForm

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.