Package org.jitterbit.application.ui.text.editor

Examples of org.jitterbit.application.ui.text.editor.TextEditor


        @Override
        protected void onSuccess(File file) {
            if (file == null) {
                Alert.error("The requested file was not found.", "File not found");
            } else {
                TextEditor editor = createEditor(file);
                editorService.openEditor(editor);
            }
        }
View Full Code Here


        }

        private TextEditor createEditor(final File file) {
            String mainTitle = StringUtils.capitalize(fileType.toString().toLowerCase()) + " data";
            int chunkSize = 100000;
            TextEditor editor = TextEditorFactory.openFileInChunks(mainTitle, file, charset, chunkSize);
            if (editor instanceof GenericEditor) {
                ((GenericEditor) editor).setSubTitle(tx.getName());
            }
            editor.setEditable(true);
            editor.decorateText(TextStyles.DefaultText.asTextDecorator());
            editor.addResource(new AbstractWindowElementResource() {

                @Override
                public void dispose(WindowElement e) {
                    file.delete();
                }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.text.editor.TextEditor

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.