Version: 1.1.1

ca.ucalgary.seahawk.gui
Class MobySaveDialog

java.lang.Object
  extended by ca.ucalgary.seahawk.gui.MobySaveDialog
All Implemented Interfaces:
WorkflowPreviewListener

public class MobySaveDialog
extends Object
implements WorkflowPreviewListener

A utility to save the current document as XML or HTML, or the tab's history as a workflow.

Author:
Paul Gordon

Field Summary
static String CSV_DESC
           
static String CSV_EXT
           
static String CSV_MIME
           
static String CSV_MIME2
           
static String DOC_DESC
           
static String DOC_EXT
           
static String DOC_MIME
           
static String DOC_MIME2
           
static String FILE_CHOOSER_SAVE_TITLE
           
static String HTML_DESC
           
static String HTML_EXT
           
static String ODP_DESC
           
static String ODP_EXT
           
static String ODP_MIME
           
static String ODS_DESC
           
static String ODS_EXT
           
static String ODS_MIME
           
static String ODT_DESC
           
static String ODT_EXT
           
static String ODT_MIME
           
static String PDF_DESC
           
static String PDF_EXT
           
static String PPT_DESC
           
static String PPT_EXT
           
static String PPT_MIME
           
static String PPT_MIME2
           
static String RTF_DESC
           
static String RTF_EXT
           
static String T2FLOW_DESC
           
static String T2FLOW_EXT
           
static String TEX_DESC
           
static String TEX_EXT
           
static String TSV_DESC
           
static String TSV_EXT
           
static String TXT_DESC
           
static String TXT_EXT
           
static String WPD_DESC
           
static String WPD_EXT
           
static String XLS_DESC
           
static String XLS_EXT
           
static String XLS_MIME
           
static String XLS_MIME2
           
static String XML_DESC
           
static String XML_EXT
           
 
Method Summary
static URL convertToDisplayable(URL u)
           
static URLConnection convertToDisplayable(URLConnection uc)
          A method for converting Microsoft Office documents (and perhaps other formats in the future) into text that Seahawk can load.
static void exportDocument(MobyContentPane document)
           
static void exportHTML(MobyContentPane document, File f)
           
static boolean exportWorkflow(MobyContentPane tab, File f)
           
static void exportXML(MobyContentPane document, File f)
           
static String getPreferredExtension(URLConnection uc)
          Given a file name to import, returns the file extension that Seahawk would prefer to convert the document to.
static boolean isConvertible(URLConnection uc)
           
static void showFileOpenDialog(MobyContentGUI mcg, boolean useDefaultHandler)
           
 void workflowCanceled(WorkflowPreviewDialog dialog)
           
 void workflowConfirmed(WorkflowPreviewDialog dialog, byte[] confirmedWorkflow)
          Callback for when the user has approved the workflow preview and entered metadata.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_CHOOSER_SAVE_TITLE

public static final String FILE_CHOOSER_SAVE_TITLE
See Also:
Constant Field Values

XML_DESC

public static final String XML_DESC
See Also:
Constant Field Values

TXT_DESC

public static final String TXT_DESC
See Also:
Constant Field Values

RTF_DESC

public static final String RTF_DESC
See Also:
Constant Field Values

CSV_DESC

public static final String CSV_DESC
See Also:
Constant Field Values

TSV_DESC

public static final String TSV_DESC
See Also:
Constant Field Values

PPT_DESC

public static final String PPT_DESC
See Also:
Constant Field Values

ODT_DESC

public static final String ODT_DESC
See Also:
Constant Field Values

WPD_DESC

public static final String WPD_DESC
See Also:
Constant Field Values

ODS_DESC

public static final String ODS_DESC
See Also:
Constant Field Values

ODP_DESC

public static final String ODP_DESC
See Also:
Constant Field Values

DOC_DESC

public static final String DOC_DESC
See Also:
Constant Field Values

XLS_DESC

public static final String XLS_DESC
See Also:
Constant Field Values

TEX_DESC

public static final String TEX_DESC
See Also:
Constant Field Values

PDF_DESC

