Package mgui.io.domestic.variables
Class MatrixFileLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.variables.MatrixFileLoader
- All Implemented Interfaces:
InterfaceIO
,IconObject
- Direct Known Subclasses:
DefaultMatrixFileLoader
public abstract class MatrixFileLoader extends FileLoader
-
Field Summary
Fields Modifier and Type Field Description boolean
has_header
protected MatrixInOptions
options
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL
-
Constructor Summary
Constructors Constructor Description MatrixFileLoader()
MatrixFileLoader(java.io.File file)
Constructs this loader with default options:MatrixFileLoader(java.io.File file, MatrixInOptions.Format format)
Constructs this loader with the given format, and default type:MatrixFileLoader(java.io.File file, MatrixInOptions.Format format, MatrixInOptions.Variable as_type)
Constructs this loader with the specified format and type. -
Method Summary
Modifier and Type Method Description javax.swing.Icon
getObjectIcon()
Returns theIcon
associated with this object.boolean
load(InterfaceIOOptions _options, ProgressUpdater progress_bar)
Loads data from the set of files or URLs specified byoptions
.abstract Jama.Matrix
loadMatrix(ProgressUpdater progress_bar)
Methods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getSupportedObjects, getTitle, getWriterComplement, load, load, loadObject, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
options
-
has_header
public boolean has_header
-
-
Constructor Details
-
MatrixFileLoader
public MatrixFileLoader() -
MatrixFileLoader
public MatrixFileLoader(java.io.File file)Constructs this loader with default options:Format = AsciiFull
As type = Matrix
- Parameters:
file
-
-
MatrixFileLoader
Constructs this loader with the given format, and default type:As type = Matrix
- Parameters:
file
-
-
MatrixFileLoader
public MatrixFileLoader(java.io.File file, MatrixInOptions.Format format, MatrixInOptions.Variable as_type)Constructs this loader with the specified format and type.- Parameters:
file
-
-
-
Method Details
-
load
Description copied from class:FileLoader
Loads data from the set of files or URLs specified byoptions
. Loading is controlled by the specifications ofoptions
. If loaded object is of typePersistentObject
, this method should also set the file loader and reference URL for the object.This method should also set the URL reference and writer and loader attributes to match this one and its complement.
- Specified by:
load
in classFileLoader
progress_bar
- An optional progress updater. Can benull
.- Returns:
-
loadMatrix
public abstract Jama.Matrix loadMatrix(ProgressUpdater progress_bar) throws java.io.IOException, InterfaceIOException- Throws:
java.io.IOException
InterfaceIOException
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObject
Returns theIcon
associated with this object.- Specified by:
getObjectIcon
in interfaceIconObject
- Overrides:
getObjectIcon
in classFileLoader
- Returns:
-