japlot.jaxodraw
Class JaxoIO
- java.lang.Object
-
- japlot.jaxodraw.JaxoIO
-
public final class JaxoIO extends java.lang.ObjectThe class responsible for opening/saving JaxoGraphs.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.lang.StringgetImportFileName()Brings up a file chooser for the import.static java.lang.StringgetOpenFileName()Brings up a file chooser dialog to choose a file for opening.static java.lang.StringgetSaveFileName(java.lang.String currentTab)Brings up a file chooser dialog to choose a file for saving.static JaxoGraphimportLatex()Imports a Graph from a latex file.static JaxoGraphimportLatex(java.lang.String fileName)Imports the given Latex file.static JaxoGraphopen()Opens a new JaxoGraph: asks for an open file.static JaxoGraphopen(java.lang.String fileName)Opens a new JaxoGraph from the specified file fileName.static voidopendata()static voidsave(JaxoGraph graph, java.lang.String currentTab)Saves the specified JaxoGraph: if the current JaxoGraph has no save file associated with it, asks for a save file name.static voidsave(JaxoGraph graph, java.lang.String fileName, java.lang.String currentTab)Saves the specified JaxoGraph into the file fileName.static voidsaveAs(JaxoGraph graph, java.lang.String currentTab)Saves the specified JaxoGraph: asks for a save file.
-
-
-
Method Detail
-
save
public static void save(JaxoGraph graph, java.lang.String currentTab)
Saves the specified JaxoGraph: if the current JaxoGraph has no save file associated with it, asks for a save file name. Othrewise saves the graph to the default file.- Parameters:
currentTab- The name ofthe current tabgraph- The graph to be saved.
-
saveAs
public static void saveAs(JaxoGraph graph, java.lang.String currentTab)
Saves the specified JaxoGraph: asks for a save file.- Parameters:
currentTab- The name of the current tabgraph- The graph to be saved.
-
save
public static void save(JaxoGraph graph, java.lang.String fileName, java.lang.String currentTab)
Saves the specified JaxoGraph into the file fileName.- Parameters:
currentTab- The name of the current tabgraph- The graph to be savedfileName- The save file name.
-
getSaveFileName
public static java.lang.String getSaveFileName(java.lang.String currentTab)
Brings up a file chooser dialog to choose a file for saving.- Parameters:
currentTab- The name of the current tab- Returns:
- the chosen save file.
-
open
public static JaxoGraph open()
Opens a new JaxoGraph: asks for an open file. The current JaxoGraph is used to determine whether there are drawn objects in this graph, they will be destroyed.- Returns:
- The new JaxoGraph.
-
opendata
public static void opendata()
-
importLatex
public static JaxoGraph importLatex()
Imports a Graph from a latex file.- Returns:
- A the imported JaxoGraph or null, if no file was imported
-
open
public static JaxoGraph open(java.lang.String fileName)
Opens a new JaxoGraph from the specified file fileName.- Parameters:
fileName- The file to be opened.- Returns:
- The new JaxoGraph.
-
importLatex
public static JaxoGraph importLatex(java.lang.String fileName)
Imports the given Latex file.- Parameters:
fileName- The file to be imported- Returns:
- The imported JaxoGraph or null, if no file was imported
-
getOpenFileName
public static java.lang.String getOpenFileName()
Brings up a file chooser dialog to choose a file for opening. Checks whether there is a non-empty current graph, it will be destroyed.- Returns:
- The chosen open file name.
-
getImportFileName
public static java.lang.String getImportFileName()
Brings up a file chooser for the import.- Returns:
- The absolte path of the chosen file, or an empty string if no file was selected
-
-
DMelt 3.0 © DataMelt by jWork.ORG