public class DataFile extends Object
Modifier and Type | Method and Description |
---|---|
void |
addColumn(int columnIndex,
LinePars lp)
Adds a column to the vector of columns.
|
void |
addItem(String item)
Adds an item to the vector.
|
boolean |
fillDataArrays(Vector dataArrays,
int type,
int fileIndex)
Reads the current file and returns the data arrays.
|
String |
getAbbreviatedFilename()
Return the abbreviated filename.
|
String |
getColumnName(int i)
Returns the name of one of the columns present here.
|
File |
getFile()
Return the file
|
String |
getFilenameWithoutPath()
Return the filename with the preceeding path stripped off.
|
int |
getGraphType() |
int |
getIndex()
Get the current datafile index
|
String |
getItem(int i) |
long |
getLastModified()
Returns the modification date of the file in ms, I guess.
|
String |
getLegend(int index) |
LinePars |
getLinePars(int index)
returns the linestyle of one of the vector items.
|
String |
getName()
Return the filename as such.
|
int |
getNumberOfColumns()
Return the number of columns (selected items)
|
int |
getNumberOfItems() |
void |
getSettings(XMLWrite xw,
String fileName)
Adds the settings of this panel to the XML settings toolbox.
|
int |
getXColumn()
Returns the index of the column used for the X-axis
|
int |
getYColumn(int i)
Returns the index of the column used for the Y-axis.
|
int |
isSelected(int index)
Checks whether the argument is a column selected for output.
|
boolean |
loadColumnNames(Vector labels)
Reads the datafile for data.
|
boolean |
loadColumnNamesData(Vector labels)
Reads the datafile for data.
|
void |
removeColumn(int columnIndex)
remove a column from the vector of columns.
|
void |
setIndex(int i)
Sets the current datafile index to another value.
|
void |
setLastModified(long date)
Sets the modification date of the file to a specific value.
|
void |
setLinePars(int index,
LinePars lp)
sets the linestyle of one of the vector items.
|
void |
setLinePars(LinePars lp)
sets the linestyle of all the vector items.
|
void |
setXColumn(int columnIndex)
Sets the index of the column used for the X-axis.
|
void |
updateSettings(XMLRead xr)
Updates the current settings with new data.
|
public boolean loadColumnNamesData(Vector labels)
labels
- vector to store the labels defined in the datafilepublic boolean loadColumnNames(Vector labels)
labels
- vector to store the labels defined in the datafilepublic int getNumberOfItems()
public String getItem(int i)
public void addItem(String item)
item
- name of the item added.public void addColumn(int columnIndex, LinePars lp)
columnIndex
- index of the columnlp
- parameters used to draw the linepublic void setXColumn(int columnIndex)
columnIndex
- index of the columnpublic int getXColumn()
public int getYColumn(int i)
i
- index of the column itempublic LinePars getLinePars(int index)
index
- index of the columnpublic void setLinePars(int index, LinePars lp)
index
- index of the columnlp
- linepars instance (can't be null!)public void setLinePars(LinePars lp)
lp
- linepars instancepublic String getLegend(int index)
public void removeColumn(int columnIndex)
columnIndex
- index of the columnpublic int getNumberOfColumns()
public File getFile()
public long getLastModified()
public void setLastModified(long date)
date
- modification date of the current file.public String getAbbreviatedFilename()
public String getFilenameWithoutPath()
public String getName()
public int isSelected(int index)
index
- index which is sought for.public String getColumnName(int i)
public void setIndex(int i)
i
- new indexpublic int getIndex()
i
- new indexpublic int getGraphType()
public boolean fillDataArrays(Vector dataArrays, int type, int fileIndex)
dataArrays
- vector with data-arrays of type DataArraytype
- graph type (2D, piper, multiplot...)fileIndex
- index of the file which contains the data. This is simply a
number, 0 for the first datafile, 1 for the second, etc. etc.,
used internally to find back the file belonging to a data
array.public void getSettings(XMLWrite xw, String fileName)
xw
- instance with settingspublic void updateSettings(XMLRead xr)
xr
- read object, containing all the dataJas4pp 1.5 © Java Analysis Studio for Particle Physics