本文整理汇总了Java中net.sf.launch4j.binding.Validator.isEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java Validator.isEmpty方法的具体用法?Java Validator.isEmpty怎么用?Java Validator.isEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.launch4j.binding.Validator
的用法示例。
在下文中一共展示了Validator.isEmpty方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
final int pos = _jvmOptionsTextArea.getCaretPosition();
final String var = getText()
.replaceAll("\"", "")
.replaceAll("%", "");
if (Validator.isEmpty(var)) {
signalViolation(Messages.getString("specifyVar"));
return;
}
add(var, pos);
clear();
}
示例2: actionPerformed
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
String cp = getText();
if (Validator.isEmpty(cp)) {
signalViolation(Messages.getString("specifyClassPath"));
return;
}
DefaultListModel model = (DefaultListModel) _classpathList.getModel();
if (_classpathList.isSelectionEmpty()) {
model.addElement(cp);
clear();
} else {
model.setElementAt(cp, _classpathList.getSelectedIndex());
}
}
示例3: getJdkPreference
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
/** Preference for standalone JRE or JDK-private JRE */
public String getJdkPreference() {
return Validator.isEmpty(jdkPreference) ? JDK_PREFERENCE_PREFER_JRE
: jdkPreference;
}
示例4: checkInvariants
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void checkInvariants() {
Validator.checkTrue(outfile != null && outfile.getPath().endsWith(".exe"),
"outfile", Messages.getString("Config.specify.output.exe"));
if (dontWrapJar) {
if (jar != null && !jar.getPath().equals("")) {
Validator.checkRelativeWinPath(jar.getPath(), "jar",
Messages.getString("Config.application.jar.path"));
} else {
Validator.checkTrue(classPath != null, "classPath",
Messages.getString("ClassPath.or.jar"));
}
} else {
Validator.checkFile(jar, "jar",
Messages.getString("Config.application.jar"));
}
if (!Validator.isEmpty(chdir)) {
Validator.checkRelativeWinPath(chdir, "chdir",
Messages.getString("Config.chdir.relative"));
Validator.checkFalse(chdir.toLowerCase().equals("true")
|| chdir.toLowerCase().equals("false"),
"chdir", Messages.getString("Config.chdir.path"));
}
Validator.checkOptFile(manifest, "manifest", Messages.getString("Config.manifest"));
Validator.checkOptFile(icon, "icon", Messages.getString("Config.icon"));
Validator.checkOptString(cmdLine, Validator.MAX_BIG_STR, "jarArgs",
Messages.getString("Config.jar.arguments"));
Validator.checkOptString(errTitle, Validator.MAX_STR, "errTitle",
Messages.getString("Config.error.title"));
Validator.checkOptString(downloadUrl, 256,
"downloadUrl", Messages.getString("Config.download.url"));
Validator.checkOptString(supportUrl, 256,
"supportUrl", Messages.getString("Config.support.url"));
Validator.checkIn(getHeaderType(), HEADER_TYPES, "headerType",
Messages.getString("Config.header.type"));
Validator.checkFalse(getHeaderType().equals(CONSOLE_HEADER) && splash != null,
"headerType",
Messages.getString("Config.splash.not.impl.by.console.hdr"));
Validator.checkOptStrings(variables,
Validator.MAX_ARGS,
Validator.MAX_ARGS,
"[^=%\t]+=[^=\t]+",
"variables",
Messages.getString("Config.variables"),
Messages.getString("Config.variables.err"));
Validator.checkIn(getPriority(), PRIORITY_CLASS_NAMES, "priority",
Messages.getString("Config.priority"));
jre.checkInvariants();
}
示例5: getStartupErr
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public String getStartupErr() {
return !Validator.isEmpty(startupErr) ? startupErr
: "An error occurred while starting the application.";
}
示例6: getBundledJreErr
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public String getBundledJreErr() {
return !Validator.isEmpty(bundledJreErr) ? bundledJreErr
: "This application was configured to use a bundled Java Runtime" +
" Environment but the runtime is missing or corrupted.";
}
示例7: getRuntimeBits
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public String getRuntimeBits() {
return Validator.isEmpty(runtimeBits) ? RUNTIME_BITS_64_AND_32
: runtimeBits;
}
示例8: getInstanceAlreadyExistsMsg
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public String getInstanceAlreadyExistsMsg() {
return !Validator.isEmpty(instanceAlreadyExistsMsg) ? instanceAlreadyExistsMsg
: "An application instance is already running.";
}
示例9: getLauncherErr
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public String getLauncherErr() {
return !Validator.isEmpty(launcherErr) ? launcherErr
: "The registry refers to a nonexistent Java Runtime Environment" +
" installation or the runtime is corrupted.";
}
示例10: checkInvariants
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void checkInvariants() {
Validator.checkOptString(minVersion, 10, VERSION_PATTERN,
"jre.minVersion", Messages.getString("Jre.min.version"));
Validator.checkOptString(maxVersion, 10, VERSION_PATTERN,
"jre.maxVersion", Messages.getString("Jre.max.version"));
if (Validator.isEmpty(path)) {
Validator.checkFalse(bundledJre64Bit, "jre.bundledJre64Bit",
Messages.getString("Jre.bundled.64bit.invalid"));
Validator.checkFalse(bundledJreAsFallback, "jre.bundledJreAsFallback",
Messages.getString("Jre.bundled.fallback.invalid"));
Validator.checkFalse(Validator.isEmpty(minVersion),
"jre.minVersion", Messages.getString("Jre.specify.jre.min.version.or.path"));
} else {
Validator.checkString(path, Validator.MAX_PATH,
"jre.path", Messages.getString("Jre.bundled.path"));
}
if (!Validator.isEmpty(maxVersion)) {
Validator.checkFalse(Validator.isEmpty(minVersion),
"jre.minVersion", Messages.getString("Jre.specify.min.version"));
Validator.checkTrue(minVersion.compareTo(maxVersion) < 0,
"jre.maxVersion", Messages.getString("Jre.max.greater.than.min"));
}
Validator.checkTrue(initialHeapSize == null || maxHeapSize != null,
"jre.maxHeapSize", Messages.getString("Jre.initial.and.max.heap"));
Validator.checkTrue(initialHeapSize == null || initialHeapSize.intValue() > 0,
"jre.initialHeapSize", Messages.getString("Jre.initial.heap"));
Validator.checkTrue(maxHeapSize == null || (maxHeapSize.intValue()
>= ((initialHeapSize != null) ? initialHeapSize.intValue() : 1)),
"jre.maxHeapSize", Messages.getString("Jre.max.heap"));
Validator.checkTrue(initialHeapPercent == null || maxHeapPercent != null,
"jre.maxHeapPercent", Messages.getString("Jre.initial.and.max.heap"));
if (initialHeapPercent != null) {
Validator.checkRange(initialHeapPercent.intValue(), 1, 100,
"jre.initialHeapPercent",
Messages.getString("Jre.initial.heap.percent"));
}
if (maxHeapPercent != null) {
Validator.checkRange(maxHeapPercent.intValue(),
initialHeapPercent != null ? initialHeapPercent.intValue() : 1, 100,
"jre.maxHeapPercent",
Messages.getString("Jre.max.heap.percent"));
}
Validator.checkIn(getJdkPreference(), JDK_PREFERENCE_NAMES,
"jre.jdkPreference", Messages.getString("Jre.jdkPreference"));
Validator.checkIn(getRuntimeBits(), RUNTIME_BITS_OPTIONS,
"jre.runtimeBits", Messages.getString("Jre.runtimeBits"));
Validator.checkOptStrings(options,
Validator.MAX_ARGS,
Validator.MAX_ARGS,
"[^\"]*|([^\"]*\"[^\"]*\"[^\"]*)*",
"jre.options",
Messages.getString("Jre.jvm.options"),
Messages.getString("Jre.jvm.options.unclosed.quotation"));
// Quoted variable references: "[^%]*|([^%]*\"([^%]*%[^%]+%[^%]*)+\"[^%]*)*"
Validator.checkOptStrings(options,
Validator.MAX_ARGS,
Validator.MAX_ARGS,
"[^%]*|([^%]*([^%]*%[^%]+%[^%]*)+[^%]*)*",
"jre.options",
Messages.getString("Jre.jvm.options"),
Messages.getString("Jre.jvm.options.variable"));
}
示例11: checkInvariants
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void checkInvariants() {
Validator.checkTrue(outfile != null && outfile.getPath().endsWith(".exe"),
"outfile", Messages.getString("Config.specify.output.exe"));
if (dontWrapJar) {
if (jar != null && !jar.getPath().equals("")) {
Validator.checkRelativeWinPath(jar.getPath(), "jar",
Messages.getString("Config.application.jar.path"));
} else {
Validator.checkTrue(classPath != null, "classPath",
Messages.getString("ClassPath.or.jar"));
}
} else {
Validator.checkFile(jar, "jar",
Messages.getString("Config.application.jar"));
}
if (!Validator.isEmpty(chdir)) {
Validator.checkRelativeWinPath(chdir, "chdir",
Messages.getString("Config.chdir.relative"));
Validator.checkFalse(chdir.toLowerCase().equals("true")
|| chdir.toLowerCase().equals("false"),
"chdir", Messages.getString("Config.chdir.path"));
}
Validator.checkOptFile(manifest, "manifest", Messages.getString("Config.manifest"));
Validator.checkOptFile(icon, "icon", Messages.getString("Config.icon"));
Validator.checkOptString(cmdLine, Validator.MAX_BIG_STR, "jarArgs",
Messages.getString("Config.jar.arguments"));
Validator.checkOptString(errTitle, Validator.MAX_STR, "errTitle",
Messages.getString("Config.error.title"));
Validator.checkOptString(downloadUrl, 256,
"downloadUrl", Messages.getString("Config.download.url"));
Validator.checkOptString(supportUrl, 256,
"supportUrl", Messages.getString("Config.support.url"));
Validator.checkIn(getHeaderType(), HEADER_TYPES, "headerType",
Messages.getString("Config.header.type"));
Validator.checkFalse(!isGuiApplication() && splash != null,
"headerType",
Messages.getString("Config.splash.not.impl.by.console.hdr"));
Validator.checkOptStrings(variables,
Validator.MAX_ARGS,
Validator.MAX_ARGS,
"[^=%\t]+=[^=\t]+",
"variables",
Messages.getString("Config.variables"),
Messages.getString("Config.variables.err"));
Validator.checkIn(getPriority(), PRIORITY_CLASS_NAMES, "priority",
Messages.getString("Config.priority"));
checkJniInvariants();
jre.checkInvariants();
}