Neurogami-roir 1.3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. data/History.txt +22 -0
  2. data/Manifest.txt +250 -0
  3. data/README.md +12 -0
  4. data/Rakefile +63 -0
  5. data/bin/roir +176 -0
  6. data/data/GenericJavaApp.icns +0 -0
  7. data/data/JavaApplicationStub +0 -0
  8. data/data/Rawr logo 1 large.png +0 -0
  9. data/data/Rawr logo 2 large.png +0 -0
  10. data/data/Rawr logo2.png +0 -0
  11. data/data/website/_notes/dwsync.xml +1 -0
  12. data/data/website/css/1.css +254 -0
  13. data/data/website/css/_notes/dwsync.xml +1 -0
  14. data/data/website/images/_notes/dwsync.xml +1 -0
  15. data/data/website/images/body_bg.jpg +0 -0
  16. data/data/website/images/bullet.gif +0 -0
  17. data/data/website/images/content.jpg +0 -0
  18. data/data/website/images/content_h2.gif +0 -0
  19. data/data/website/images/details.gif +0 -0
  20. data/data/website/images/details.jpg +0 -0
  21. data/data/website/images/header_bg.jpg +0 -0
  22. data/data/website/images/nav_a_hover.gif +0 -0
  23. data/data/website/images/rawr_logo.png +0 -0
  24. data/data/website/index.html +164 -0
  25. data/lib/app_bundler.rb +138 -0
  26. data/lib/bundler.rb +36 -0
  27. data/lib/command.rb +68 -0
  28. data/lib/exe_bundler.rb +106 -0
  29. data/lib/generator.rb +127 -0
  30. data/lib/jar_builder.rb +57 -0
  31. data/lib/jruby_batch_compiler.rb +127 -0
  32. data/lib/jruby_release.rb +104 -0
  33. data/lib/launch4j/LICENSE.txt +30 -0
  34. data/lib/launch4j/bin-linux/COPYING +340 -0
  35. data/lib/launch4j/bin-linux/ld +0 -0
  36. data/lib/launch4j/bin-linux/windres +0 -0
  37. data/lib/launch4j/bin-mac/COPYING +340 -0
  38. data/lib/launch4j/bin-mac/ld +0 -0
  39. data/lib/launch4j/bin-mac/readme.txt +1 -0
  40. data/lib/launch4j/bin-mac/windres +0 -0
  41. data/lib/launch4j/bin-win/COPYING +340 -0
  42. data/lib/launch4j/bin-win/ld.exe +0 -0
  43. data/lib/launch4j/bin-win/windres.exe +0 -0
  44. data/lib/launch4j/build.xml +62 -0
  45. data/lib/launch4j/demo/ConsoleApp/ConsoleApp.jar +0 -0
  46. data/lib/launch4j/demo/ConsoleApp/build.xml +57 -0
  47. data/lib/launch4j/demo/ConsoleApp/l4j/ConsoleApp.ico +0 -0
  48. data/lib/launch4j/demo/ConsoleApp/lib/readme.txt +8 -0
  49. data/lib/launch4j/demo/ConsoleApp/readme.txt +1 -0
  50. data/lib/launch4j/demo/ConsoleApp/src/net/sf/launch4j/example/ConsoleApp.java +72 -0
  51. data/lib/launch4j/demo/LICENSE.txt +30 -0
  52. data/lib/launch4j/demo/SimpleApp/SimpleApp.jar +0 -0
  53. data/lib/launch4j/demo/SimpleApp/build.xml +52 -0
  54. data/lib/launch4j/demo/SimpleApp/l4j/SimpleApp.ico +0 -0
  55. data/lib/launch4j/demo/SimpleApp/l4j/SimpleApp.xml +18 -0
  56. data/lib/launch4j/demo/SimpleApp/l4j/splash.bmp +0 -0
  57. data/lib/launch4j/demo/SimpleApp/lib/readme.txt +8 -0
  58. data/lib/launch4j/demo/SimpleApp/readme.txt +1 -0
  59. data/lib/launch4j/demo/SimpleApp/src/net/sf/launch4j/example/SimpleApp.java +104 -0
  60. data/lib/launch4j/demo/readme.txt +3 -0
  61. data/lib/launch4j/head/LICENSE.txt +23 -0
  62. data/lib/launch4j/head/consolehead.o +0 -0
  63. data/lib/launch4j/head/guihead.o +0 -0
  64. data/lib/launch4j/head/head.o +0 -0
  65. data/lib/launch4j/head_src/LICENSE.txt +23 -0
  66. data/lib/launch4j/head_src/consolehead/Makefile.win +33 -0
  67. data/lib/launch4j/head_src/consolehead/consolehead.c +65 -0
  68. data/lib/launch4j/head_src/consolehead/consolehead.dev +108 -0
  69. data/lib/launch4j/head_src/guihead/Makefile.win +33 -0
  70. data/lib/launch4j/head_src/guihead/guihead.c +185 -0
  71. data/lib/launch4j/head_src/guihead/guihead.dev +109 -0
  72. data/lib/launch4j/head_src/guihead/guihead.h +43 -0
  73. data/lib/launch4j/head_src/head.c +807 -0
  74. data/lib/launch4j/head_src/head.h +113 -0
  75. data/lib/launch4j/head_src/resource.h +71 -0
  76. data/lib/launch4j/launch4j +8 -0
  77. data/lib/launch4j/launch4j.jar +0 -0
  78. data/lib/launch4j/launch4j.jfpr +0 -0
  79. data/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt +31 -0
  80. data/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt +31 -0
  81. data/lib/launch4j/lib/Nuvola.Icon.Theme.LICENSE.txt +504 -0
  82. data/lib/launch4j/lib/XStream.LICENSE.txt +27 -0
  83. data/lib/launch4j/lib/commons-beanutils.jar +0 -0
  84. data/lib/launch4j/lib/commons-logging.jar +0 -0
  85. data/lib/launch4j/lib/commons.LICENSE.txt +50 -0
  86. data/lib/launch4j/lib/forms.jar +0 -0
  87. data/lib/launch4j/lib/formsrt.jar +0 -0
  88. data/lib/launch4j/lib/foxtrot.LICENSE.txt +25 -0
  89. data/lib/launch4j/lib/foxtrot.jar +0 -0
  90. data/lib/launch4j/lib/looks.jar +0 -0
  91. data/lib/launch4j/lib/xstream.jar +0 -0
  92. data/lib/launch4j/manifest/uac.exe.manifest +12 -0
  93. data/lib/launch4j/manifest/xp-themes.exe.manifest +14 -0
  94. data/lib/launch4j/src/images/asterix-o.gif +0 -0
  95. data/lib/launch4j/src/images/asterix.gif +0 -0
  96. data/lib/launch4j/src/images/build.png +0 -0
  97. data/lib/launch4j/src/images/button_ok.png +0 -0
  98. data/lib/launch4j/src/images/cancel16.png +0 -0
  99. data/lib/launch4j/src/images/down16.png +0 -0
  100. data/lib/launch4j/src/images/edit_add16.png +0 -0
  101. data/lib/launch4j/src/images/info.png +0 -0
  102. data/lib/launch4j/src/images/new.png +0 -0
  103. data/lib/launch4j/src/images/new16.png +0 -0
  104. data/lib/launch4j/src/images/ok16.png +0 -0
  105. data/lib/launch4j/src/images/open.png +0 -0
  106. data/lib/launch4j/src/images/open16.png +0 -0
  107. data/lib/launch4j/src/images/run.png +0 -0
  108. data/lib/launch4j/src/images/save.png +0 -0
  109. data/lib/launch4j/src/images/up16.png +0 -0
  110. data/lib/launch4j/src/launch4j.properties +2 -0
  111. data/lib/launch4j/src/net/sf/launch4j/Builder.java +207 -0
  112. data/lib/launch4j/src/net/sf/launch4j/BuilderException.java +52 -0
  113. data/lib/launch4j/src/net/sf/launch4j/ExecException.java +66 -0
  114. data/lib/launch4j/src/net/sf/launch4j/FileChooserFilter.java +76 -0
  115. data/lib/launch4j/src/net/sf/launch4j/Log.java +105 -0
  116. data/lib/launch4j/src/net/sf/launch4j/Main.java +99 -0
  117. data/lib/launch4j/src/net/sf/launch4j/Messages.java +78 -0
  118. data/lib/launch4j/src/net/sf/launch4j/OptionParser.java +71 -0
  119. data/lib/launch4j/src/net/sf/launch4j/RcBuilder.java +340 -0
  120. data/lib/launch4j/src/net/sf/launch4j/Util.java +197 -0
  121. data/lib/launch4j/src/net/sf/launch4j/ant/AntClassPath.java +61 -0
  122. data/lib/launch4j/src/net/sf/launch4j/ant/AntConfig.java +129 -0
  123. data/lib/launch4j/src/net/sf/launch4j/ant/AntJre.java +69 -0
  124. data/lib/launch4j/src/net/sf/launch4j/ant/Launch4jTask.java +162 -0
  125. data/lib/launch4j/src/net/sf/launch4j/ant/Messages.java +55 -0
  126. data/lib/launch4j/src/net/sf/launch4j/ant/StringWrapper.java +67 -0
  127. data/lib/launch4j/src/net/sf/launch4j/ant/messages.properties +35 -0
  128. data/lib/launch4j/src/net/sf/launch4j/ant/messages_es.properties +35 -0
  129. data/lib/launch4j/src/net/sf/launch4j/binding/Binding.java +62 -0
  130. data/lib/launch4j/src/net/sf/launch4j/binding/BindingException.java +52 -0
  131. data/lib/launch4j/src/net/sf/launch4j/binding/Bindings.java +317 -0
  132. data/lib/launch4j/src/net/sf/launch4j/binding/IValidatable.java +44 -0
  133. data/lib/launch4j/src/net/sf/launch4j/binding/InvariantViolationException.java +67 -0
  134. data/lib/launch4j/src/net/sf/launch4j/binding/JComboBoxBinding.java +119 -0
  135. data/lib/launch4j/src/net/sf/launch4j/binding/JListBinding.java +118 -0
  136. data/lib/launch4j/src/net/sf/launch4j/binding/JRadioButtonBinding.java +146 -0
  137. data/lib/launch4j/src/net/sf/launch4j/binding/JTextAreaBinding.java +123 -0
  138. data/lib/launch4j/src/net/sf/launch4j/binding/JTextComponentBinding.java +108 -0
  139. data/lib/launch4j/src/net/sf/launch4j/binding/JToggleButtonBinding.java +108 -0
  140. data/lib/launch4j/src/net/sf/launch4j/binding/Messages.java +78 -0
  141. data/lib/launch4j/src/net/sf/launch4j/binding/OptComponentBinding.java +119 -0
  142. data/lib/launch4j/src/net/sf/launch4j/binding/OptJTextAreaBinding.java +141 -0
  143. data/lib/launch4j/src/net/sf/launch4j/binding/Validator.java +259 -0
  144. data/lib/launch4j/src/net/sf/launch4j/binding/messages.properties +52 -0
  145. data/lib/launch4j/src/net/sf/launch4j/binding/messages_es.properties +51 -0
  146. data/lib/launch4j/src/net/sf/launch4j/config/ClassPath.java +87 -0
  147. data/lib/launch4j/src/net/sf/launch4j/config/Config.java +396 -0
  148. data/lib/launch4j/src/net/sf/launch4j/config/ConfigPersister.java +249 -0
  149. data/lib/launch4j/src/net/sf/launch4j/config/ConfigPersisterException.java +51 -0
  150. data/lib/launch4j/src/net/sf/launch4j/config/Jre.java +235 -0
  151. data/lib/launch4j/src/net/sf/launch4j/config/LdDefaults.java +62 -0
  152. data/lib/launch4j/src/net/sf/launch4j/config/Messages.java +78 -0
  153. data/lib/launch4j/src/net/sf/launch4j/config/Msg.java +111 -0
  154. data/lib/launch4j/src/net/sf/launch4j/config/SingleInstance.java +74 -0
  155. data/lib/launch4j/src/net/sf/launch4j/config/Splash.java +103 -0
  156. data/lib/launch4j/src/net/sf/launch4j/config/VersionInfo.java +168 -0
  157. data/lib/launch4j/src/net/sf/launch4j/config/messages.properties +93 -0
  158. data/lib/launch4j/src/net/sf/launch4j/config/messages_es.properties +75 -0
  159. data/lib/launch4j/src/net/sf/launch4j/form/BasicForm.java +283 -0
  160. data/lib/launch4j/src/net/sf/launch4j/form/BasicForm.jfrm +0 -0
  161. data/lib/launch4j/src/net/sf/launch4j/form/ClassPathForm.java +193 -0
  162. data/lib/launch4j/src/net/sf/launch4j/form/ClassPathForm.jfrm +0 -0
  163. data/lib/launch4j/src/net/sf/launch4j/form/ConfigForm.java +132 -0
  164. data/lib/launch4j/src/net/sf/launch4j/form/ConfigForm.jfrm +0 -0
  165. data/lib/launch4j/src/net/sf/launch4j/form/EnvironmentVarsForm.java +127 -0
  166. data/lib/launch4j/src/net/sf/launch4j/form/EnvironmentVarsForm.jfrm +0 -0
  167. data/lib/launch4j/src/net/sf/launch4j/form/HeaderForm.java +171 -0
  168. data/lib/launch4j/src/net/sf/launch4j/form/HeaderForm.jfrm +0 -0
  169. data/lib/launch4j/src/net/sf/launch4j/form/JreForm.java +266 -0
  170. data/lib/launch4j/src/net/sf/launch4j/form/JreForm.jfrm +0 -0
  171. data/lib/launch4j/src/net/sf/launch4j/form/Messages.java +55 -0
  172. data/lib/launch4j/src/net/sf/launch4j/form/MessagesForm.java +183 -0
  173. data/lib/launch4j/src/net/sf/launch4j/form/MessagesForm.jfrm +0 -0
  174. data/lib/launch4j/src/net/sf/launch4j/form/SingleInstanceForm.java +141 -0
  175. data/lib/launch4j/src/net/sf/launch4j/form/SingleInstanceForm.jfrm +0 -0
  176. data/lib/launch4j/src/net/sf/launch4j/form/SplashForm.java +166 -0
  177. data/lib/launch4j/src/net/sf/launch4j/form/SplashForm.jfrm +0 -0
  178. data/lib/launch4j/src/net/sf/launch4j/form/VersionInfoForm.java +232 -0
  179. data/lib/launch4j/src/net/sf/launch4j/form/VersionInfoForm.jfrm +0 -0
  180. data/lib/launch4j/src/net/sf/launch4j/form/messages.properties +146 -0
  181. data/lib/launch4j/src/net/sf/launch4j/form/messages_es.properties +118 -0
  182. data/lib/launch4j/src/net/sf/launch4j/formimpl/AbstractAcceptListener.java +75 -0
  183. data/lib/launch4j/src/net/sf/launch4j/formimpl/BasicFormImpl.java +101 -0
  184. data/lib/launch4j/src/net/sf/launch4j/formimpl/BrowseActionListener.java +79 -0
  185. data/lib/launch4j/src/net/sf/launch4j/formimpl/ClassPathFormImpl.java +222 -0
  186. data/lib/launch4j/src/net/sf/launch4j/formimpl/ConfigFormImpl.java +100 -0
  187. data/lib/launch4j/src/net/sf/launch4j/formimpl/EnvironmentVarsFormImpl.java +50 -0
  188. data/lib/launch4j/src/net/sf/launch4j/formimpl/FileChooser.java +65 -0
  189. data/lib/launch4j/src/net/sf/launch4j/formimpl/GlassPane.java +67 -0
  190. data/lib/launch4j/src/net/sf/launch4j/formimpl/HeaderFormImpl.java +102 -0
  191. data/lib/launch4j/src/net/sf/launch4j/formimpl/JreFormImpl.java +166 -0
  192. data/lib/launch4j/src/net/sf/launch4j/formimpl/MainFrame.java +358 -0
  193. data/lib/launch4j/src/net/sf/launch4j/formimpl/Messages.java +55 -0
  194. data/lib/launch4j/src/net/sf/launch4j/formimpl/MessagesFormImpl.java +58 -0
  195. data/lib/launch4j/src/net/sf/launch4j/formimpl/SingleInstanceFormImpl.java +54 -0
  196. data/lib/launch4j/src/net/sf/launch4j/formimpl/SplashFormImpl.java +61 -0
  197. data/lib/launch4j/src/net/sf/launch4j/formimpl/VersionInfoFormImpl.java +63 -0
  198. data/lib/launch4j/src/net/sf/launch4j/formimpl/messages.properties +74 -0
  199. data/lib/launch4j/src/net/sf/launch4j/formimpl/messages_es.properties +56 -0
  200. data/lib/launch4j/src/net/sf/launch4j/messages.properties +45 -0
  201. data/lib/launch4j/src/net/sf/launch4j/messages_es.properties +45 -0
  202. data/lib/launch4j/w32api/MinGW.LICENSE.txt +25 -0
  203. data/lib/launch4j/w32api/crt2.o +0 -0
  204. data/lib/launch4j/w32api/libadvapi32.a +0 -0
  205. data/lib/launch4j/w32api/libgcc.a +0 -0
  206. data/lib/launch4j/w32api/libkernel32.a +0 -0
  207. data/lib/launch4j/w32api/libmingw32.a +0 -0
  208. data/lib/launch4j/w32api/libmsvcrt.a +0 -0
  209. data/lib/launch4j/w32api/libshell32.a +0 -0
  210. data/lib/launch4j/w32api/libuser32.a +0 -0
  211. data/lib/launch4j/web/bullet.gif +0 -0
  212. data/lib/launch4j/web/changelog.html +356 -0
  213. data/lib/launch4j/web/docs.html +585 -0
  214. data/lib/launch4j/web/index.html +128 -0
  215. data/lib/launch4j/web/launch4j-use.gif +0 -0
  216. data/lib/launch4j/web/launch4j.gif +0 -0
  217. data/lib/launch4j/web/links.html +73 -0
  218. data/lib/launch4j/web/style.css +159 -0
  219. data/lib/options.rb +101 -0
  220. data/lib/platform.rb +28 -0
  221. data/lib/rawr.rb +178 -0
  222. data/lib/rawr_bundle.rb +26 -0
  223. data/lib/rawr_version.rb +3 -0
  224. data/lib/web_bundler.rb +114 -0
  225. data/lib/zip/ioextras.rb +155 -0
  226. data/lib/zip/stdrubyext.rb +111 -0
  227. data/lib/zip/tempfile_bugfixed.rb +195 -0
  228. data/lib/zip/zip.rb +1848 -0
  229. data/lib/zip/zipfilesystem.rb +609 -0
  230. data/lib/zip/ziprequire.rb +90 -0
  231. data/tasks/ann.rake +81 -0
  232. data/tasks/bones.rake +21 -0
  233. data/tasks/gem.rake +121 -0
  234. data/tasks/manifest.rake +49 -0
  235. data/tasks/notes.rake +28 -0
  236. data/tasks/post_load.rake +39 -0
  237. data/tasks/rdoc.rake +51 -0
  238. data/tasks/rubyforge.rake +57 -0
  239. data/tasks/setup.rb +269 -0
  240. data/tasks/spec.rake +63 -0
  241. data/tasks/svn.rake +48 -0
  242. data/tasks/test.rake +38 -0
  243. data/test/unit/app_bundler_spec.rb +65 -0
  244. data/test/unit/bundler_spec.rb +27 -0
  245. data/test/unit/generator_spec.rb +49 -0
  246. data/test/unit/jar_builder_spec.rb +5 -0
  247. data/test/unit/options_spec.rb +97 -0
  248. data/test/unit/platform_spec.rb +29 -0
  249. data/test/unit/spec_helpers.rb +22 -0
  250. data/test/unit/web_bundler_spec.rb +83 -0
  251. metadata +501 -0
@@ -0,0 +1,183 @@
1
+ package net.sf.launch4j.form;
2
+
3
+ import com.jgoodies.forms.layout.CellConstraints;
4
+ import com.jgoodies.forms.layout.FormLayout;
5
+ import java.awt.BorderLayout;
6
+ import java.awt.Container;
7
+ import java.awt.Dimension;
8
+ import javax.swing.Box;
9
+ import javax.swing.ImageIcon;
10
+ import javax.swing.JCheckBox;
11
+ import javax.swing.JLabel;
12
+ import javax.swing.JPanel;
13
+ import javax.swing.JScrollPane;
14
+ import javax.swing.JTextArea;
15
+
16
+ public abstract class MessagesForm extends JPanel
17
+ {
18
+ protected final JTextArea _startupErrTextArea = new JTextArea();
19
+ protected final JTextArea _bundledJreErrTextArea = new JTextArea();
20
+ protected final JTextArea _jreVersionErrTextArea = new JTextArea();
21
+ protected final JTextArea _launcherErrTextArea = new JTextArea();
22
+ protected final JCheckBox _messagesCheck = new JCheckBox();
23
+ protected final JTextArea _instanceAlreadyExistsMsgTextArea = new JTextArea();
24
+
25
+ /**
26
+ * Default constructor
27
+ */
28
+ public MessagesForm()
29
+ {
30
+ initializePanel();
31
+ }
32
+
33
+ /**
34
+ * Adds fill components to empty cells in the first row and first column of the grid.
35
+ * This ensures that the grid spacing will be the same as shown in the designer.
36
+ * @param cols an array of column indices in the first row where fill components should be added.
37
+ * @param rows an array of row indices in the first column where fill components should be added.
38
+ */
39
+ void addFillComponents( Container panel, int[] cols, int[] rows )
40
+ {
41
+ Dimension filler = new Dimension(10,10);
42
+
43
+ boolean filled_cell_11 = false;
44
+ CellConstraints cc = new CellConstraints();
45
+ if ( cols.length > 0 && rows.length > 0 )
46
+ {
47
+ if ( cols[0] == 1 && rows[0] == 1 )
48
+ {
49
+ /** add a rigid area */
50
+ panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
51
+ filled_cell_11 = true;
52
+ }
53
+ }
54
+
55
+ for( int index = 0; index < cols.length; index++ )
56
+ {
57
+ if ( cols[index] == 1 && filled_cell_11 )
58
+ {
59
+ continue;
60
+ }
61
+ panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
62
+ }
63
+
64
+ for( int index = 0; index < rows.length; index++ )
65
+ {
66
+ if ( rows[index] == 1 && filled_cell_11 )
67
+ {
68
+ continue;
69
+ }
70
+ panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
71
+ }
72
+
73
+ }
74
+
75
+ /**
76
+ * Helper method to load an image file from the CLASSPATH
77
+ * @param imageName the package and name of the file to load relative to the CLASSPATH
78
+ * @return an ImageIcon instance with the specified image file
79
+ * @throws IllegalArgumentException if the image resource cannot be loaded.
80
+ */
81
+ public ImageIcon loadImage( String imageName )
82
+ {
83
+ try
84
+ {
85
+ ClassLoader classloader = getClass().getClassLoader();
86
+ java.net.URL url = classloader.getResource( imageName );
87
+ if ( url != null )
88
+ {
89
+ ImageIcon icon = new ImageIcon( url );
90
+ return icon;
91
+ }
92
+ }
93
+ catch( Exception e )
94
+ {
95
+ e.printStackTrace();
96
+ }
97
+ throw new IllegalArgumentException( "Unable to load image: " + imageName );
98
+ }
99
+
100
+ public JPanel createPanel()
101
+ {
102
+ JPanel jpanel1 = new JPanel();
103
+ FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:9DLU:NONE");
104
+ CellConstraints cc = new CellConstraints();
105
+ jpanel1.setLayout(formlayout1);
106
+
107
+ _startupErrTextArea.setName("startupErrTextArea");
108
+ JScrollPane jscrollpane1 = new JScrollPane();
109
+ jscrollpane1.setViewportView(_startupErrTextArea);
110
+ jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
111
+ jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
112
+ jpanel1.add(jscrollpane1,cc.xy(4,4));
113
+
114
+ _bundledJreErrTextArea.setName("bundledJreErrTextArea");
115
+ JScrollPane jscrollpane2 = new JScrollPane();
116
+ jscrollpane2.setViewportView(_bundledJreErrTextArea);
117
+ jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
118
+ jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
119
+ jpanel1.add(jscrollpane2,cc.xy(4,6));
120
+
121
+ _jreVersionErrTextArea.setName("jreVersionErrTextArea");
122
+ _jreVersionErrTextArea.setToolTipText(Messages.getString("jreVersionErrTip"));
123
+ JScrollPane jscrollpane3 = new JScrollPane();
124
+ jscrollpane3.setViewportView(_jreVersionErrTextArea);
125
+ jscrollpane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
126
+ jscrollpane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
127
+ jpanel1.add(jscrollpane3,cc.xy(4,8));
128
+
129
+ _launcherErrTextArea.setName("launcherErrTextArea");
130
+ JScrollPane jscrollpane4 = new JScrollPane();
131
+ jscrollpane4.setViewportView(_launcherErrTextArea);
132
+ jscrollpane4.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
133
+ jscrollpane4.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
134
+ jpanel1.add(jscrollpane4,cc.xy(4,10));
135
+
136
+ JLabel jlabel1 = new JLabel();
137
+ jlabel1.setText(Messages.getString("startupErr"));
138
+ jpanel1.add(jlabel1,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
139
+
140
+ JLabel jlabel2 = new JLabel();
141
+ jlabel2.setText(Messages.getString("bundledJreErr"));
142
+ jpanel1.add(jlabel2,new CellConstraints(2,6,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
143
+
144
+ JLabel jlabel3 = new JLabel();
145
+ jlabel3.setText(Messages.getString("jreVersionErr"));
146
+ jpanel1.add(jlabel3,new CellConstraints(2,8,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
147
+
148
+ JLabel jlabel4 = new JLabel();
149
+ jlabel4.setText(Messages.getString("launcherErr"));
150
+ jpanel1.add(jlabel4,new CellConstraints(2,10,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
151
+
152
+ _messagesCheck.setActionCommand("Add version information");
153
+ _messagesCheck.setName("messagesCheck");
154
+ _messagesCheck.setText(Messages.getString("addMessages"));
155
+ jpanel1.add(_messagesCheck,cc.xy(4,2));
156
+
157
+ JLabel jlabel5 = new JLabel();
158
+ jlabel5.setText(Messages.getString("instanceAlreadyExistsMsg"));
159
+ jpanel1.add(jlabel5,new CellConstraints(2,12,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
160
+
161
+ _instanceAlreadyExistsMsgTextArea.setName("instanceAlreadyExistsMsgTextArea");
162
+ _instanceAlreadyExistsMsgTextArea.setToolTipText(Messages.getString("instanceAlreadyExistsMsgTip"));
163
+ JScrollPane jscrollpane5 = new JScrollPane();
164
+ jscrollpane5.setViewportView(_instanceAlreadyExistsMsgTextArea);
165
+ jscrollpane5.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
166
+ jscrollpane5.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
167
+ jpanel1.add(jscrollpane5,cc.xy(4,12));
168
+
169
+ addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13 });
170
+ return jpanel1;
171
+ }
172
+
173
+ /**
174
+ * Initializer
175
+ */
176
+ protected void initializePanel()
177
+ {
178
+ setLayout(new BorderLayout());
179
+ add(createPanel(), BorderLayout.CENTER);
180
+ }
181
+
182
+
183
+ }
@@ -0,0 +1,141 @@
1
+ package net.sf.launch4j.form;
2
+
3
+ import com.jgoodies.forms.layout.CellConstraints;
4
+ import com.jgoodies.forms.layout.FormLayout;
5
+ import java.awt.BorderLayout;
6
+ import java.awt.Container;
7
+ import java.awt.Dimension;
8
+ import javax.swing.Box;
9
+ import javax.swing.ImageIcon;
10
+ import javax.swing.JCheckBox;
11
+ import javax.swing.JLabel;
12
+ import javax.swing.JPanel;
13
+ import javax.swing.JTextField;
14
+
15
+ public abstract class SingleInstanceForm extends JPanel
16
+ {
17
+ protected final JLabel _splashFileLabel = new JLabel();
18
+ protected final JTextField _mutexNameField = new JTextField();
19
+ protected final JCheckBox _singleInstanceCheck = new JCheckBox();
20
+ protected final JTextField _windowTitleField = new JTextField();
21
+ protected final JLabel _splashFileLabel1 = new JLabel();
22
+
23
+ /**
24
+ * Default constructor
25
+ */
26
+ public SingleInstanceForm()
27
+ {
28
+ initializePanel();
29
+ }
30
+
31
+ /**
32
+ * Adds fill components to empty cells in the first row and first column of the grid.
33
+ * This ensures that the grid spacing will be the same as shown in the designer.
34
+ * @param cols an array of column indices in the first row where fill components should be added.
35
+ * @param rows an array of row indices in the first column where fill components should be added.
36
+ */
37
+ void addFillComponents( Container panel, int[] cols, int[] rows )
38
+ {
39
+ Dimension filler = new Dimension(10,10);
40
+
41
+ boolean filled_cell_11 = false;
42
+ CellConstraints cc = new CellConstraints();
43
+ if ( cols.length > 0 && rows.length > 0 )
44
+ {
45
+ if ( cols[0] == 1 && rows[0] == 1 )
46
+ {
47
+ /** add a rigid area */
48
+ panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
49
+ filled_cell_11 = true;
50
+ }
51
+ }
52
+
53
+ for( int index = 0; index < cols.length; index++ )
54
+ {
55
+ if ( cols[index] == 1 && filled_cell_11 )
56
+ {
57
+ continue;
58
+ }
59
+ panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
60
+ }
61
+
62
+ for( int index = 0; index < rows.length; index++ )
63
+ {
64
+ if ( rows[index] == 1 && filled_cell_11 )
65
+ {
66
+ continue;
67
+ }
68
+ panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
69
+ }
70
+
71
+ }
72
+
73
+ /**
74
+ * Helper method to load an image file from the CLASSPATH
75
+ * @param imageName the package and name of the file to load relative to the CLASSPATH
76
+ * @return an ImageIcon instance with the specified image file
77
+ * @throws IllegalArgumentException if the image resource cannot be loaded.
78
+ */
79
+ public ImageIcon loadImage( String imageName )
80
+ {
81
+ try
82
+ {
83
+ ClassLoader classloader = getClass().getClassLoader();
84
+ java.net.URL url = classloader.getResource( imageName );
85
+ if ( url != null )
86
+ {
87
+ ImageIcon icon = new ImageIcon( url );
88
+ return icon;
89
+ }
90
+ }
91
+ catch( Exception e )
92
+ {
93
+ e.printStackTrace();
94
+ }
95
+ throw new IllegalArgumentException( "Unable to load image: " + imageName );
96
+ }
97
+
98
+ public JPanel createPanel()
99
+ {
100
+ JPanel jpanel1 = new JPanel();
101
+ FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:60DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE");
102
+ CellConstraints cc = new CellConstraints();
103
+ jpanel1.setLayout(formlayout1);
104
+
105
+ _splashFileLabel.setIcon(loadImage("images/asterix.gif"));
106
+ _splashFileLabel.setName("splashFileLabel");
107
+ _splashFileLabel.setText(Messages.getString("mutexName"));
108
+ jpanel1.add(_splashFileLabel,cc.xy(2,4));
109
+
110
+ _mutexNameField.setName("mutexNameField");
111
+ _mutexNameField.setToolTipText(Messages.getString("mutexNameTip"));
112
+ jpanel1.add(_mutexNameField,cc.xywh(4,4,2,1));
113
+
114
+ _singleInstanceCheck.setActionCommand("Enable splash screen");
115
+ _singleInstanceCheck.setName("singleInstanceCheck");
116
+ _singleInstanceCheck.setText(Messages.getString("enableSingleInstance"));
117
+ jpanel1.add(_singleInstanceCheck,cc.xywh(4,2,2,1));
118
+
119
+ _windowTitleField.setName("windowTitleField");
120
+ _windowTitleField.setToolTipText(Messages.getString("windowTitleTip"));
121
+ jpanel1.add(_windowTitleField,cc.xywh(4,6,2,1));
122
+
123
+ _splashFileLabel1.setName("splashFileLabel");
124
+ _splashFileLabel1.setText(Messages.getString("windowTitle"));
125
+ jpanel1.add(_splashFileLabel1,cc.xy(2,6));
126
+
127
+ addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6 },new int[]{ 1,2,3,4,5,6,7 });
128
+ return jpanel1;
129
+ }
130
+
131
+ /**
132
+ * Initializer
133
+ */
134
+ protected void initializePanel()
135
+ {
136
+ setLayout(new BorderLayout());
137
+ add(createPanel(), BorderLayout.CENTER);
138
+ }
139
+
140
+
141
+ }
@@ -0,0 +1,166 @@
1
+ package net.sf.launch4j.form;
2
+
3
+ import com.jgoodies.forms.layout.CellConstraints;
4
+ import com.jgoodies.forms.layout.FormLayout;
5
+ import java.awt.BorderLayout;
6
+ import java.awt.Container;
7
+ import java.awt.Dimension;
8
+ import javax.swing.Box;
9
+ import javax.swing.ImageIcon;
10
+ import javax.swing.JButton;
11
+ import javax.swing.JCheckBox;
12
+ import javax.swing.JLabel;
13
+ import javax.swing.JPanel;
14
+ import javax.swing.JTextField;
15
+
16
+ public abstract class SplashForm extends JPanel
17
+ {
18
+ protected final JLabel _splashFileLabel = new JLabel();
19
+ protected final JLabel _waitForWindowLabel = new JLabel();
20
+ protected final JLabel _timeoutLabel = new JLabel();
21
+ protected final JCheckBox _timeoutErrCheck = new JCheckBox();
22
+ protected final JTextField _splashFileField = new JTextField();
23
+ protected final JTextField _timeoutField = new JTextField();
24
+ protected final JButton _splashFileButton = new JButton();
25
+ protected final JCheckBox _splashCheck = new JCheckBox();
26
+ protected final JCheckBox _waitForWindowCheck = new JCheckBox();
27
+
28
+ /**
29
+ * Default constructor
30
+ */
31
+ public SplashForm()
32
+ {
33
+ initializePanel();
34
+ }
35
+
36
+ /**
37
+ * Adds fill components to empty cells in the first row and first column of the grid.
38
+ * This ensures that the grid spacing will be the same as shown in the designer.
39
+ * @param cols an array of column indices in the first row where fill components should be added.
40
+ * @param rows an array of row indices in the first column where fill components should be added.
41
+ */
42
+ void addFillComponents( Container panel, int[] cols, int[] rows )
43
+ {
44
+ Dimension filler = new Dimension(10,10);
45
+
46
+ boolean filled_cell_11 = false;
47
+ CellConstraints cc = new CellConstraints();
48
+ if ( cols.length > 0 && rows.length > 0 )
49
+ {
50
+ if ( cols[0] == 1 && rows[0] == 1 )
51
+ {
52
+ /** add a rigid area */
53
+ panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
54
+ filled_cell_11 = true;
55
+ }
56
+ }
57
+
58
+ for( int index = 0; index < cols.length; index++ )
59
+ {
60
+ if ( cols[index] == 1 && filled_cell_11 )
61
+ {
62
+ continue;
63
+ }
64
+ panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
65
+ }
66
+
67
+ for( int index = 0; index < rows.length; index++ )
68
+ {
69
+ if ( rows[index] == 1 && filled_cell_11 )
70
+ {
71
+ continue;
72
+ }
73
+ panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
74
+ }
75
+
76
+ }
77
+
78
+ /**
79
+ * Helper method to load an image file from the CLASSPATH
80
+ * @param imageName the package and name of the file to load relative to the CLASSPATH
81
+ * @return an ImageIcon instance with the specified image file
82
+ * @throws IllegalArgumentException if the image resource cannot be loaded.
83
+ */
84
+ public ImageIcon loadImage( String imageName )
85
+ {
86
+ try
87
+ {
88
+ ClassLoader classloader = getClass().getClassLoader();
89
+ java.net.URL url = classloader.getResource( imageName );
90
+ if ( url != null )
91
+ {
92
+ ImageIcon icon = new ImageIcon( url );
93
+ return icon;
94
+ }
95
+ }
96
+ catch( Exception e )
97
+ {
98
+ e.printStackTrace();
99
+ }
100
+ throw new IllegalArgumentException( "Unable to load image: " + imageName );
101
+ }
102
+
103
+ public JPanel createPanel()
104
+ {
105
+ JPanel jpanel1 = new JPanel();
106
+ FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:60DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE,FILL:26PX:NONE,FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE");
107
+ CellConstraints cc = new CellConstraints();
108
+ jpanel1.setLayout(formlayout1);
109
+
110
+ _splashFileLabel.setIcon(loadImage("images/asterix.gif"));
111
+ _splashFileLabel.setName("splashFileLabel");
112
+ _splashFileLabel.setText(Messages.getString("splashFile"));
113
+ jpanel1.add(_splashFileLabel,cc.xy(2,4));
114
+
115
+ _waitForWindowLabel.setName("waitForWindowLabel");
116
+ _waitForWindowLabel.setText(Messages.getString("waitForWindow"));
117
+ jpanel1.add(_waitForWindowLabel,cc.xy(2,6));
118
+
119
+ _timeoutLabel.setIcon(loadImage("images/asterix.gif"));
120
+ _timeoutLabel.setName("timeoutLabel");
121
+ _timeoutLabel.setText(Messages.getString("timeout"));
122
+ jpanel1.add(_timeoutLabel,cc.xy(2,8));
123
+
124
+ _timeoutErrCheck.setActionCommand("Signal error on timeout");
125
+ _timeoutErrCheck.setName("timeoutErrCheck");
126
+ _timeoutErrCheck.setText(Messages.getString("timeoutErr"));
127
+ _timeoutErrCheck.setToolTipText(Messages.getString("timeoutErrTip"));
128
+ jpanel1.add(_timeoutErrCheck,cc.xywh(4,10,2,1));
129
+
130
+ _splashFileField.setName("splashFileField");
131
+ _splashFileField.setToolTipText(Messages.getString("splashFileTip"));
132
+ jpanel1.add(_splashFileField,cc.xywh(4,4,2,1));
133
+
134
+ _timeoutField.setName("timeoutField");
135
+ _timeoutField.setToolTipText(Messages.getString("timeoutTip"));
136
+ jpanel1.add(_timeoutField,cc.xy(4,8));
137
+
138
+ _splashFileButton.setIcon(loadImage("images/open16.png"));
139
+ _splashFileButton.setName("splashFileButton");
140
+ jpanel1.add(_splashFileButton,cc.xy(7,4));
141
+
142
+ _splashCheck.setActionCommand("Enable splash screen");
143
+ _splashCheck.setName("splashCheck");
144
+ _splashCheck.setText(Messages.getString("enableSplash"));
145
+ jpanel1.add(_splashCheck,cc.xywh(4,2,2,1));
146
+
147
+ _waitForWindowCheck.setActionCommand("Close splash screen when an application window appears");
148
+ _waitForWindowCheck.setName("waitForWindowCheck");
149
+ _waitForWindowCheck.setText(Messages.getString("waitForWindowText"));
150
+ jpanel1.add(_waitForWindowCheck,cc.xywh(4,6,2,1));
151
+
152
+ addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 });
153
+ return jpanel1;
154
+ }
155
+
156
+ /**
157
+ * Initializer
158
+ */
159
+ protected void initializePanel()
160
+ {
161
+ setLayout(new BorderLayout());
162
+ add(createPanel(), BorderLayout.CENTER);
163
+ }
164
+
165
+
166
+ }