本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.showSimpleErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.showSimpleErrorMessage方法的具体用法?Java SwingTools.showSimpleErrorMessage怎么用?Java SwingTools.showSimpleErrorMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.gui.tools.SwingTools
的用法示例。
在下文中一共展示了SwingTools.showSimpleErrorMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SQLQueryBuilder
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public SQLQueryBuilder(Window owner, DatabaseHandler databaseHandler) {
super(owner, "build_sql_query", ModalityType.APPLICATION_MODAL, new Object[0]);
this.tableList = new JList(new DefaultListModel());
this.attributeList = new JList(new DefaultListModel());
this.whereTextArea = new JTextArea(4, 15);
this.sqlQueryTextArea = new SQLEditor();
this.surroundingDialog = null;
this.connectionStatus = new JLabel();
this.gridPanel = new JPanel(createGridLayout(1, 3));
this.attributeNameMap = new LinkedHashMap();
this.databaseHandler = databaseHandler;
this.cache = TableMetaDataCache.getInstance();
if(!"false".equals(ParameterService.getParameterValue("rapidminer.gui.fetch_data_base_table_names"))) {
try {
this.retrieveTableNames();
} catch (SQLException var4) {
SwingTools.showSimpleErrorMessage("db_connection_failed_simple", var4, new Object[0]);
this.databaseHandler = null;
}
}
}
示例2: getParameterTypes
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();
ParameterType type = new ParameterTypeLinkButton(PARAMETER_INSTALL_EXTENSION,
I18N.getGUILabel("dummy.parameter.install_extension"), new ResourceAction("install_extension_dummy") {
private static final long serialVersionUID = 1423879776955743834L;
@Override
public void actionPerformed(ActionEvent e) {
try {
UpdateManagerRegistry.INSTANCE.get().showUpdateDialog(false, getExtensionId());
} catch (URISyntaxException | IOException e1) {
SwingTools.showSimpleErrorMessage("dummy.marketplace_connection_error", e1);
}
}
});
type.setExpert(false);
types.add(type);
return types;
}
示例3: handleFetchPackageNames
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public List<String> handleFetchPackageNames() {
UpdateServerAccount account = MarketplaceUpdateManager.getUpdateServerAccount();
if(!account.isLoggedIn()) {
return new ArrayList();
} else {
AccountService accountService = null;
try {
accountService = MarketplaceUpdateManager.getAccountService();
} catch (Exception var4) {
SwingTools.showSimpleErrorMessage("failed_update_server", var4, new Object[]{MarketplaceUpdateManager.getBaseUrl()});
}
if (accountService != null) {
return accountService.getBookmarkedProducts("rapidminer");
}
return Collections.emptyList();
}
}
示例4: showAsResult
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/** Loads the data held by the given entry (in the background) and opens it as a result. */
public static void showAsResult(final IOObjectEntry data) {
if (data == null) {
throw new IllegalArgumentException("data entry must not be null");
}
final ProgressThread downloadProgressThread = new ProgressThread("download_from_repository") {
@Override
public void run() {
try {
ResultObject result = (ResultObject) data.retrieveData(this.getProgressListener());
if (isCancelled()) {
return;
}
result.setSource(data.getLocation().toString());
RapidMinerGUI.getMainFrame().getResultDisplay().showResult(result);
} catch (Exception e1) {
SwingTools.showSimpleErrorMessage("cannot_fetch_data_from_repository", e1);
}
}
};
downloadProgressThread.start();
}
示例5: saveRecentFileList
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private static void saveRecentFileList() {
File file = FileSystemService.getUserConfigFile("history");
PrintWriter out = null;
try {
out = new PrintWriter(new FileWriter(file));
for (ProcessLocation loc : recentFiles) {
out.println(loc.toHistoryFileString());
}
} catch (IOException e) {
SwingTools.showSimpleErrorMessage("cannot_write_history_file", e);
} finally {
if (out != null) {
out.close();
}
}
}
示例6: finish
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
protected void finish() {
try {
if (localButton.isSelected()) {
localRepositoryPanel.makeRepository();
} else {
// check all custom repository radio buttons
for (Pair<RepositoryConfigurationPanel, JRadioButton> value : repoConfigPanels.values()) {
// once we have found the selected radio button
if (value.getSecond().isSelected()) {
// lookup the corresponding factory and create the repository
value.getFirst().makeRepository();
}
}
}
super.finish();
} catch (RepositoryException e) {
SwingTools.showSimpleErrorMessage("cannot_create_repository", e);
}
}
示例7: overwriteProcess
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void overwriteProcess(final ProcessEntry processEntry) {
if (SwingTools.showConfirmDialog("overwrite", ConfirmDialog.YES_NO_OPTION, processEntry.getLocation()) == ConfirmDialog.YES_OPTION) {
ProgressThread storeProgressThread = new ProgressThread("store_process") {
@Override
public void run() {
getProgressListener().setTotal(100);
getProgressListener().setCompleted(10);
try {
Process process = RapidMinerGUI.getMainFrame().getProcess();
process.setProcessLocation(new RepositoryProcessLocation(processEntry.getLocation()));
processEntry.storeXML(process.getRootOperator().getXML(false));
RapidMinerGUI.addToRecentFiles(process.getProcessLocation());
RapidMinerGUI.getMainFrame().processHasBeenSaved();
} catch (Exception e) {
SwingTools.showSimpleErrorMessage("cannot_store_process_in_repository", e, processEntry.getName());
} finally {
getProgressListener().setCompleted(100);
getProgressListener().complete();
}
}
};
storeProgressThread.start();
}
}
示例8: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
try {
if (RapidMinerGUI.getMainFrame().close()) {
Process process = new Process(ProcessExecutionResultOverview.this.process);
process.setProcessLocation(processLocation);
RapidMinerGUI.getMainFrame().setProcess(process, true);
}
} catch (Exception e1) {
SwingTools.showSimpleErrorMessage("cannot_restore_history_process", e1);
}
}
示例9: createSelectButton
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private JComponent createSelectButton(final RepositoryLocationChooser chooser) {
JButton selectButton = new JButton(new ResourceAction("getting_started.open", new Object[0]) {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
if(RapidMinerGUI.getMainFrame().close()) {
try {
GettingStartedDialog.logStats("open_process_card", "open_from_location");
String e1 = chooser.getRepositoryLocation();
if(e1 != null) {
try {
RepositoryLocation e11 = new RepositoryLocation(e1);
Entry entry = e11.locateEntry();
if(entry instanceof ProcessEntry) {
OpenAction.open(new RepositoryProcessLocation(e11), true);
OpenProcessCard.this.owner.dispose();
} else if(entry instanceof IOObjectEntry) {
OpenAction.showAsResult((IOObjectEntry)entry);
OpenProcessCard.this.owner.dispose();
} else {
SwingTools.showVerySimpleErrorMessage("no_data_or_process", new Object[0]);
}
} catch (MalformedRepositoryLocationException | RepositoryException var5) {
SwingTools.showSimpleErrorMessage("while_loading", var5, new Object[]{e1, var5.getMessage()});
}
}
} catch (MalformedRepositoryLocationException var6) {
SwingTools.showSimpleErrorMessage("while_loading", var6, new Object[]{"", var6.getMessage()});
}
}
}
});
selectButton.setFocusable(false);
this.styleButton(selectButton);
return selectButton;
}
示例10: getImportThread
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
protected ProgressThread getImportThread(final RepositoryLocation entryLocation, final Folder parent) {
error = false;
ProgressThread importWorker = new ProgressThread("import_data") {
@Override
public void run() {
try {
parent.createBlobEntry(entryLocation.getName());
Entry newEntry = entryLocation.locateEntry();
if (newEntry == null) {
throw new RepositoryException("Creation of blob entry failed.");
}
BlobEntry blob = (BlobEntry) newEntry;
try (FileInputStream fileInputStream = new FileInputStream(source.getLocation().toFile());
OutputStream outputStream = blob.openOutputStream(getChooser().getMediaType())) {
byte[] buffer = new byte[1024 * 20];
int length;
while ((length = fileInputStream.read(buffer)) != -1) {
if (isCancelled()) {
break;
}
outputStream.write(buffer, 0, length);
}
outputStream.flush();
}
if (isCancelled()) {
blob.delete();
}
} catch (RepositoryException | IOException e) {
error = true;
SwingTools.showSimpleErrorMessage("import_blob_failed", e, e.getMessage());
}
}
};
importWorker.setIndeterminate(true);
return importWorker;
}
示例11: saveUserDefinedOperators
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private static void saveUserDefinedOperators() {
try {
saveOperatorDocBundle(new File(FileSystemService.getUserDefinedOperatorHome(),
UserDefinedOperatorDocXMLFile));
saveOperators(new File(FileSystemService.getUserDefinedOperatorHome(),
UserDefinedOperatorXML));
} catch (IOException e) {
SwingTools.showSimpleErrorMessage(ioErrorKey, e);
}
}
示例12: openMarketplaceDialog
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void openMarketplaceDialog() {
try {
UpdateManagerRegistry.INSTANCE.get().showUpdateDialog(false);
updateTypeSelectionContentPanel(null, false);
} catch (URISyntaxException | IOException e1) {
SwingTools.showSimpleErrorMessage("io.dataimport.step.type_selection.marketplace_connection_error", e1);
}
}
示例13: updatePurchasedPackages
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public void updatePurchasedPackages() {
if(this.usAccount.isLoggedIn()) {
try {
this.purchasedPackages = new HashSet(MarketplaceUpdateManager.getAccountService().getLicensedProducts());
this.setChanged();
this.notifyObservers();
} catch (Exception var2) {
SwingTools.showSimpleErrorMessage("error_accessing_marketplace_account", var2, new Object[]{var2.getMessage()});
this.purchasedPackages = new HashSet();
}
} else {
this.purchasedPackages = new HashSet();
}
}
示例14: save
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/**
* Saves the specified process to its {@link ProcessLocation}. If it has none, will open the
* SaveAs dialog. <br/>
* <strong>Note:</strong> This call executes in the calling thread. In other words, this would
* block the GUI if called from the EDT!
*
* @param process
* the {@link Process} to save
* @return true on success, false on failure
*/
public static boolean save(final Process process) {
if (process.hasSaveDestination()) {
if (confirmOverwriteWithNewVersion(process)) {
// user wants to save
// disable save action
RapidMinerGUI.getMainFrame().SAVE_ACTION.setEnabled(false);
boolean successful = true;
try {
process.save();
// check if process has really been saved or user has pressed
// cancel in saveAs dialog
if (process.hasSaveDestination()) {
RapidMinerGUI.useProcessFile(process);
RapidMinerGUI.getMainFrame().processHasBeenSaved();
}
} catch (IOException e) {
successful = false;
SwingTools
.showSimpleErrorMessage("cannot_save_process", e, process.getProcessLocation(), e.getMessage());
// something went wrong, enable save action again
RapidMinerGUI.getMainFrame().SAVE_ACTION.setEnabled(true);
}
return successful;
} else {
return false;
}
} else {
// SaveAsAction.saveAs cannot be null since async=false
return SaveAsAction.saveAs(process, false);
}
}
示例15: actionPerformed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
canceled = false;
PrintingTools.getPrinterJob().setPrintable(
new ComponentPrinter(new SimplePrintableComponent(component, componentName, "printer.png")));
if (PrintingTools.getPrinterJob().printDialog()) {
try {
PrintingTools.getPrinterJob().print();
} catch (PrinterException pe) {
SwingTools.showSimpleErrorMessage("printer_error", pe);
}
} else {
canceled = true;
}
}