|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.pentec.adapt.afile.AFile
public class AFile
AFile provides methods to open, read, and write files with ADAPT. Currently recognized file formats are SAF, SATIRS ASCII, SATIRS binary, ADAPT generated XY plots, ASCII XY files, CIGARS, IRIS, BMP, GIF, JPG, FPX, PNG, and TIFF.
| Field Summary | |
|---|---|
protected java.lang.String |
$Value
Text used for value readout label |
protected java.lang.String |
$X
Text used for x-axis cursor readout label |
protected java.lang.String |
$Y
Text used for y-axis cursor readout label; if this is "", the label will not be shown |
static int |
ADAPTXY
File type indentifiers |
static int |
ASCII
File type indentifiers |
static int |
BASLER
File type indentifiers |
static int |
CIGARS
File type indentifiers |
static int |
COLUMNPROFILE
Visualization mode options as integer constants |
protected java.awt.image.DataBuffer |
dataBuffer
The actual data |
static javax.swing.JFileChooser |
fileChooser
The global ADAPT file selector |
static int |
FIST1
File type indentifiers |
static int |
FIST2
File type indentifiers |
Header |
header
The header for this file |
int |
iFileType
The file type of this file |
static int |
IMAGE
Visualization mode options as integer constants |
protected com.sun.media.jai.codec.FileSeekableStream |
inputFile
The actual input stream for the file |
static int |
IRIS
File type indentifiers |
protected int |
iScanSize
The number of words in a scan |
protected boolean |
isMovie
A flag indicating if this is a movie file |
protected int |
iVisualizationMode
The currently selected visualization mode |
java.io.File |
jfile
The Java File variable for this file |
private static javax.swing.JPanel |
jpViewOptions
View mode options panel |
private static javax.swing.JRadioButton |
jrbMScan
Radio buttons for file chooser view mode options |
private static javax.swing.JRadioButton |
jrbMSlice
Radio buttons for file chooser view mode options |
private static javax.swing.JRadioButton |
jrbSingle
Radio buttons for file chooser view mode options |
protected DataFrame |
mainFrame
A handle to the containing data frame |
static int |
MULTISCAN
View mode constant |
static int |
MULTISLICE
View mode constant |
static int |
OTHER
File type indentifiers |
static int |
POD
File type indentifiers |
protected static AProgress |
progress
Progress window for use with multi panel mode |
static int |
REDLAKEMS10
File type indentifiers |
static int |
REDLAKEMS8
File type indentifiers |
static int |
ROWPROFILE
Visualization mode options as integer constants |
static int |
SAF
File type indentifiers |
static int |
SATIRSA
File type indentifiers |
static int |
SATIRSB
File type indentifiers |
static int |
SINGLE
View mode constant |
static int |
TPROFILE
Visualization mode options as integer constants |
static int |
UNKNOWN
File type indentifiers |
static int |
ZPROFILE
Visualization mode options as integer constants |
| Constructor Summary | |
|---|---|
|
AFile(DataFrame mainFrame,
java.io.File file)
This constructor is used for pre-created plots |
protected |
AFile(DataFrame mainFrame,
java.io.File file,
com.sun.media.jai.codec.FileSeekableStream fsStream)
This protected constructor is used by the extended AFile classes |
| Method Summary | |
|---|---|
static void |
chooseFile(AdaptWindow callingFrame)
Pick and open a file using the filechooser |
static void |
closeProgress()
|
private static java.lang.String |
convertURL(java.lang.String $)
|
static void |
fileClose(DataFrame callingFrame)
This method (File--Close on the main menu) closes a file. |
static void |
fileExit(AdaptWindow callingFrame)
Close all open windows |
static void |
fileExit(DataFrame callingFrame)
Close all open windows |
static void |
fileOpen(AdaptWindow callingFrame)
|
static DataFrame |
fileOpen(AdaptWindow callingFrame,
java.io.File fileNew,
int iViewMode,
int iScan,
int iSlide,
boolean flagVisible)
Open a file and create a frame to contain it. |
static DataFrame |
fileOpen(AdaptWindow callingFrame,
java.lang.String $FileName,
boolean flagVisible)
Open a file and create a frame to contain it. |
static void |
fileOpen(DataFrame callingFrame)
ADAPT menu callback: File -> Open |
void |
fileOpen(java.lang.String $)
This method takes care of opening an actual file if the input string is a file name; otherwise, a file chooser dialog is used to select an input file. |
static void |
frameClose(DataFrame callingFrame)
|
static void |
frameClose(DataFrame callingFrame,
boolean showErrors)
|
java.awt.image.DataBuffer |
getDataBuffer()
|
int |
getDataType()
|
private static java.io.File[] |
getMergeFiles(java.lang.String $Path)
|
private static java.io.File[] |
getMergeFiles(java.lang.String $File1,
java.lang.String $1,
java.lang.String $2,
java.lang.String $3)
|
int |
getNumBands()
If an AFile implementor puts all data bands into a single data buffer, then the number of bands and number of slices are equivalent; otherwise this method should be overridden by the implementing class (see Iris.java for an example) |
APanel |
getPanel()
|
java.awt.image.ComponentSampleModel |
getSampleModel()
|
java.lang.String |
getScan$()
|
int |
getScanSize()
|
java.lang.String |
getSlice$()
|
java.lang.String |
getValue$()
|
int |
getVisualizationMode()
|
java.lang.String[] |
getVisualizationMode$()
|
java.lang.String |
getX$()
|
java.lang.String |
getY$()
|
boolean |
isMovie()
|
private static boolean |
isURL(java.lang.String $)
|
static void |
openProgress(javax.swing.JFrame callingFrame,
java.lang.String $Title,
java.lang.String $Message)
|
int |
read(int iScan)
|
void |
setDataBuffer(java.awt.image.DataBuffer dataBuffer)
|
void |
setLabels(java.lang.String $X,
java.lang.String $Y,
java.lang.String $Value)
|
static void |
setProgress(java.lang.String $)
|
void |
setScanSize(int iScanSize)
|
boolean |
setVisualizationMode(int iMode)
|
void |
setX$(java.lang.String $)
|
void |
setY$(java.lang.String $)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String $Value
protected java.lang.String $X
protected java.lang.String $Y
public static final int ADAPTXY
public static final int ASCII
public static final int BASLER
public static final int CIGARS
public static final int COLUMNPROFILE
protected java.awt.image.DataBuffer dataBuffer
public static javax.swing.JFileChooser fileChooser
public static final int FIST1
public static final int FIST2
public Header header
public int iFileType
public static final int IMAGE
protected com.sun.media.jai.codec.FileSeekableStream inputFile
public static final int IRIS
protected int iScanSize
protected boolean isMovie
protected int iVisualizationMode
public java.io.File jfile
private static final javax.swing.JPanel jpViewOptions
private static final javax.swing.JRadioButton jrbMScan
private static final javax.swing.JRadioButton jrbMSlice
private static final javax.swing.JRadioButton jrbSingle
protected DataFrame mainFrame
public static final int MULTISCAN
public static final int MULTISLICE
public static final int OTHER
public static final int POD
protected static AProgress progress
public static final int REDLAKEMS10
public static final int REDLAKEMS8
public static final int ROWPROFILE
public static final int SAF
public static final int SATIRSA
public static final int SATIRSB
public static final int SINGLE
public static final int TPROFILE
public static final int UNKNOWN
public static final int ZPROFILE
| Constructor Detail |
|---|
public AFile(DataFrame mainFrame,
java.io.File file)
mainFrame - the DataFrame attempting to open a filefile - the file to open
protected AFile(DataFrame mainFrame,
java.io.File file,
com.sun.media.jai.codec.FileSeekableStream fsStream)
mainFrame - the DataFrame attempting to open a filefile - the JFile to openfsStream - the file input stream| Method Detail |
|---|
public static void chooseFile(AdaptWindow callingFrame)
public static void closeProgress()
private static java.lang.String convertURL(java.lang.String $)
public static void fileClose(DataFrame callingFrame)
callingFrame - the DataFrame making the callpublic static void fileExit(AdaptWindow callingFrame)
public static void fileExit(DataFrame callingFrame)
public static void fileOpen(AdaptWindow callingFrame)
public static DataFrame fileOpen(AdaptWindow callingFrame,
java.io.File fileNew,
int iViewMode,
int iScan,
int iSlide,
boolean flagVisible)
callingFrame - the DataFrame making the callfileNew - the file to openiViewMode - either SINGLE, MULTISLICE, or MULTISCANiScan - the scan to start reading atiSlide - the offset in pixels (x and y) from the calling frameflagVisible - true to make the frame visible
public static DataFrame fileOpen(AdaptWindow callingFrame,
java.lang.String $FileName,
boolean flagVisible)
callingFrame - the DataFrame making the call$FileName - the file to openflagVisible - true to make the frame visible
public static void fileOpen(DataFrame callingFrame)
callingFrame - calling DataFramepublic void fileOpen(java.lang.String $)
$ - the file to open, or the test "Open" to use the file chooserpublic static void frameClose(DataFrame callingFrame)
public static void frameClose(DataFrame callingFrame,
boolean showErrors)
public java.awt.image.DataBuffer getDataBuffer()
public int getDataType()
private static java.io.File[] getMergeFiles(java.lang.String $Path)
private static java.io.File[] getMergeFiles(java.lang.String $File1,
java.lang.String $1,
java.lang.String $2,
java.lang.String $3)
public int getNumBands()
public APanel getPanel()
public java.awt.image.ComponentSampleModel getSampleModel()
public java.lang.String getScan$()
public int getScanSize()
public java.lang.String getSlice$()
public java.lang.String getValue$()
public int getVisualizationMode()
public java.lang.String[] getVisualizationMode$()
public java.lang.String getX$()
public java.lang.String getY$()
public boolean isMovie()
private static boolean isURL(java.lang.String $)
public static void openProgress(javax.swing.JFrame callingFrame,
java.lang.String $Title,
java.lang.String $Message)
public int read(int iScan)
public void setDataBuffer(java.awt.image.DataBuffer dataBuffer)
public void setLabels(java.lang.String $X,
java.lang.String $Y,
java.lang.String $Value)
public static void setProgress(java.lang.String $)
public void setScanSize(int iScanSize)
public boolean setVisualizationMode(int iMode)
public void setX$(java.lang.String $)
public void setY$(java.lang.String $)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||