当前位置: 首页>>代码示例>>Java>>正文


Java SwingTools.chooseFile方法代码示例

本文整理汇总了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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:29,代码来源:ManageDatabaseDriversDialog.java

示例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();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:AttributeWeightsDialog.java

示例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());
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:9,代码来源:AttributeWeightsDialog.java

示例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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:ImportProcessAction.java

示例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);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:13,代码来源:LoadDataAction.java

示例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);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:13,代码来源:SaveDataAction.java

示例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);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:13,代码来源:LoadSeriesDataAction.java

示例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();
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:15,代码来源:FileValueCellEditor.java

示例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());
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:15,代码来源:ExportProcessAction.java

示例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);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:7,代码来源:AttributeEditor.java


注:本文中的com.rapidminer.gui.tools.SwingTools.chooseFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。