本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.chooseFile方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.chooseFile方法的具体用法?Java SwingTools.chooseFile怎么用?Java SwingTools.chooseFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.gui.tools.SwingTools
的用法示例。
在下文中一共展示了SwingTools.chooseFile方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DriverPane
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public DriverPane() {
this.setLayout(new GridBagLayout());
this.classNameCombo.setEditable(true);
JButton fileButton = new JButton(new ResourceAction(true, "manage_database_drivers.jarfile", new Object[0]) {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
File file = SwingTools.chooseFile(DriverPane.this, (File)null, true, "jar", "JDBC driver jar file");
if(file != null) {
DriverPane.this.jarFileField.setText(file.getAbsolutePath());
((DefaultComboBoxModel)DriverPane.this.classNameCombo.getModel()).removeAllElements();
Iterator var3 = ManageDatabaseDriversDialog.this.findDrivers(file).iterator();
while(var3.hasNext()) {
String driver = (String)var3.next();
((DefaultComboBoxModel)DriverPane.this.classNameCombo.getModel()).addElement(driver);
}
}
}
});
this.add("name", this.nameField, (JComponent)null);
this.add("urlprefix", this.urlprefixField, (JComponent)null);
this.add("port", this.portField, (JComponent)null);
this.add("dbseparator", this.dbseparatorField, (JComponent)null);
this.add("jarfile", this.jarFileField, fileButton);
this.add("classname", this.classNameCombo, (JComponent)null);
}
示例2: load
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void load() {
File file = SwingTools.chooseFile(null, null, true, "wgt", "attribute weight file");
try {
AttributeWeights fileWeights = AttributeWeights.load(file);
attributeTableModel.mergeWeights(fileWeights);
} catch (IOException e) {
SwingTools.showSimpleErrorMessage("cannot_load_attr_weights_from_file", e, file.getName());
}
update();
}
示例3: save
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void save() {
File file = SwingTools.chooseFile(null, null, true, "wgt", "attribute weight file");
try {
attributeTableModel.getAttributeWeights().writeAttributeWeights(file, Tools.getDefaultEncoding());
} catch (IOException e) {
SwingTools.showSimpleErrorMessage("cannot_write_attr_weights_to_file", e, file.getName());
}
}
示例4: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
File file = SwingTools.chooseFile(RapidMinerGUI.getMainFrame(), "import_process", null, true, false, new String[] {
RapidMiner.PROCESS_FILE_EXTENSION, "xml" }, new String[] { "Process File", "Process File" });
if (file == null) {
return;
}
open(file);
}
示例5: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
File file = SwingTools.chooseFile(this.attributeEditor, null, true, null, null);
if (file != null) {
try {
this.attributeEditor.readData(file, AttributeEditor.LOAD_DATA);
} catch (java.io.IOException ex) {
JOptionPane.showMessageDialog(this.attributeEditor, e.toString(), "Error loading " + file,
JOptionPane.ERROR_MESSAGE);
}
}
}
示例6: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
File file = SwingTools.chooseFile(this.attributeEditor, null, false, "dat", "data file");
if (file != null) {
try {
attributeEditor.writeData(file);
} catch (java.io.IOException ex) {
JOptionPane.showMessageDialog(this.attributeEditor, e.toString(), "Error saving data file " + file,
JOptionPane.ERROR_MESSAGE);
}
}
}
示例7: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
File file = SwingTools.chooseFile(this.attributeEditor, null, true, null, null);
if (file != null) {
try {
this.attributeEditor.readData(file, AttributeEditor.LOAD_SERIES_DATA);
} catch (java.io.IOException ex) {
JOptionPane.showMessageDialog(this.attributeEditor, e.toString(), "Error loading " + file,
JOptionPane.ERROR_MESSAGE);
}
}
}
示例8: buttonPressed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void buttonPressed() {
String value = (String) getCellEditorValue();
File file = value == null || value.length() == 0 ? null : RapidMinerGUI.getMainFrame().getProcess()
.resolveFileName(value);
File selectedFile = SwingTools.chooseFile(RapidMinerGUI.getMainFrame(), file, true,
type instanceof ParameterTypeDirectory, type.getExtensions(), type.getKeys(),
type.isAddAllFileExtensionsFilter());
if (selectedFile != null) {
setText(selectedFile);
fireEditingStopped();
} else {
fireEditingCanceled();
}
}
示例9: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
File file = SwingTools.chooseFile(RapidMinerGUI.getMainFrame(), "export_process", null, false, false, new String[] {
RapidMiner.PROCESS_FILE_EXTENSION, "xml" }, new String[] { "Process File", "Process File" });
if (file == null) {
return;
}
try {
new FileProcessLocation(file).store(RapidMinerGUI.getMainFrame().getProcess(), null);
} catch (IOException e1) {
SwingTools.showSimpleErrorMessage("cannot_save_process", e1, RapidMinerGUI.getMainFrame().getProcess()
.getProcessLocation(), e1.getMessage());
}
}
示例10: openAttributeFile
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public void openAttributeFile() {
File file = SwingTools.chooseFile(this, null, true, "aml", "attribute description file");
if (file != null) {
openAttributeFile(file);
}
}