Methods Summary |
---|
private void | addButton(javax.swing.Action buttonAction, int location)
GridBagConstraints buttonPosition = new GridBagConstraints();
buttonPosition.gridx = location;
buttonPosition.gridwidth = 1;
buttonPosition.gridy = 0;
buttonPosition.gridheight = 1;
buttonPosition.weightx = 0.0;
add(new ActionButton(buttonAction), buttonPosition);
|
protected void | buildBasicGUI()
createFileNameField();
addButton(new BrowseButtonAction(), 3);
|
private void | createFileNameField()
_fileNameField = new JTextField();
GridBagConstraints textFieldPosition = new GridBagConstraints();
textFieldPosition.gridx = 0;
textFieldPosition.gridwidth = 3;
textFieldPosition.gridy = 0;
textFieldPosition.gridheight = 1;
textFieldPosition.weightx = 1.0;
textFieldPosition.fill = GridBagConstraints.HORIZONTAL;
add(_fileNameField, textFieldPosition);
|
public java.io.File | getFile()
String fileName = _fileNameField.getText();
if (null != fileName) {
return new File(fileName);
}
return null;
|
public java.io.FileInputStream | getFileInputStream()
String fileName = _fileNameField.getText();
if (null != fileName) {
try {
return new FileInputStream(fileName);
} catch (java.io.FileNotFoundException e) {
}
}
return null;
|
public java.lang.String | getFileName()
return _fileNameField.getText();
|
public java.io.FileOutputStream | getFileOutputStream()
String fileName = _fileNameField.getText();
if (null != fileName) {
try {
return new FileOutputStream(fileName);
} catch (java.io.FileNotFoundException e) {
}
}
return null;
|
public java.io.FileReader | getFileReader()
String fileName = _fileNameField.getText();
if (null != fileName) {
try {
return new FileReader(fileName);
} catch (java.io.FileNotFoundException e) {
}
}
return null;
|
public java.io.FileWriter | getFileWriter()
String fileName = _fileNameField.getText();
if (null != fileName) {
try {
return new FileWriter(fileName);
} catch (java.io.IOException e) {
}
}
return null;
|