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


Java SwingTools.showVerySimpleErrorMessage方法代码示例

本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.showVerySimpleErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.showVerySimpleErrorMessage方法的具体用法?Java SwingTools.showVerySimpleErrorMessage怎么用?Java SwingTools.showVerySimpleErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.rapidminer.gui.tools.SwingTools的用法示例。


在下文中一共展示了SwingTools.showVerySimpleErrorMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apply

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void apply() {
	RepositoryLocation absLoc;
	try {
		absLoc = operator.getParameterAsRepositoryLocation(key);
		final RepositoryLocation processLoc = operator.getProcess().getRepositoryLocation().parent();
		if (processLoc == null) {
			SwingTools.showVerySimpleErrorMessage("quickfix_failed", "Process is not stored in repository.");
		} else {
			String relative = absLoc.makeRelative(processLoc);
			operator.setParameter(key, relative);
		}
	} catch (UserError e) {
		// Should not happen. Parameter should be set, otherwise we would not have created this
		// prefix.
		SwingTools.showVerySimpleErrorMessage("quickfix_failed", e.toString());
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:19,代码来源:RelativizeRepositoryLocationQuickfix.java

示例2: actionPerformed

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(Entry entry) {
	// no renaming of repositores allowed, RepositoryConfigurationDialog is responsible for that
	if (entry instanceof Repository) {
		return;
	}
	String name = SwingTools.showRepositoryEntryInputDialog("file_chooser.rename", entry.getName(), entry.getName());
	if ((name != null) && !name.equals(entry.getName())) {
		boolean success = false;
		try {
			success = entry.rename(name);
		} catch (Exception e) {
			SwingTools.showSimpleErrorMessage("cannot_rename_entry", e, entry.getName(), name, e.getMessage());
			return;
		}
		if (!success) {
			SwingTools.showVerySimpleErrorMessage("cannot_rename_entry", entry.getName(), name);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:21,代码来源:RenameRepositoryEntryAction.java

示例3: displayResult

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/**
 * Displays the result of a test action or a configurator action.
 */
protected void displayResult(ActionResult result) {
	ImageIcon icon = null;
	if (Result.SUCCESS.equals(result.getResult())) {
		icon = SUCCESS_ICON;
		testLabel.setIcon(icon);
		// SwingTools.showMessageDialog("configuration.test.success", result.getMessage());
	} else if (Result.FAILURE.equals(result.getResult())) {
		icon = FAILURE_ICON;
		testLabel.setIcon(icon);
		SwingTools.showVerySimpleErrorMessage("configuration.test.fail", result.getMessage());
	}

	testLabel.setToolTipText(result.getMessage());

	updateButtonState(false);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:20,代码来源:ConfigurableDialog.java

示例4: actionPerformed

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
	boolean res = false;
	String itemString = (isDirectory() ? "directory" : "file") + " " + getItemName();
	int resInt = SwingTools.showConfirmDialog("file_chooser.delete", ConfirmDialog.YES_NO_CANCEL_OPTION, itemString);
	if (resInt == ConfirmDialog.YES_OPTION) {
		try {
			res = delete();
		} catch (Exception exp) {
			// do nothing
		}
		if (!res) {
			SwingTools.showVerySimpleErrorMessage("file_chooser.delete.error", itemString);
		} else {
			getParentPane().getFilePane().rescanDirectory();
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:19,代码来源:Item.java

示例5: renameFile

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void renameFile() {
	this.response = SwingTools.showInputDialog("file_chooser.rename", this.fileName, (isDirectory() ? "directory"
			: "file") + " " + this.fileName);
	try {
		if (this.response.equals("") || this.response == null) {
			SwingTools.showVerySimpleErrorMessage("file_chooser.rename.invalid");
		} else {
			if (this.file.renameTo(new File(this.file.getParentFile(), this.response))) {
				this.file = new File(this.file.getParentFile(), this.response);
				getFileData();
				this.parentPane.filePane.rescanDirectory();
				this.repaint();
			} else {
				SwingTools.showVerySimpleErrorMessage("file_chooser.rename.error");
			}
		}
	} catch (Exception exp) {
		// do nothing
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:21,代码来源:Item.java

示例6: createNameDialog

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private String createNameDialog(String oldName) {
	String newName = SwingTools.showInputDialog("plotter.configuration_dialog.color_scheme_dialog.rename", oldName);
	if (newName != null) {
		boolean success = currentColorSchemes.get(newName) == null;
		if (newName.equals(oldName)) {
			success = true;
		}
		if (!success) {
			SwingTools.showVerySimpleErrorMessage("cannot_rename_entry", oldName, newName);
			return oldName;
		}
		return newName;
	}
	return null;

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:17,代码来源:ColorSchemeDialog.java

示例7: selectOperators

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public void selectOperators(List<Operator> currentlySelected) {
	if (currentlySelected == null) {
		currentlySelected = Collections.<Operator> singletonList(process.getRootOperator());
	}
	for (Operator op : currentlySelected) {
		Process selectedProcess = op.getProcess();
		if (selectedProcess == null || selectedProcess != process) {
			SwingTools.showVerySimpleErrorMessage("op_deleted", op.getName());
			return;
		}
	}

	ProcessRendererModel model = processPanel.getProcessRenderer().getModel();
	model.clearOperatorSelection();
	model.addOperatorsToSelection(currentlySelected);
	model.fireOperatorSelectionChanged(currentlySelected);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:18,代码来源:MainFrame.java

示例8: browse

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/**
 * On systems where Desktop.getDesktop().browse() does not work for http://, creates an HTML
 * page which redirects to the given URI and calls Desktop.browse() with this file through the
 * file:// url which seems to work better, at least for KDE.
 */
public static void browse(URI uri) throws IOException {
	if (Desktop.isDesktopSupported()) {
		try {
			Desktop.getDesktop().browse(uri);
		} catch (IOException e) {
			File tempFile = File.createTempFile("rmredirect", ".html");
			tempFile.deleteOnExit();
			FileWriter out = new FileWriter(tempFile);
			try {
				out.write(String.format(
						"<!DOCTYPE html>\n"
								+ "<html><meta http-equiv=\"refresh\" content=\"0; URL=%s\"><body>You are redirected to %s</body></html>",
						uri.toString(), uri.toString()));
			} finally {
				out.close();
			}
			Desktop.getDesktop().browse(tempFile.toURI());
		} catch (UnsupportedOperationException e1) {
			throw new IOException(e1);
		}
	} else {
		LOGGER.log(Level.SEVERE, "Failed to open web page in browser, browsing is not supported on this platform.");
		SwingTools.showVerySimpleErrorMessage("url_handler.unsupported", uri.toString());
	}

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:32,代码来源:RMUrlHandler.java

示例9: performRefresh

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/**
 * This is a combo of checking connection, updating status,
 * pulling result and showing result.
 */
private void performRefresh() {
    if (!checkConnection()) return;
    try {
        refreshStatus();
        pullResult();
    } catch (MidasHTTPException error) {
        SwingTools.showVerySimpleErrorMessage("http_error", error.statusCode(), error.getMessage());
    }
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:14,代码来源:RemoteResultOverviewItem.java

示例10: initUpdateService

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void initUpdateService() {
    if(this.updateService == null) {
        try {
            this.updateService = MarketplaceUpdateManager.getService();
        } catch (Exception var2) {
            SwingTools.showVerySimpleErrorMessage("failed_update_server", new Object[]{var2, MarketplaceUpdateManager.getBaseUrl()});
        }
    }

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:PackageDescriptorCache.java

示例11: actionPerformed

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
	if (UIManager.getBoolean("FileChooser.readOnly")) {
		return;
	}
	JFileChooser fc = getFileChooser();
	File currentDirectory = fc.getCurrentDirectory();
	FileSystemView fsv = fc.getFileSystemView();
	File newFolder = null;

	String name = SwingTools.showInputDialog("file_chooser.new_folder", "");

	try {
		if (name != null && !"".equals(name)) {
			newFolder = fsv.createNewFolder(currentDirectory);
			if (newFolder.renameTo(fsv.createFileObject(fsv.getParentDirectory(newFolder), name))) {
				newFolder = fsv.createFileObject(fsv.getParentDirectory(newFolder), name);
			} else {
				SwingTools.showVerySimpleErrorMessage("file_chooser.new_folder.rename", name);
			}
		}
	} catch (IOException exc) {
		SwingTools.showVerySimpleErrorMessage("file_chooser.new_folder.create", name);
		return;
	} catch (Exception exp) {
		// do nothing
	}

	if (fc.isMultiSelectionEnabled()) {
		fc.setSelectedFiles(new File[] { newFolder });
	} else {
		fc.setSelectedFile(newFolder);
	}

	fc.rescanCurrentDirectory();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:37,代码来源:FileChooserUI.java

示例12: actionPerformed

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
	try {
		ExampleSource exampleSource = OperatorService.createOperator(ExampleSource.class);
		AttributeEditorDialog dialog = new AttributeEditorDialog(exampleSource, null);
		dialog.setVisible(true);
	} catch (OperatorCreationException ex) {
		SwingTools.showVerySimpleErrorMessage("cannot_start_attr_editor");
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:AttributeEditorAction.java

示例13: actionPerformed

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
	try {
		StartupDialogRegistry.INSTANCE.showStartupDialog(ToolbarButton.TUTORIAL);
	} catch (NoStartupDialogRegistreredException e1) {
		SwingTools.showVerySimpleErrorMessage("tutorials_not_available");
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:9,代码来源:TutorialAction.java

示例14: checkConnection

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
/**
 * Check http connection, unsuccessful try toggles an error dialog.
 *
 * @return false if cannot connect to server;
 */
private boolean checkConnection() {
    if (!status.isDone()) {
        try {
            client.getSessionState(status.session());
        } catch (Exception error) {
            SwingTools.showVerySimpleErrorMessage(error.getMessage());
            return false;
        }
    }
    return true;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:17,代码来源:RemoteResultOverviewItem.java

示例15: actionPerformed

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent arg0) {
	try {
		Integer.parseInt(k_distance_jtext.getText());
	} catch (NumberFormatException e) {
		SwingTools.showVerySimpleErrorMessage("enter_k_value");
		return;
	}

	this.k = Integer.parseInt(k_distance_jtext.getText());
	this.kDistanceValues = null;
	repaint();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:14,代码来源:SimilarityKDistanceVisualization.java


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