Documentation of 'org.statcato.file.Project' Java class
Project
org.statcato.file

Class Project



  • public class Project
    extends java.lang.Object
    A project file that stores the LogWindow instance, DatasheetTabbedPane instance,as well as generated charts of this application.
    Since:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String extension 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Project(Statcato app)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void autoSaveWrite()
      Writes project file to the temporary file path.
      boolean close()
      If the project is not yet saved, prompts the user to save.
      boolean exists()
      Returns whether this project exists (is valid).
      void exit()
      Deletes temporary file if it exists.
      java.io.File getFile()
      Returns the saved project file.
      java.lang.String getName()
      Returns the name of this project.
      boolean isModified()
      Returns true if the project is modified since the last save.
      boolean readFile(java.lang.String path)
      Read a project file from the given path.
      void setAutoSaveInterval(int seconds)
      Sets the auto save interval variable to the given value.
      void setDeleteAutoSaveFile(boolean delete)
      Sets the delete auto save file boolean to the given value.
      boolean writeToFile(boolean saveAs)
      Writes this project to a file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • extension

        public static java.lang.String extension
    • Constructor Detail

      • Project

        public Project(Statcato app)
        Constructor.
        Parameters:
        app - Parent Statcato application
    • Method Detail

      • setAutoSaveInterval

        public void setAutoSaveInterval(int seconds)
        Sets the auto save interval variable to the given value.
        Parameters:
        seconds - number of seconds
      • setDeleteAutoSaveFile

        public void setDeleteAutoSaveFile(boolean delete)
        Sets the delete auto save file boolean to the given value.
        Parameters:
        delete - boolean indicating whether to delete auto save file
      • exists

        public boolean exists()
        Returns whether this project exists (is valid).
        Returns:
        whether this project exists (is valid)
      • isModified

        public boolean isModified()
        Returns true if the project is modified since the last save.
        Returns:
        true if the project is modified since the last save or false otherwise
      • writeToFile

        public boolean writeToFile(boolean saveAs)
        Writes this project to a file. Opens a file chooser for the user to select file for save as or if the project has not been saved before.
        Parameters:
        saveAs - whether it is an save as operation
        Returns:
        true if the project is saved successfully or false otherwise.
      • getFile

        public java.io.File getFile()
        Returns the saved project file.
        Returns:
        project file
      • autoSaveWrite

        public void autoSaveWrite()
        Writes project file to the temporary file path.
      • getName

        public java.lang.String getName()
        Returns the name of this project.
        Returns:
        name, or empty string if this project has no name
      • readFile

        public boolean readFile(java.lang.String path)
        Read a project file from the given path. The read log is appended to the existing log, and the datasheets are added to the existing datasheet pane.
        Parameters:
        path - project file path
        Returns:
        true if a project file is read successfully, or false otherwise
      • close

        public boolean close()
        If the project is not yet saved, prompts the user to save. Closes the open project (log and datasheets).
        Returns:
        whether the project can be closed.
      • exit

        public void exit()
        Deletes temporary file if it exists.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.