use of ambit2.ui.DelimitersPanel in project ambit-mirror by ideaconsult.
the class FileSelector method actionPerformed.
public void actionPerformed(ActionEvent e) {
DelimitersPanel accessory = new DelimitersPanel();
File file = MyIOUtilities.selectFile(JOptionPane.getFrameForComponent(this), "Select file", Preferences.getProperty(Preferences.DEFAULT_DIR), getObject().getSupportedExtensions(), getObject().getSupportedExtDescriptions(), getObject() instanceof IInputState, accessory);
if (file != null) {
getObject().setFile(file, accessory.getFormat());
try {
if (file.getParent() != null) {
Preferences.setProperty(Preferences.DEFAULT_DIR, file.getParent());
Preferences.saveProperties(getClass().getName());
}
} catch (Exception x) {
}
filename.setText(getObject().getFilename());
filename.setToolTipText(getObject().getFilename());
}
}
Aggregations