net.sf.launch4j.FileChooserFilter Java Examples

The following examples show how to use net.sf.launch4j.FileChooserFilter. 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: BrowseActionListener.java    From beast-mcmc with GNU Lesser General Public License v2.1 5 votes vote down vote up
public BrowseActionListener(boolean save, JFileChooser fileChooser,
		FileChooserFilter filter, JTextField field) {
	_save = save;
	_fileChooser = fileChooser;
	_filter = filter;
	_field = field;
}
 
Example #2
Source File: SplashFormImpl.java    From beast-mcmc with GNU Lesser General Public License v2.1 5 votes vote down vote up
public SplashFormImpl(Bindings bindings, JFileChooser fc) {
	bindings.addOptComponent("splash", Splash.class, _splashCheck)
			.add("splash.file", _splashFileField)
			.add("splash.waitForWindow", _waitForWindowCheck, true)
			.add("splash.timeout", _timeoutField, "60")
			.add("splash.timeoutErr", _timeoutErrCheck, true);

	_splashFileButton.addActionListener(new BrowseActionListener(false, fc,
			new FileChooserFilter("Bitmap files (.bmp)", ".bmp"), _splashFileField));
}
 
Example #3
Source File: BasicFormImpl.java    From beast-mcmc with GNU Lesser General Public License v2.1 5 votes vote down vote up
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: BrowseActionListener.java    From PyramidShader with GNU General Public License v3.0 5 votes vote down vote up
public BrowseActionListener(boolean save, JFileChooser fileChooser,
		FileChooserFilter filter, JTextField field) {
	_save = save;
	_fileChooser = fileChooser;
	_filter = filter;
	_field = field;
}
 
Example #5
Source File: SplashFormImpl.java    From PyramidShader with GNU General Public License v3.0 5 votes vote down vote up
public SplashFormImpl(Bindings bindings, JFileChooser fc) {
	bindings.addOptComponent("splash", Splash.class, _splashCheck)
			.add("splash.file", _splashFileField)
			.add("splash.waitForWindow", _waitForWindowCheck, true)
			.add("splash.timeout", _timeoutField, "60")
			.add("splash.timeoutErr", _timeoutErrCheck, true);

	_splashFileButton.addActionListener(new BrowseActionListener(false, fc,
			new FileChooserFilter("Bitmap files (.bmp)", ".bmp"), _splashFileField));
}
 
Example #6
Source File: BasicFormImpl.java    From PyramidShader with GNU General Public License v3.0 5 votes vote down vote up
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 #7
Source File: BrowseActionListener.java    From jmkvpropedit with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public BrowseActionListener(boolean save, JFileChooser fileChooser,
		FileChooserFilter filter, JTextField field) {
	_save = save;
	_fileChooser = fileChooser;
	_filter = filter;
	_field = field;
}
 
Example #8
Source File: SplashFormImpl.java    From jmkvpropedit with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public SplashFormImpl(Bindings bindings, JFileChooser fc) {
	bindings.addOptComponent("splash", Splash.class, _splashCheck)
			.add("splash.file", _splashFileField)
			.add("splash.waitForWindow", _waitForWindowCheck, true)
			.add("splash.timeout", _timeoutField, "60")
			.add("splash.timeoutErr", _timeoutErrCheck, true);

	_splashFileButton.addActionListener(new BrowseActionListener(false, fc,
			new FileChooserFilter("Bitmap files (.bmp)", ".bmp"), _splashFileField));
}
 
Example #9
Source File: BasicFormImpl.java    From jmkvpropedit with BSD 2-Clause "Simplified" License 5 votes vote down vote up
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 #10
Source File: MainFrame.java    From beast-mcmc with GNU Lesser General Public License v2.1 4 votes vote down vote up
public MainFrame() {
	showConfigName(null);
	setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
	addWindowListener(new MainFrameListener());
	setGlassPane(new GlassPane(this));
	_fileChooser.setFileFilter(new FileChooserFilter(
			Messages.getString("MainFrame.config.files"),
			new String[] {".xml", ".cfg"}));

	_toolBar = new JToolBar();
	_toolBar.setFloatable(false);
	_toolBar.setRollover(true);
	addButton("images/new.png",	Messages.getString("MainFrame.new.config"),
			new NewActionListener());
	addButton("images/open.png", Messages.getString("MainFrame.open.config"),
			new OpenActionListener());
	addButton("images/save.png", Messages.getString("MainFrame.save.config"),
			new SaveActionListener());
	_toolBar.addSeparator();
	addButton("images/build.png", Messages.getString("MainFrame.build.wrapper"),
			new BuildActionListener());
	_runButton = addButton("images/run.png",
			Messages.getString("MainFrame.test.wrapper"),
			new RunActionListener());
	setRunEnabled(false);
	_toolBar.addSeparator();
	addButton("images/info.png", Messages.getString("MainFrame.about.launch4j"),
			new AboutActionListener());

	_configForm = new ConfigFormImpl();
	getContentPane().setLayout(new BorderLayout());
	getContentPane().add(_toolBar, BorderLayout.NORTH);
	getContentPane().add(_configForm, BorderLayout.CENTER);
	pack();
	Dimension scr = Toolkit.getDefaultToolkit().getScreenSize();
	Dimension fr = getSize();
	fr.width += 25;
	fr.height += 100;
	setBounds((scr.width - fr.width) / 2, (scr.height - fr.height) / 2,
			fr.width, fr.height);
	setVisible(true);
}
 
