Class GraphFileWriter

java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.graphs.GraphFileWriter
All Implemented Interfaces:
InterfaceIO, IconObject

public class GraphFileWriter
extends FileWriter
Abstract class for all graph writers.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

  • Constructor Details

    • GraphFileWriter

      public GraphFileWriter​(java.io.File file)
      Constructor setting the output file.
      Parameters:
      file -
  • Method Details

    • setXMLType

      public void setXMLType​(XMLObject.XMLType type)
      Sets the XML type for this writer.
      Parameters:
      type -
    • getXMLType

      public XMLObject.XMLType getXMLType()
      Gets the current XML type for this writer.
      Parameters:
      type -
    • write

      public boolean write​(InterfaceIOOptions options, ProgressUpdater progress_bar)
      Description copied from class: FileWriter
      Writes this object according to the given options. If loaded object is of type PersistentObject, this method should also set the file writer and reference URL for the object.
      Specified by:
      write in class FileWriter
      Returns:
    • getTitle

      public java.lang.String getTitle()
      Specified by:
      getTitle in interface InterfaceIO
      Overrides:
      getTitle in class FileWriter
    • writeGraph

      public boolean writeGraph​(InterfaceAbstractGraph graph, ProgressUpdater progress_bar) throws java.io.IOException
      Writes this graph to file using its domestic XML representation.
      Parameters:
      graph -
      Returns:
      Throws:
      java.io.IOException
    • getObjectIcon

      public javax.swing.Icon getObjectIcon()
      Description copied from interface: IconObject
      Returns the Icon associated with this object.
      Specified by:
      getObjectIcon in interface IconObject
      Overrides:
      getObjectIcon in class FileWriter
      Returns: