net.sf.launch4j.config.Config Java Examples
The following examples show how to use
net.sf.launch4j.config.Config.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HeaderFormImpl.java From beast-mcmc with GNU Lesser General Public License v2.1 | 6 votes |
public HeaderFormImpl(Bindings bindings) { _bindings = bindings; _bindings.add("headerTypeIndex", new JRadioButton[] { _guiHeaderRadio, _consoleHeaderRadio, _jniGuiHeaderRadio, _jniConsoleHeaderRadio }) .add("headerObjects", "customHeaderObjects", _headerObjectsCheck, _headerObjectsTextArea) .add("libs", "customLibs", _libsCheck, _libsTextArea); _guiHeaderRadio.setActionCommand(Config.GUI_HEADER); _consoleHeaderRadio.setActionCommand(Config.CONSOLE_HEADER); _jniGuiHeaderRadio.setActionCommand(Config.JNI_GUI_HEADER_32); _jniConsoleHeaderRadio.setActionCommand(Config.JNI_CONSOLE_HEADER_32); ActionListener headerTypeActionListener = new HeaderTypeActionListener(); _guiHeaderRadio.addActionListener(headerTypeActionListener); _consoleHeaderRadio.addActionListener(headerTypeActionListener); _jniGuiHeaderRadio.addActionListener(headerTypeActionListener); _jniConsoleHeaderRadio.addActionListener(headerTypeActionListener); _headerObjectsCheck.addActionListener(new HeaderObjectsActionListener()); _libsCheck.addActionListener(new LibsActionListener()); }
Example #2
Source File: HeaderFormImpl.java From jmkvpropedit with BSD 2-Clause "Simplified" License | 6 votes |
public HeaderFormImpl(Bindings bindings) { _bindings = bindings; _bindings.add("headerTypeIndex", new JRadioButton[] { _guiHeaderRadio, _consoleHeaderRadio, _jniGuiHeaderRadio, _jniConsoleHeaderRadio }) .add("headerObjects", "customHeaderObjects", _headerObjectsCheck, _headerObjectsTextArea) .add("libs", "customLibs", _libsCheck, _libsTextArea); _guiHeaderRadio.setActionCommand(Config.GUI_HEADER); _consoleHeaderRadio.setActionCommand(Config.CONSOLE_HEADER); _jniGuiHeaderRadio.setActionCommand(Config.JNI_GUI_HEADER_32); _jniConsoleHeaderRadio.setActionCommand(Config.JNI_CONSOLE_HEADER_32); ActionListener headerTypeActionListener = new HeaderTypeActionListener(); _guiHeaderRadio.addActionListener(headerTypeActionListener); _consoleHeaderRadio.addActionListener(headerTypeActionListener); _jniGuiHeaderRadio.addActionListener(headerTypeActionListener); _jniConsoleHeaderRadio.addActionListener(headerTypeActionListener); _headerObjectsCheck.addActionListener(new HeaderObjectsActionListener()); _libsCheck.addActionListener(new LibsActionListener()); }
Example #3
Source File: BasicFormImpl.java From beast-mcmc with GNU Lesser General Public License v2.1 | 5 votes |
public BasicFormImpl(Bindings bindings, JFileChooser fc) { bindings.add("outfile", _outfileField) .add("dontWrapJar", _dontWrapJarCheck) .add("jar", _jarField) .add("manifest", _manifestField) .add("icon", _iconField) .add("cmdLine", _cmdLineField) .add("errTitle", _errorTitleField) .add("downloadUrl", _downloadUrlField, Config.DOWNLOAD_URL) .add("supportUrl", _supportUrlField) .add("chdir", _chdirField, ".") .add("priorityIndex", new JRadioButton[] { _normalPriorityRadio, _idlePriorityRadio, _highPriorityRadio }) .add("stayAlive", _stayAliveCheck) .add("restartOnCrash", _restartOnCrashCheck); _dontWrapJarCheck.addChangeListener(new DontWrapJarChangeListener()); _outfileButton.addActionListener(new BrowseActionListener(true, fc, new FileChooserFilter("Windows executables (.exe)", ".exe"), _outfileField)); _jarButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Jar files", ".jar"), _jarField)); _manifestButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Manifest files (.manifest)", ".manifest"), _manifestField)); _iconButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Icon files (.ico)", ".ico"), _iconField)); }
Example #4
Source File: HeaderFormImpl.java From beast-mcmc with GNU Lesser General Public License v2.1 | 5 votes |
public void actionPerformed(ActionEvent e) { Config c = ConfigPersister.getInstance().getConfig(); c.setHeaderType(e.getActionCommand()); if (!_headerObjectsCheck.isSelected()) { Binding b = _bindings.getBinding("headerObjects"); b.put(c); updateLibs(); } }
Example #5
Source File: BasicFormImpl.java From PyramidShader with GNU General Public License v3.0 | 5 votes |
public BasicFormImpl(Bindings bindings, JFileChooser fc) { bindings.add("outfile", _outfileField) .add("dontWrapJar", _dontWrapJarCheck) .add("jar", _jarField) .add("manifest", _manifestField) .add("icon", _iconField) .add("cmdLine", _cmdLineField) .add("errTitle", _errorTitleField) .add("downloadUrl", _downloadUrlField, Config.DOWNLOAD_URL) .add("supportUrl", _supportUrlField) .add("chdir", _chdirField, ".") .add("priorityIndex", new JRadioButton[] { _normalPriorityRadio, _idlePriorityRadio, _highPriorityRadio }) .add("stayAlive", _stayAliveCheck) .add("restartOnCrash", _restartOnCrashCheck); _dontWrapJarCheck.addChangeListener(new DontWrapJarChangeListener()); _outfileButton.addActionListener(new BrowseActionListener(true, fc, new FileChooserFilter("Windows executables (.exe)", ".exe"), _outfileField)); _jarButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Jar files", ".jar"), _jarField)); _manifestButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Manifest files (.manifest)", ".manifest"), _manifestField)); _iconButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Icon files (.ico)", ".ico"), _iconField)); }
Example #6
Source File: HeaderFormImpl.java From PyramidShader with GNU General Public License v3.0 | 5 votes |
public void stateChanged(ChangeEvent e) { Config c = ConfigPersister.getInstance().getConfig(); c.setHeaderType(_guiHeaderRadio.isSelected() ? Config.GUI_HEADER : Config.CONSOLE_HEADER); if (!_headerObjectsCheck.isSelected()) { Binding b = _bindings.getBinding("headerObjects"); b.put(c); } }
Example #7
Source File: BasicFormImpl.java From jmkvpropedit with BSD 2-Clause "Simplified" License | 5 votes |
public BasicFormImpl(Bindings bindings, JFileChooser fc) { bindings.add("outfile", _outfileField) .add("dontWrapJar", _dontWrapJarCheck) .add("jar", _jarField) .add("manifest", _manifestField) .add("icon", _iconField) .add("cmdLine", _cmdLineField) .add("errTitle", _errorTitleField) .add("downloadUrl", _downloadUrlField, Config.DOWNLOAD_URL) .add("supportUrl", _supportUrlField) .add("chdir", _chdirField, ".") .add("priorityIndex", new JRadioButton[] { _normalPriorityRadio, _idlePriorityRadio, _highPriorityRadio }) .add("stayAlive", _stayAliveCheck) .add("restartOnCrash", _restartOnCrashCheck); _dontWrapJarCheck.addChangeListener(new DontWrapJarChangeListener()); _outfileButton.addActionListener(new BrowseActionListener(true, fc, new FileChooserFilter("Windows executables (.exe)", ".exe"), _outfileField)); _jarButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Jar files", ".jar"), _jarField)); _manifestButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Manifest files (.manifest)", ".manifest"), _manifestField)); _iconButton.addActionListener(new BrowseActionListener(false, fc, new FileChooserFilter("Icon files (.ico)", ".ico"), _iconField)); }
Example #8
Source File: HeaderFormImpl.java From jmkvpropedit with BSD 2-Clause "Simplified" License | 5 votes |
public void actionPerformed(ActionEvent e) { Config c = ConfigPersister.getInstance().getConfig(); c.setHeaderType(e.getActionCommand()); if (!_headerObjectsCheck.isSelected()) { Binding b = _bindings.getBinding("headerObjects"); b.put(c); updateLibs(); } }
Example #9
Source File: RcBuilder.java From beast-mcmc with GNU Lesser General Public License v2.1 | 4 votes |
public File build(Config c) throws IOException { _sb.append("LANGUAGE "); _sb.append(LANG_NEUTRAL); _sb.append(", "); _sb.append(SUBLANG_DEFAULT); _sb.append('\n'); addVersionInfo(c.getVersionInfo()); addJre(c.getJre()); addManifest(MANIFEST, c.getManifest()); addIcon(APP_ICON, c.getIcon()); addText(ERR_TITLE, c.getErrTitle()); addText(DOWNLOAD_URL, c.getDownloadUrl()); addText(SUPPORT_URL, c.getSupportUrl()); addText(CMD_LINE, c.getCmdLine()); addWindowsPath(CHDIR, c.getChdir()); addText(PRIORITY_CLASS, String.valueOf(c.getPriorityClass())); addTrue(GUI_HEADER_STAYS_ALIVE, c.isStayAlive()); addTrue(RESTART_ON_CRASH, c.isRestartOnCrash()); addSplash(c.getSplash()); addMessages(c); if (c.getSingleInstance() != null) { addText(MUTEX_NAME, c.getSingleInstance().getMutexName()); addText(INSTANCE_WINDOW_TITLE, c.getSingleInstance().getWindowTitle()); } if (c.getVariables() != null && !c.getVariables().isEmpty()) { StringBuffer vars = new StringBuffer(); append(vars, c.getVariables(), "\t"); addText(ENV_VARIABLES, vars.toString()); } // MAIN_CLASS / JAR addTrue(WRAPPER, !c.isDontWrapJar()); if (c.getClassPath() != null) { addText(MAIN_CLASS, c.getClassPath().getMainClass()); addWindowsPath(CLASSPATH, c.getClassPath().getPathsString()); } if (c.isDontWrapJar() && c.getJar() != null) { addWindowsPath(JAR, c.getJar().getPath()); } File file = Util.createTempFile("rc"); if ("MS932".equals(System.getProperty("file.encoding"))) { writeKanjiResourceFile(file); } else { writeResourceFile(file); } return file; }
Example #10
Source File: RcBuilder.java From PyramidShader with GNU General Public License v3.0 | 4 votes |
public File build(Config c) throws IOException { _sb.append("LANGUAGE "); _sb.append(LANG_NEUTRAL); _sb.append(", "); _sb.append(SUBLANG_DEFAULT); _sb.append('\n'); addVersionInfo(c.getVersionInfo()); addJre(c.getJre()); addManifest(MANIFEST, c.getManifest()); addIcon(APP_ICON, c.getIcon()); addText(ERR_TITLE, c.getErrTitle()); addText(DOWNLOAD_URL, c.getDownloadUrl()); addText(SUPPORT_URL, c.getSupportUrl()); addText(CMD_LINE, c.getCmdLine()); addWindowsPath(CHDIR, c.getChdir()); addText(PRIORITY_CLASS, String.valueOf(c.getPriorityClass())); addTrue(GUI_HEADER_STAYS_ALIVE, c.isStayAlive()); addTrue(RESTART_ON_CRASH, c.isRestartOnCrash()); addSplash(c.getSplash()); addMessages(c); if (c.getSingleInstance() != null) { addText(MUTEX_NAME, c.getSingleInstance().getMutexName()); addText(INSTANCE_WINDOW_TITLE, c.getSingleInstance().getWindowTitle()); } if (c.getVariables() != null && !c.getVariables().isEmpty()) { StringBuffer vars = new StringBuffer(); append(vars, c.getVariables(), "\t"); addText(ENV_VARIABLES, vars.toString()); } // MAIN_CLASS / JAR addTrue(WRAPPER, !c.isDontWrapJar()); if (c.getClassPath() != null) { addText(MAIN_CLASS, c.getClassPath().getMainClass()); addWindowsPath(CLASSPATH, c.getClassPath().getPathsString()); } if (c.isDontWrapJar() && c.getJar() != null) { addWindowsPath(JAR, c.getJar().getPath()); } File file = Util.createTempFile("rc"); if ("MS932".equals(System.getProperty("file.encoding"))) { writeKanjiResourceFile(file); } else { writeResourceFile(file); } return file; }
Example #11
Source File: RcBuilder.java From jmkvpropedit with BSD 2-Clause "Simplified" License | 4 votes |
public File build(Config c) throws IOException { _sb.append("LANGUAGE "); _sb.append(LANG_NEUTRAL); _sb.append(", "); _sb.append(SUBLANG_DEFAULT); _sb.append('\n'); addVersionInfo(c.getVersionInfo()); addJre(c.getJre()); addManifest(MANIFEST, c.getManifest()); addIcon(APP_ICON, c.getIcon()); addText(ERR_TITLE, c.getErrTitle()); addText(DOWNLOAD_URL, c.getDownloadUrl()); addText(SUPPORT_URL, c.getSupportUrl()); addText(CMD_LINE, c.getCmdLine()); addWindowsPath(CHDIR, c.getChdir()); addText(PRIORITY_CLASS, String.valueOf(c.getPriorityClass())); addTrue(GUI_HEADER_STAYS_ALIVE, c.isStayAlive()); addTrue(RESTART_ON_CRASH, c.isRestartOnCrash()); addSplash(c.getSplash()); addMessages(c); if (c.getSingleInstance() != null) { addText(MUTEX_NAME, c.getSingleInstance().getMutexName()); addText(INSTANCE_WINDOW_TITLE, c.getSingleInstance().getWindowTitle()); } if (c.getVariables() != null && !c.getVariables().isEmpty()) { StringBuffer vars = new StringBuffer(); append(vars, c.getVariables(), "\t"); addText(ENV_VARIABLES, vars.toString()); } // MAIN_CLASS / JAR addTrue(WRAPPER, !c.isDontWrapJar()); if (c.getClassPath() != null) { addText(MAIN_CLASS, c.getClassPath().getMainClass()); addWindowsPath(CLASSPATH, c.getClassPath().getPathsString()); } if (c.isDontWrapJar() && c.getJar() != null) { addWindowsPath(JAR, c.getJar().getPath()); } File file = Util.createTempFile("rc"); if ("MS932".equals(System.getProperty("file.encoding"))) { writeKanjiResourceFile(file); } else { writeResourceFile(file); } return file; }