Example #11
Source File: MainFrame.java    From PyramidShader with GNU General Public License v3.0 4 votes vote down vote up
public MainFrame() {
	showConfigName(null);
	setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
	addWindowListener(new MainFrameListener());
	setGlassPane(new GlassPane(this));
	_fileChooser.setFileFilter(new FileChooserFilter(
			Messages.getString("MainFrame.config.files"),
			new String[] {".xml", ".cfg"}));

	_toolBar = new JToolBar();
	_toolBar.setFloatable(false);
	_toolBar.setRollover(true);
	addButton("images/new.png",	Messages.getString("MainFrame.new.config"),
			new NewActionListener());
	addButton("images/open.png", Messages.getString("MainFrame.open.config"),
			new OpenActionListener());
	addButton("images/save.png", Messages.getString("MainFrame.save.config"),
			new SaveActionListener());
	_toolBar.addSeparator();
	addButton("images/build.png", Messages.getString("MainFrame.build.wrapper"),
			new BuildActionListener());
	_runButton = addButton("images/run.png",
			Messages.getString("MainFrame.test.wrapper"),
			new RunActionListener());
	setRunEnabled(false);
	_toolBar.addSeparator();
	addButton("images/info.png", Messages.getString("MainFrame.about.launch4j"),
			new AboutActionListener());

	_configForm = new ConfigFormImpl();
	getContentPane().setLayout(new BorderLayout());
	getContentPane().add(_toolBar, BorderLayout.NORTH);
	getContentPane().add(_configForm, BorderLayout.CENTER);
	pack();
	Dimension scr = Toolkit.getDefaultToolkit().getScreenSize();
	Dimension fr = getSize();
	fr.width += 25;
	fr.height += 100;
	setBounds((scr.width - fr.width) / 2, (scr.height - fr.height) / 2,
			fr.width, fr.height);
	setVisible(true);
}
 
Example #12
Source File: MainFrame.java    From jmkvpropedit with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MainFrame() {
	showConfigName(null);
	setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
	addWindowListener(new MainFrameListener());
	setGlassPane(new GlassPane(this));
	_fileChooser.setFileFilter(new FileChooserFilter(
			Messages.getString("MainFrame.config.files"),
			new String[] {".xml", ".cfg"}));

	_toolBar = new JToolBar();
	_toolBar.setFloatable(false);
	_toolBar.setRollover(true);
	addButton("images/new.png",	Messages.getString("MainFrame.new.config"),
			new NewActionListener());
	addButton("images/open.png", Messages.getString("MainFrame.open.config"),
			new OpenActionListener());
	addButton("images/save.png", Messages.getString("MainFrame.save.config"),
			new SaveActionListener());
	_toolBar.addSeparator();
	addButton("images/build.png", Messages.getString("MainFrame.build.wrapper"),
			new BuildActionListener());
	_runButton = addButton("images/run.png",
			Messages.getString("MainFrame.test.wrapper"),
			new RunActionListener());
	setRunEnabled(false);
	_toolBar.addSeparator();
	addButton("images/info.png", Messages.getString("MainFrame.about.launch4j"),
			new AboutActionListener());

	_configForm = new ConfigFormImpl();
	getContentPane().setLayout(new BorderLayout());
	getContentPane().add(_toolBar, BorderLayout.NORTH);
	getContentPane().add(_configForm, BorderLayout.CENTER);
	pack();
	Dimension scr = Toolkit.getDefaultToolkit().getScreenSize();
	Dimension fr = getSize();
	fr.width += 25;
	fr.height += 100;
	setBounds((scr.width - fr.width) / 2, (scr.height - fr.height) / 2,
			fr.width, fr.height);
	setVisible(true);
}