|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.swri.swiftvis.sources.AbstractSource
edu.swri.swiftvis.sources.GeneralData
public class GeneralData
This class is a data source that can be used to load in almost any type of data file, whether it is text or binary in format.
Field Summary | |
---|---|
private boolean |
binary
|
private java.awt.Rectangle |
bounds
|
private java.io.BufferedReader |
br
|
private java.io.File |
dataFile
|
private java.lang.String |
format
|
private int |
maxAllowed
|
private int |
numParameters
|
private int |
numValues
|
private int |
offset
|
private java.util.Vector<java.lang.String> |
parameterDescription
|
private int |
readType
|
private static long |
serialVersionUID
|
private SpecialFormatReader |
sfr
|
private static int |
SPECIAL_TYPE
|
private static int |
TEXT_TYPE
|
private int |
totalElements
|
private java.util.Vector<java.lang.String> |
valueDescription
|
Fields inherited from class edu.swri.swiftvis.sources.AbstractSource |
---|
dataVect, propPanel, sinkVector |
Constructor Summary | |
---|---|
|
GeneralData()
|
private |
GeneralData(GeneralData c,
java.util.List<GraphElement> l)
|
Method Summary | |
---|---|
GeneralData |
copy(java.util.List<GraphElement> l)
|
java.lang.String |
getDescription()
|
DataElement |
getElement(int i)
Returns the specified data element for this source. |
int |
getNumElements()
Returns the number of data elements that this source has in it. |
int |
getNumParameters()
|
int |
getNumValues()
|
java.lang.String |
getParameterDescription(int which)
Tells you what a particular parameter is used for. |
java.lang.String |
getParameterName(int which,
int paramVal)
Tells you the text that should be used to describe a particular value of a given parameter. |
static java.lang.String |
getTypeDescription()
|
java.lang.String |
getValueDescription(int which)
Tells you what a particular value is used for. |
private void |
readFile()
|
private void |
readSpecial()
|
private void |
readText()
|
private DataElement |
readTextLine()
|
protected void |
redoAllElements()
|
private void |
redoBufferSpecial(int elemNum)
|
private void |
redoBufferText(int elemNum)
|
private void |
selectFile()
|
void |
setParameterDescription(int which,
java.lang.String desc)
|
protected void |
setupSpecificPanelProperties()
|
void |
setValueDescription(int which,
java.lang.String desc)
|
void |
specialFormatReset()
This method is called by the SpecialFormatReader if it tries to read something when the stream it is pulling from is null. |
java.lang.String |
toString()
|
boolean |
useParameterNameString(int which)
If this returns true then the value of a parameter for this type should be listed as the strong value returned by getParameterName. |
Methods inherited from class edu.swri.swiftvis.sources.AbstractSource |
---|
abstractRedoAllElements, addOutput, clearData, getBounds, getNumOutputs, getOutput, getOutputInfoPanel, getPaint, getPropertiesPanel, notifySinks, relink, removeOutput, setBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.io.File dataFile
private java.awt.Rectangle bounds
private int numParameters
private int numValues
private java.util.Vector<java.lang.String> parameterDescription
private java.util.Vector<java.lang.String> valueDescription
private transient SpecialFormatReader sfr
private int readType
private java.lang.String format
private boolean binary
private int maxAllowed
private int offset
private transient java.io.BufferedReader br
private int totalElements
private static final int TEXT_TYPE
private static final int SPECIAL_TYPE
private static final long serialVersionUID
Constructor Detail |
---|
public GeneralData()
private GeneralData(GeneralData c, java.util.List<GraphElement> l)
Method Detail |
---|
public java.lang.String getDescription()
public static java.lang.String getTypeDescription()
public java.lang.String toString()
toString
in class java.lang.Object
protected void setupSpecificPanelProperties()
setupSpecificPanelProperties
in class AbstractSource
public java.lang.String getParameterDescription(int which)
public void setParameterDescription(int which, java.lang.String desc)
public boolean useParameterNameString(int which)
public java.lang.String getParameterName(int which, int paramVal)
public java.lang.String getValueDescription(int which)
public void setValueDescription(int which, java.lang.String desc)
public int getNumParameters()
public int getNumValues()
public DataElement getElement(int i)
DataSource
getElement
in interface DataSource
getElement
in class AbstractSource
i
- Which data element to return. Should be between 0 and getNumElements()-1.
public int getNumElements()
getNumElements
in interface DataSource
getNumElements
in class AbstractSource
public GeneralData copy(java.util.List<GraphElement> l)
public void specialFormatReset()
protected void redoAllElements()
redoAllElements
in class AbstractSource
private void selectFile()
private void readFile()
private void readText()
private void readSpecial()
private void redoBufferSpecial(int elemNum)
private void redoBufferText(int elemNum)
private DataElement readTextLine() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |