KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > launch4j > config > Splash


1 /*
2     Launch4j (http://launch4j.sourceforge.net/)
3     Cross-platform Java application wrapper for creating Windows native executables.
4
5     Copyright (C) 2004, 2006 Grzegorz Kowal
6
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */

21
22 /*
23  * Created on Apr 21, 2005
24  */

25 package net.sf.launch4j.config;
26
27 import java.io.File JavaDoc;
28
29 import net.sf.launch4j.binding.IValidatable;
30 import net.sf.launch4j.binding.Validator;
31
32 /**
33  * @author Copyright (C) 2005 Grzegorz Kowal
34  */

35 public class Splash implements IValidatable {
36     
37     // 1.x config properties_____________________________________________________________
38
public static final String JavaDoc SPLASH_FILE = "splash";
39     public static final String JavaDoc WAIT_FOR_TITLE = "waitForTitle";
40     public static final String JavaDoc TIMEOUT = "splashTimeout";
41     public static final String JavaDoc TIMEOUT_ERR = "splashTimeoutErr";
42
43     // __________________________________________________________________________________
44
private File JavaDoc file;
45     private boolean waitForWindow = true;
46     private int timeout = 60;
47     private boolean timeoutErr = true;
48
49     public void checkInvariants() {
50         Validator.checkFile(file, "splash.file",
51                 Messages.getString("Splash.splash.file"));
52         Validator.checkRange(timeout, 1, 60 * 15, "splash.timeout",
53                 Messages.getString("Splash.splash.timeout"));
54     }
55
56     /** Splash screen in BMP format. */
57     public File JavaDoc getFile() {
58         return file;
59     }
60
61     public void setFile(File JavaDoc file) {
62         this.file = file;
63     }
64
65     /** Splash timeout in seconds. */
66     public int getTimeout() {
67         return timeout;
68     }
69
70     public void setTimeout(int timeout) {
71         this.timeout = timeout;
72     }
73
74     /** Signal error on splash timeout. */
75     public boolean isTimeoutErr() {
76         return timeoutErr;
77     }
78
79     public void setTimeoutErr(boolean timeoutErr) {
80         this.timeoutErr = timeoutErr;
81     }
82
83     /** Hide splash screen when the child process displayes the first window. */
84     public boolean getWaitForWindow() {
85         return waitForWindow;
86     }
87
88     public void setWaitForWindow(boolean waitForWindow) {
89         this.waitForWindow = waitForWindow;
90     }
91 }
92
Popular Tags