- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中ij.gui.YesNoCancelDialog.yesPressed()
方法的一些代码示例,展示了YesNoCancelDialog.yesPressed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YesNoCancelDialog.yesPressed()
方法的具体详情如下:
包路径:ij.gui.YesNoCancelDialog
类名称:YesNoCancelDialog
方法名:yesPressed
[英]Returns true if the user dismissed dialog by pressing "Yes".
[中]如果用户按“是”取消对话框,则返回true。
代码示例来源:origin: sc.fiji/TrakEM2_
private boolean upgradeAreaListTable() throws Exception {
ResultSet r = connection.createStatement().executeQuery("SELECT column_name FROM information_schema.columns WHERE table_name='ab_area_paths' AND column_name='fill_paint'");
if (!r.next()) {
YesNoCancelDialog yn = new YesNoCancelDialog(IJ.getInstance(), "Upgrade", "Need to upgrade table ab_area_paths.\nThe column 'fill_paint' will be added.\nProceed?");
if (!yn.yesPressed()) {
r.close();
return false;
}
connection.createStatement().executeUpdate("ALTER TABLE ab_area_paths ADD fill_paint BOOLEAN");
connection.createStatement().executeUpdate("ALTER TABLE ab_area_paths ALTER COLUMN fill_paint SET DEFAULT TRUE");
}
r.close();
return true;
}
代码示例来源:origin: sc.fiji/TrakEM2_
private boolean upgradeDisplaysTable() throws Exception {
ResultSet r = connection.prepareStatement("SELECT column_name FROM information_schema.columns WHERE table_name='ab_displays' AND column_name='scroll_step'").executeQuery();
if (!r.next()) {
YesNoCancelDialog yn = new YesNoCancelDialog(IJ.getInstance(), "Upgrade", "Need to upgrade table ab_displays.\nThe column 'scroll_step' will be added.\nProceed?");
if (!yn.yesPressed()) {
r.close();
return false;
}
connection.prepareStatement("ALTER TABLE ab_displays ADD scroll_step INT").execute();
connection.prepareStatement("ALTER TABLE ab_displays ALTER COLUMN scroll_step SET DEFAULT 1").execute();
// in two rows, so that 7.4.* is still supported.
}
r.close();
return true;
}
代码示例来源:origin: sc.fiji/TrakEM2_
private boolean upgradeLayerSetTable() throws Exception {
final Statement st = connection.createStatement();
ResultSet r = st.executeQuery("SELECT column_name FROM information_schema.columns WHERE table_name='ab_layer_sets' AND column_name='snapshots_enabled'");
if (!r.next()) {
YesNoCancelDialog yn = new YesNoCancelDialog(IJ.getInstance(), "Upgrade", "Need to upgrade table ab_layer_sets.\nThe column 'snapshots_enabled' will be added.\nProceed?");
if (!yn.yesPressed()) {
r.close();
return false;
}
st.execute("ALTER TABLE ab_layer_sets ADD snapshots_enabled BOOLEAN");
st.execute("ALTER TABLE ab_layer_sets ALTER COLUMN snapshots_enabled SET DEFAULT true");
}
r.close();
return true;
}
private boolean upgradeDisplaysTable() throws Exception {
代码示例来源:origin: sc.fiji/TrakEM2_
private static boolean check(final JFrame frame, final List<FilterWrapper> wrappers) {
if (!wrappers.isEmpty()) {
final String s = sanityCheck(wrappers);
return 0 == s.length()
|| new YesNoCancelDialog(frame, "WARNING", s + "\nContinue?").yesPressed();
}
return true;
}
代码示例来源:origin: sc.fiji/TrakEM2_
private boolean upgradePatchesTable() throws Exception {
Statement st = connection.createStatement();
ResultSet r = st.executeQuery("SELECT column_name FROM information_schema.columns WHERE table_name='ab_patches' AND column_name='min'");
if (!r.next()) {
YesNoCancelDialog yn = new YesNoCancelDialog(IJ.getInstance(), "Upgrade", "Need to upgrade the table ab_patches.\nThe columns 'min' and 'max' will be added.\nProceed?");
if (!yn.yesPressed()) {
r.close();
return false;
}
st.executeUpdate("ALTER TABLE ab_patches ADD min DOUBLE PRECISION");
st.executeUpdate("ALTER TABLE ab_patches ALTER COLUMN min SET DEFAULT -1");
st.executeUpdate("ALTER TABLE ab_patches ADD max DOUBLE PRECISION");
st.executeUpdate("ALTER TABLE ab_patches ALTER COLUMN max SET DEFAULT -1");
}
r.close();
return true;
}
代码示例来源:origin: sc.fiji/TrakEM2_
try { return new TaskOnEDT<Boolean>(new Callable<Boolean>() { @Override
public Boolean call() {
final YesNoCancelDialog dialog = new YesNoCancelDialog(IJ.getInstance(), "Execute?", msg);
if (dialog.yesPressed()) {
return true;
}
return false;
}}).get(); } catch (final Throwable t) { IJError.print(t); return false; }
}
代码示例来源:origin: sc.fiji/3D_Viewer
public static File promptForFile(final String title, final String suggestion,
final String ending)
{
final SaveDialog sd = new SaveDialog(title, suggestion, ending);
final String dir = sd.getDirectory();
if (null == dir) return null;
String filename = sd.getFileName();
if (!filename.toLowerCase().endsWith(ending)) filename += ending;
final File file = new File(dir, filename);
// check if file exists
if (!IJ.isMacOSX()) {
if (file.exists()) {
final YesNoCancelDialog yn =
new YesNoCancelDialog(IJ.getInstance(), "Overwrite?", "File " +
filename + " exists!\nOverwrite?");
if (!yn.yesPressed()) return null;
}
}
return file;
}
代码示例来源:origin: sc.fiji/VIB-lib
public void closeSafely() {
if( plugin.unsaved ) {
YesNoCancelDialog d = new YesNoCancelDialog(
IJ.getInstance(), "Really quit?",
"There are unsaved changes. Do you really want to quit?" );
if( ! d.yesPressed() )
return;
}
plugin.stopFineTuneThreads();
dispose();
}
代码示例来源:origin: net.imagej/ij
double getBoolean() {
interp.getLeftParen();
String prompt = getString();
String yesButton = " Yes ";
String noButton = " No ";
if (interp.nextToken()==',') {
yesButton = getNextString();
noButton = getNextString();
}
interp.getRightParen();
String title = interp.macroName!=null?interp.macroName:"";
if (title.endsWith(" Options"))
title = title.substring(0, title.length()-8);
YesNoCancelDialog d = new YesNoCancelDialog(IJ.getInstance(), title, prompt, yesButton, noButton);
if (d.cancelPressed()) {
interp.done = true;
return 0.0;
} else if (d.yesPressed())
return 1.0;
else
return 0.0;
}
代码示例来源:origin: imagej/ImageJA
double getBoolean() {
interp.getLeftParen();
String prompt = getString();
String yesButton = " Yes ";
String noButton = " No ";
if (interp.nextToken()==',') {
yesButton = getNextString();
noButton = getNextString();
}
interp.getRightParen();
String title = interp.macroName!=null?interp.macroName:"";
if (title.endsWith(" Options"))
title = title.substring(0, title.length()-8);
YesNoCancelDialog d = new YesNoCancelDialog(IJ.getInstance(), title, prompt, yesButton, noButton);
if (d.cancelPressed()) {
interp.done = true;
return 0.0;
} else if (d.yesPressed())
return 1.0;
else
return 0.0;
}
代码示例来源:origin: net.imagej/ij
int setupDialog(ImagePlus imp, int flags) {
int stackSize = imp.getStackSize();
if (stackSize>1) {
String macroOptions = Macro.getOptions();
if (macroOptions!=null) {
if (macroOptions.indexOf("stack ")>=0)
return flags+PlugInFilter.DOES_STACKS;
else
return flags;
}
YesNoCancelDialog d = new YesNoCancelDialog(IJ.getInstance(),
"Histogram", "Include all "+stackSize+" images?");
if (d.cancelPressed())
return PlugInFilter.DONE;
else if (d.yesPressed()) {
if (Recorder.record)
Recorder.recordOption("stack");
return flags+PlugInFilter.DOES_STACKS;
}
if (Recorder.record)
Recorder.recordOption("slice");
}
return flags;
}
代码示例来源:origin: sc.fiji/VIB-lib
void delete(int i) {
String name = points.get(i).getName();
YesNoCancelDialog d = new YesNoCancelDialog( IJ.getInstance(), "Really delete?",
"Do you really want to delete the point \""+name+"\"?" );
if( d.yesPressed() ) {
points.delete(i);
dialog.recreatePointsPanel();
dialog.pack();
}
}
代码示例来源:origin: net.imagej/ij
boolean saveContents() {
int lineCount = textPanel.getLineCount();
if (!textPanel.unsavedLines) lineCount = 0;
ImageJ ij = IJ.getInstance();
boolean macro = IJ.macroRunning() || Interpreter.isBatchMode();
boolean isResults = getTitle().contains("Results");
if (lineCount>0 && !macro && ij!=null && !ij.quitting() && isResults) {
YesNoCancelDialog d = new YesNoCancelDialog(this, getTitle(), "Save "+lineCount+" measurements?");
if (d.cancelPressed())
return false;
else if (d.yesPressed()) {
if (!textPanel.saveAs(""))
return false;
}
}
textPanel.rt.reset();
return true;
}
代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer
protected void exitRequested() {
assert SwingUtilities.isEventDispatchThread();
// FIXME: check that everything is saved...
if (plugin.pathsUnsaved()) {
final YesNoCancelDialog d = new YesNoCancelDialog(IJ.getInstance(), "Really quit?",
"There are unsaved paths. Do you really want to quit?");
if (!d.yesPressed())
return;
}
plugin.cancelSearch(true);
plugin.notifyListeners(new SNTEvent(SNTEvent.QUIT));
prefs.savePluginPrefs();
pw.dispose();
fw.dispose();
dispose();
plugin.closeAndReset();
}
代码示例来源:origin: imagej/ImageJA
boolean saveContents() {
int lineCount = textPanel.getLineCount();
if (!textPanel.unsavedLines) lineCount = 0;
ImageJ ij = IJ.getInstance();
boolean macro = IJ.macroRunning() || Interpreter.isBatchMode();
boolean isResults = getTitle().contains("Results");
if (lineCount>0 && !macro && ij!=null && !ij.quitting() && isResults) {
YesNoCancelDialog d = new YesNoCancelDialog(this, getTitle(), "Save "+lineCount+" measurements?");
if (d.cancelPressed())
return false;
else if (d.yesPressed()) {
if (!textPanel.saveAs(""))
return false;
}
}
textPanel.rt.reset();
return true;
}
代码示例来源:origin: net.imagej/ij
/** Overrides close() in PlugInFrame. */
public void close() {
boolean okayToClose = true;
ImageJ ij = IJ.getInstance();
if (!getTitle().equals("Errors") && changes && !IJ.isMacro() && ij!=null && !ij.quittingViaMacro()) {
String msg = "Save changes to \"" + getTitle() + "\"?";
YesNoCancelDialog d = new YesNoCancelDialog(this, "Editor", msg);
if (d.cancelPressed())
okayToClose = false;
else if (d.yesPressed())
save();
}
if (okayToClose) {
//setVisible(false);
dispose();
WindowManager.removeWindow(this);
nWindows--;
instance = null;
changes = false;
if (functionFinder!=null)
functionFinder.close();
}
}
代码示例来源:origin: net.imagej/ij
void apply(ImagePlus imp) {
if (imp.getProcessor().getMinThreshold()==ImageProcessor.NO_THRESHOLD) {
IJ.error("Thresholder", "Threshold is not set");
return;
}
try {
if (imp.getBitDepth()==32) {
YesNoCancelDialog d = new YesNoCancelDialog(null, "Thresholder",
"Convert to 8-bit mask or set background pixels to NaN?", "Convert to Mask", "Set to NaN");
if (d.cancelPressed())
return;
else if (!d.yesPressed()) {
Recorder.recordInMacros = true;
IJ.run("NaN Background");
Recorder.recordInMacros = false;
return;
}
}
runThresholdCommand();
} catch (Exception e) {}
}
代码示例来源:origin: imagej/ImageJA
/** Overrides close() in PlugInFrame. */
public void close() {
boolean okayToClose = true;
ImageJ ij = IJ.getInstance();
if (!getTitle().equals("Errors") && changes && !IJ.isMacro() && ij!=null && !ij.quittingViaMacro()) {
String msg = "Save changes to \"" + getTitle() + "\"?";
YesNoCancelDialog d = new YesNoCancelDialog(this, "Editor", msg);
if (d.cancelPressed())
okayToClose = false;
else if (d.yesPressed())
save();
}
if (okayToClose) {
//setVisible(false);
dispose();
WindowManager.removeWindow(this);
nWindows--;
instance = null;
changes = false;
if (functionFinder!=null)
functionFinder.close();
}
}
代码示例来源:origin: imagej/ImageJA
void apply(ImagePlus imp) {
if (imp.getProcessor().getMinThreshold()==ImageProcessor.NO_THRESHOLD) {
IJ.error("Thresholder", "Threshold is not set");
return;
}
try {
if (imp.getBitDepth()==32) {
YesNoCancelDialog d = new YesNoCancelDialog(null, "Thresholder",
"Convert to 8-bit mask or set background pixels to NaN?", "Convert to Mask", "Set to NaN");
if (d.cancelPressed())
return;
else if (!d.yesPressed()) {
Recorder.recordInMacros = true;
IJ.run("NaN Background");
Recorder.recordInMacros = false;
return;
}
}
runThresholdCommand();
} catch (Exception e) {}
}
代码示例来源:origin: net.imagej/ij
if (d.cancelPressed())
return "Canceled";
else if (d.yesPressed()) {
FileSaver fs = new FileSaver(imp0);
if (!fs.save())
本文整理了Java中ij.gui.YesNoCancelDialog类的一些代码示例,展示了YesNoCancelDialog类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中ij.plugin.ZProjector类的一些代码示例,展示了ZProjector类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,
今天,我尝试运行我的 ImageJ 插件 My_S 但 ImageJ 总是发出以下警告: Plugin or class not found: "My_S" (java.lang.ClassNot
考虑一个矩阵 Z包含 z = z(a,m,e) 的基于网格的结果. Z有形状 (len(aGrid), len(mGrid), len(eGrid)) . Z[0,1,2]包含 z(a=aGrid[0
当我有 some trouble installing and setting up derby ,我确实取得了部分成功: root@dur:~/apache-james-3.0-beta4/var/
本文整理了Java中ij.gui.YesNoCancelDialog.()方法的一些代码示例,展示了YesNoCancelDialog.()的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中ij.gui.YesNoCancelDialog.cancelPressed()方法的一些代码示例,展示了YesNoCancelDialog.cancelPressed()的具体用
本文整理了Java中ij.gui.YesNoCancelDialog.yesPressed()方法的一些代码示例,展示了YesNoCancelDialog.yesPressed()的具体用法。这些代码
本文整理了Java中ij.plugin.ZProjector.setMethod()方法的一些代码示例,展示了ZProjector.setMethod()的具体用法。这些代码示例主要来源于Github
本文整理了Java中ij.plugin.ZProjector.setImage()方法的一些代码示例,展示了ZProjector.setImage()的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中ij.plugin.ZProjector.getProjection()方法的一些代码示例,展示了ZProjector.getProjection()的具体用法。这些代码示例主要来
本文整理了Java中ij.plugin.ZProjector.setStopSlice()方法的一些代码示例,展示了ZProjector.setStopSlice()的具体用法。这些代码示例主要来源于
本文整理了Java中ij.plugin.ZProjector.setStartSlice()方法的一些代码示例,展示了ZProjector.setStartSlice()的具体用法。这些代码示例主要来
本文整理了Java中ij.plugin.ZProjector.()方法的一些代码示例,展示了ZProjector.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中ij.plugin.ZProjector.doProjection()方法的一些代码示例,展示了ZProjector.doProjection()的具体用法。这些代码示例主要来源于
当我键入“Describe [someTable];”时非常长的列(超过 20 个字符)的列名被截断,并使用 & 符号。例如,我有两列似乎名为 WowThisIsAVeryLongC&。 当我运行 s
有没有J的stdlib.ijs的详细文档或者注释版? Jwiki link不包括太多。 stdlib.ijs 中的函数是供用户使用还是仅供内部使用? copy stdlib.ijs 本地安装比the
有没有办法在 ij 中“漂亮地打印”查询结果?由于在查询结果中到处乱扔列,因此默认结果看起来非常难以理解。 在 PostgreSQL 中,有/pset 命令来控制 pgsql 命令的结果,我正在为 D
我想截断以 I、J 或 IJ 结尾的可变长度字符向量的末尾部分,但还没有完全正确: 当前尝试,使用一个简单的案例。 vars <- c("VARI", "VARJ", "VARIJ") sapply(
我从上周开始就一直在使用 Google Tango 设备。我成功地使用 Threejs 库在网络浏览器中显示它们。但我只使用了 TangoPoseData 类中的 xyz。我不知道“ij”是什么意思?
我是一名优秀的程序员,十分优秀!