當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。