Showing the name of the version in the component's title
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 10:08:06 +0200
changeset 243ae80e0b7f0f6
parent 242 055f549d8454
child 244 2b19d24a755f
Showing the name of the version in the component's title
samples/componentinjection/anagram-modular/build.xml
samples/componentinjection/anagram-modular/src-gui/org/apidesign/anagram/gui/Anagrams.java
     1.1 --- a/samples/componentinjection/anagram-modular/build.xml	Sat Jun 14 10:08:03 2008 +0200
     1.2 +++ b/samples/componentinjection/anagram-modular/build.xml	Sat Jun 14 10:08:06 2008 +0200
     1.3 @@ -103,7 +103,9 @@
     1.4      </target>
     1.5  
     1.6      <target name="-run-one">
     1.7 -        <java classpath="${cp}:build/${version}/classes" classname="${main}"/>
     1.8 +        <java classpath="${cp}:build/${version}/classes" classname="${main}">
     1.9 +            <jvmarg value="-Danagram.version=${version}"/>
    1.10 +        </java>
    1.11      </target>
    1.12      
    1.13      <target name="-build-one">
     2.1 --- a/samples/componentinjection/anagram-modular/src-gui/org/apidesign/anagram/gui/Anagrams.java	Sat Jun 14 10:08:03 2008 +0200
     2.2 +++ b/samples/componentinjection/anagram-modular/src-gui/org/apidesign/anagram/gui/Anagrams.java	Sat Jun 14 10:08:06 2008 +0200
     2.3 @@ -14,6 +14,14 @@
     2.4      public Anagrams() {
     2.5          initComponents();        
     2.6          getRootPane().setDefaultButton(guessButton);
     2.7 +        
     2.8 +        String version = System.getProperty("anagram.version");
     2.9 +        if (version != null) {
    2.10 +            if (version.startsWith("app-")) {
    2.11 +                version = version.substring(4);
    2.12 +            }
    2.13 +            setTitle("Anagrams - " + version + " version");
    2.14 +        }
    2.15      }
    2.16      
    2.17      protected abstract WordLibrary getWordLibrary();