public static final String PDF_DESC
See Also:
Constant Field Values

HTML_DESC

public static final String HTML_DESC
See Also:
Constant Field Values

T2FLOW_DESC

public static final String T2FLOW_DESC
See Also:
Constant Field Values

T2FLOW_EXT

public static final String T2FLOW_EXT
See Also:
Constant Field Values

XML_EXT

public static final String XML_EXT
See Also:
Constant Field Values

TXT_EXT

public static final String TXT_EXT
See Also:
Constant Field Values

CSV_EXT

public static final String CSV_EXT
See Also:
Constant Field Values

RTF_EXT

public static final String RTF_EXT
See Also:
Constant Field Values

PPT_EXT

public static final String PPT_EXT
See Also:
Constant Field Values

DOC_EXT

public static final String DOC_EXT
See Also:
Constant Field Values

XLS_EXT

public static final String XLS_EXT
See Also:
Constant Field Values

PDF_EXT

public static final String PDF_EXT
See Also:
Constant Field Values

ODP_EXT

public static final String ODP_EXT
See Also:
Constant Field Values

ODS_EXT

public static final String ODS_EXT
See Also:
Constant Field Values

ODT_EXT

public static final String ODT_EXT
See Also:
Constant Field Values

TSV_EXT

public static final String TSV_EXT
See Also:
Constant Field Values

TEX_EXT

public static final String TEX_EXT
See Also:
Constant Field Values

WPD_EXT

public static final String WPD_EXT
See Also:
Constant Field Values

HTML_EXT

public static final String HTML_EXT
See Also:
Constant Field Values

XLS_MIME

public static final String XLS_MIME
See Also:
Constant Field Values

DOC_MIME

public static final String DOC_MIME
See Also:
Constant Field Values

PPT_MIME

public static final String PPT_MIME
See Also:
Constant Field Values

XLS_MIME2

public static final String XLS_MIME2
See Also:
Constant Field Values

DOC_MIME2

public static final String DOC_MIME2
See Also:
Constant Field Values

PPT_MIME2

public static final String PPT_MIME2
See Also:
Constant Field Values

ODT_MIME

public static final String ODT_MIME
See Also:
Constant Field Values

ODS_MIME

public static final String ODS_MIME
See Also:
Constant Field Values

ODP_MIME

public static final String ODP_MIME
See Also:
Constant Field Values

CSV_MIME

public static final String CSV_MIME
See Also:
Constant Field Values

CSV_MIME2

public static final String CSV_MIME2
See Also:
Constant Field Values
Method Detail

exportDocument

public static void exportDocument(MobyContentPane document)

exportHTML

public static void exportHTML(MobyContentPane document,
                              File f)

exportWorkflow

public static boolean exportWorkflow(MobyContentPane tab,
                                     File f)
Returns:
true if the workflow was exported, otherwise false

workflowCanceled

public void workflowCanceled(WorkflowPreviewDialog dialog)
Specified by:
workflowCanceled in interface WorkflowPreviewListener

workflowConfirmed

public void workflowConfirmed(WorkflowPreviewDialog dialog,
                              byte[] confirmedWorkflow)
Callback for when the user has approved the workflow preview and entered metadata.

Specified by:
workflowConfirmed in interface WorkflowPreviewListener

exportXML

public static void exportXML(MobyContentPane document,
                             File f)

showFileOpenDialog

public static void showFileOpenDialog(MobyContentGUI mcg,
                                      boolean useDefaultHandler)

convertToDisplayable

public static URL convertToDisplayable(URL u)
                                throws Exception
Throws:
Exception

convertToDisplayable

public static URLConnection convertToDisplayable(URLConnection uc)
                                          throws Exception
A method for converting Microsoft Office documents (and perhaps other formats in the future) into text that Seahawk can load. Uses a remote OpenOffice server to do the conversion. The converted file will be deleted on exit.

Throws:
Exception

getPreferredExtension

public static String getPreferredExtension(URLConnection uc)
Given a file name to import, returns the file extension that Seahawk would prefer to convert the document to.


isConvertible

public static boolean isConvertible(URLConnection uc)

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010