Class FileIO


  • public final class FileIO
    extends java.lang.Object
    File I/O support functionality for MathViewer.
    Version:
    $Revision: cca61eec2241 $
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static FileIO getInstance()
      Retrieve the FileIO object.
      org.w3c.dom.Document loadFile​(java.awt.Frame parent, java.io.File selectedFile)
      Load the given file.
      void saveDocument​(java.awt.Frame parent, org.w3c.dom.Node document, MutableLayoutContext params)
      Save a document.
      java.io.File selectFileToOpen​(java.awt.Frame parent)
      Select a file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static FileIO getInstance()
        Retrieve the FileIO object.
        Returns:
        the FileIO object
      • selectFileToOpen

        public java.io.File selectFileToOpen​(java.awt.Frame parent)
        Select a file.
        Parameters:
        parent - Frame of the parent
        Returns:
        A File or null.
      • loadFile

        public org.w3c.dom.Document loadFile​(java.awt.Frame parent,
                                             java.io.File selectedFile)
        Load the given file.
        Parameters:
        selectedFile - File object to load.
        parent - Frame of parent window
        Returns:
        a parsed Document or null
      • saveDocument

        public void saveDocument​(java.awt.Frame parent,
                                 org.w3c.dom.Node document,
                                 MutableLayoutContext params)
        Save a document.
        Parameters:
        parent - frame of parent.
        document - the MML document to save.
        params - rendering parameters.