drobnosti: lgoování, formátování, netbeans…
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 29 Nov 2011 17:16:47 +0100
changeset 13b15d81be8af3
parent 12 48782a50e094
child 14 3a12bd9312b1
drobnosti: lgoování, formátování, netbeans…
.hgignore
java/Postak/nbproject/build-impl.xml
java/Postak/nbproject/genfiles.properties
java/Postak/src/cz/frantovo/postak/HromadnaZprava.java
java/SuperPostak/nbproject/build-impl.xml
java/SuperPostak/nbproject/genfiles.properties
java/SuperPostak/src/cz/frantovo/superPostak/Data.java
java/SuperPostak/src/cz/frantovo/superPostak/DataSQL.java
java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.java
     1.1 --- a/.hgignore	Tue Nov 29 17:16:11 2011 +0100
     1.2 +++ b/.hgignore	Tue Nov 29 17:16:47 2011 +0100
     1.3 @@ -5,3 +5,5 @@
     1.4  java/SuperPostak/dist/*
     1.5  java/SuperPostak/build/*
     1.6  java/SuperPostak/nbproject/private/*
     1.7 +
     1.8 +grafika/logo.png
     2.1 --- a/java/Postak/nbproject/build-impl.xml	Tue Nov 29 17:16:11 2011 +0100
     2.2 +++ b/java/Postak/nbproject/build-impl.xml	Tue Nov 29 17:16:47 2011 +0100
     2.3 @@ -55,7 +55,14 @@
     2.4      </target>
     2.5      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
     2.6          <available file="${manifest.file}" property="manifest.available"/>
     2.7 -        <available file="${application.splash}" property="splashscreen.available"/>
     2.8 +        <condition property="splashscreen.available">
     2.9 +            <and>
    2.10 +                <not>
    2.11 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    2.12 +                </not>
    2.13 +                <available file="${application.splash}"/>
    2.14 +            </and>
    2.15 +        </condition>
    2.16          <condition property="main.class.available">
    2.17              <and>
    2.18                  <isset property="main.class"/>
    2.19 @@ -70,8 +77,14 @@
    2.20                  <isset property="main.class.available"/>
    2.21              </and>
    2.22          </condition>
    2.23 +        <condition property="do.archive">
    2.24 +            <not>
    2.25 +                <istrue value="${jar.archive.disabled}"/>
    2.26 +            </not>
    2.27 +        </condition>
    2.28          <condition property="do.mkdist">
    2.29              <and>
    2.30 +                <isset property="do.archive"/>
    2.31                  <isset property="libs.CopyLibs.classpath"/>
    2.32                  <not>
    2.33                      <istrue value="${mkdist.disabled}"/>
    2.34 @@ -84,40 +97,41 @@
    2.35                  <isset property="do.mkdist"/>
    2.36              </and>
    2.37          </condition>
    2.38 -        <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
    2.39 -            <and>
    2.40 -                <istrue value="${manifest.available+main.class+mkdist.available}"/>
    2.41 -                <istrue value="${splashscreen.available}"/>
    2.42 -            </and>
    2.43 -        </condition>
    2.44 -        <condition property="do.archive">
    2.45 -            <not>
    2.46 -                <istrue value="${jar.archive.disabled}"/>
    2.47 -            </not>
    2.48 -        </condition>
    2.49          <condition property="do.archive+manifest.available">
    2.50              <and>
    2.51                  <isset property="manifest.available"/>
    2.52                  <istrue value="${do.archive}"/>
    2.53              </and>
    2.54          </condition>
    2.55 +        <condition property="do.archive+main.class.available">
    2.56 +            <and>
    2.57 +                <isset property="main.class.available"/>
    2.58 +                <istrue value="${do.archive}"/>
    2.59 +            </and>
    2.60 +        </condition>
    2.61 +        <condition property="do.archive+splashscreen.available">
    2.62 +            <and>
    2.63 +                <isset property="splashscreen.available"/>
    2.64 +                <istrue value="${do.archive}"/>
    2.65 +            </and>
    2.66 +        </condition>
    2.67          <condition property="do.archive+manifest.available+main.class">
    2.68              <and>
    2.69                  <istrue value="${manifest.available+main.class}"/>
    2.70                  <istrue value="${do.archive}"/>
    2.71              </and>
    2.72          </condition>
    2.73 -        <condition property="do.archive+manifest.available+main.class+mkdist.available">
    2.74 -            <and>
    2.75 -                <istrue value="${manifest.available+main.class+mkdist.available}"/>
    2.76 -                <istrue value="${do.archive}"/>
    2.77 -            </and>
    2.78 +        <condition property="manifest.available-mkdist.available">
    2.79 +            <or>
    2.80 +                <istrue value="${manifest.available}"/>
    2.81 +                <isset property="do.mkdist"/>
    2.82 +            </or>
    2.83          </condition>
    2.84 -        <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
    2.85 -            <and>
    2.86 -                <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
    2.87 -                <istrue value="${do.archive}"/>
    2.88 -            </and>
    2.89 +        <condition property="manifest.available+main.class-mkdist.available">
    2.90 +            <or>
    2.91 +                <istrue value="${manifest.available+main.class}"/>
    2.92 +                <isset property="do.mkdist"/>
    2.93 +            </or>
    2.94          </condition>
    2.95          <condition property="have.tests">
    2.96              <or>
    2.97 @@ -173,8 +187,17 @@
    2.98          <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
    2.99              <length length="0" string="${endorsed.classpath}" when="greater"/>
   2.100          </condition>
   2.101 -        <property name="javac.fork" value="false"/>
   2.102 +        <condition else="false" property="jdkBug6558476">
   2.103 +            <and>
   2.104 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   2.105 +                <not>
   2.106 +                    <os family="unix"/>
   2.107 +                </not>
   2.108 +            </and>
   2.109 +        </condition>
   2.110 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   2.111          <property name="jar.index" value="false"/>
   2.112 +        <property name="jar.index.metainf" value="${jar.index}"/>
   2.113          <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   2.114      </target>
   2.115      <target name="-post-init">
   2.116 @@ -302,7 +325,9 @@
   2.117                  <delete>
   2.118                      <files includesfile="${javac.includesfile.binary}"/>
   2.119                  </delete>
   2.120 -                <delete file="${javac.includesfile.binary}"/>
   2.121 +                <delete>
   2.122 +                    <fileset file="${javac.includesfile.binary}"/>
   2.123 +                </delete>
   2.124              </sequential>
   2.125          </macrodef>
   2.126      </target>
   2.127 @@ -312,7 +337,8 @@
   2.128              <attribute default="${excludes}" name="excludes"/>
   2.129              <attribute default="**" name="testincludes"/>
   2.130              <sequential>
   2.131 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
   2.132 +                <property name="junit.forkmode" value="perTest"/>
   2.133 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.134                      <batchtest todir="${build.test.results.dir}">
   2.135                          <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.136                              <filename name="@{testincludes}"/>
   2.137 @@ -328,11 +354,56 @@
   2.138                      <formatter type="brief" usefile="false"/>
   2.139                      <formatter type="xml"/>
   2.140                      <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.141 +                    <jvmarg value="-ea"/>
   2.142                      <jvmarg line="${run.jvmargs}"/>
   2.143                  </junit>
   2.144              </sequential>
   2.145          </macrodef>
   2.146      </target>
   2.147 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
   2.148 +    <target name="-profile-pre-init">
   2.149 +        <!-- Empty placeholder for easier customization. -->
   2.150 +        <!-- You can override this target in the ../build.xml file. -->
   2.151 +    </target>
   2.152 +    <target name="-profile-post-init">
   2.153 +        <!-- Empty placeholder for easier customization. -->
   2.154 +        <!-- You can override this target in the ../build.xml file. -->
   2.155 +    </target>
   2.156 +    <target name="-profile-init-macrodef-profile">
   2.157 +        <macrodef name="resolve">
   2.158 +            <attribute name="name"/>
   2.159 +            <attribute name="value"/>
   2.160 +            <sequential>
   2.161 +                <property name="@{name}" value="${env.@{value}}"/>
   2.162 +            </sequential>
   2.163 +        </macrodef>
   2.164 +        <macrodef name="profile">
   2.165 +            <attribute default="${main.class}" name="classname"/>
   2.166 +            <element name="customize" optional="true"/>
   2.167 +            <sequential>
   2.168 +                <property environment="env"/>
   2.169 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   2.170 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   2.171 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   2.172 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   2.173 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   2.174 +                    <arg line="${application.args}"/>
   2.175 +                    <classpath>
   2.176 +                        <path path="${run.classpath}"/>
   2.177 +                    </classpath>
   2.178 +                    <syspropertyset>
   2.179 +                        <propertyref prefix="run-sys-prop."/>
   2.180 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   2.181 +                    </syspropertyset>
   2.182 +                    <customize/>
   2.183 +                </java>
   2.184 +            </sequential>
   2.185 +        </macrodef>
   2.186 +    </target>
   2.187 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
   2.188 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   2.189 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   2.190 +    </target>
   2.191      <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   2.192          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.193              <attribute default="${main.class}" name="name"/>
   2.194 @@ -427,6 +498,7 @@
   2.195      </target>
   2.196      <target name="-init-macrodef-copylibs">
   2.197          <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.198 +            <attribute default="${manifest.file}" name="manifest"/>
   2.199              <element name="customize" optional="true"/>
   2.200              <sequential>
   2.201                  <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.202 @@ -442,7 +514,7 @@
   2.203                      </chainedmapper>
   2.204                  </pathconvert>
   2.205                  <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   2.206 -                <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.207 +                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.208                      <fileset dir="${build.classes.dir}"/>
   2.209                      <manifest>
   2.210                          <attribute name="Class-Path" value="${jar.classpath}"/>
   2.211 @@ -571,10 +643,10 @@
   2.212          <!-- Empty placeholder for easier customization. -->
   2.213          <!-- You can override this target in the ../build.xml file. -->
   2.214      </target>
   2.215 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
   2.216 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   2.217          <j2seproject1:jar/>
   2.218      </target>
   2.219 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   2.220 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
   2.221          <j2seproject1:jar manifest="${manifest.file}"/>
   2.222      </target>
   2.223      <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   2.224 @@ -583,44 +655,53 @@
   2.225                  <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   2.226              </j2seproject1:manifest>
   2.227          </j2seproject1:jar>
   2.228 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.229 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   2.230          <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.231          <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.232          <pathconvert property="run.classpath.with.dist.jar">
   2.233              <path path="${run.classpath}"/>
   2.234              <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   2.235          </pathconvert>
   2.236 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   2.237 +        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   2.238      </target>
   2.239 -    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
   2.240 +    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
   2.241 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   2.242 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   2.243 +    </target>
   2.244 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
   2.245 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   2.246 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   2.247 +    </target>
   2.248 +    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
   2.249 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.250 +            <attribute name="Main-Class" value="${main.class}"/>
   2.251 +        </manifest>
   2.252 +    </target>
   2.253 +    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
   2.254          <basename file="${application.splash}" property="splashscreen.basename"/>
   2.255          <mkdir dir="${build.classes.dir}/META-INF"/>
   2.256          <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   2.257 -        <j2seproject3:copylibs>
   2.258 -            <customize>
   2.259 -                <attribute name="Main-Class" value="${main.class}"/>
   2.260 -                <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   2.261 -            </customize>
   2.262 -        </j2seproject3:copylibs>
   2.263 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.264 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.265 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   2.266 +        </manifest>
   2.267 +    </target>
   2.268 +    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
   2.269 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   2.270 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   2.271          <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.272 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   2.273 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   2.274      </target>
   2.275 -    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
   2.276 -        <j2seproject3:copylibs>
   2.277 -            <customize>
   2.278 -                <attribute name="Main-Class" value="${main.class}"/>
   2.279 -            </customize>
   2.280 -        </j2seproject3:copylibs>
   2.281 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.282 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.283 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   2.284 +    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
   2.285 +        <delete>
   2.286 +            <fileset file="${tmp.manifest.file}"/>
   2.287 +        </delete>
   2.288      </target>
   2.289 +    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
   2.290      <target name="-post-jar">
   2.291          <!-- Empty placeholder for easier customization. -->
   2.292          <!-- You can override this target in the ../build.xml file. -->
   2.293      </target>
   2.294 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
   2.295 +    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
   2.296      <!--
   2.297                  =================
   2.298                  EXECUTION SECTION
   2.299 @@ -686,6 +767,72 @@
   2.300      </target>
   2.301      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   2.302      <!--
   2.303 +                =================
   2.304 +                PROFILING SECTION
   2.305 +                =================
   2.306 +            -->
   2.307 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
   2.308 +        <nbprofiledirect>
   2.309 +            <classpath>
   2.310 +                <path path="${run.classpath}"/>
   2.311 +            </classpath>
   2.312 +        </nbprofiledirect>
   2.313 +        <profile/>
   2.314 +    </target>
   2.315 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
   2.316 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   2.317 +        <nbprofiledirect>
   2.318 +            <classpath>
   2.319 +                <path path="${run.classpath}"/>
   2.320 +            </classpath>
   2.321 +        </nbprofiledirect>
   2.322 +        <profile classname="${profile.class}"/>
   2.323 +    </target>
   2.324 +    <!--
   2.325 +                =========================
   2.326 +                APPLET PROFILING  SECTION
   2.327 +                =========================
   2.328 +            -->
   2.329 +    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
   2.330 +        <nbprofiledirect>
   2.331 +            <classpath>
   2.332 +                <path path="${run.classpath}"/>
   2.333 +            </classpath>
   2.334 +        </nbprofiledirect>
   2.335 +        <profile classname="sun.applet.AppletViewer">
   2.336 +            <customize>
   2.337 +                <arg value="${applet.url}"/>
   2.338 +            </customize>
   2.339 +        </profile>
   2.340 +    </target>
   2.341 +    <!--
   2.342 +                =========================
   2.343 +                TESTS PROFILING  SECTION
   2.344 +                =========================
   2.345 +            -->
   2.346 +    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
   2.347 +        <nbprofiledirect>
   2.348 +            <classpath>
   2.349 +                <path path="${run.test.classpath}"/>
   2.350 +            </classpath>
   2.351 +        </nbprofiledirect>
   2.352 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
   2.353 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   2.354 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   2.355 +            <jvmarg line="${profiler.info.jvmargs}"/>
   2.356 +            <test name="${profile.class}"/>
   2.357 +            <classpath>
   2.358 +                <path path="${run.test.classpath}"/>
   2.359 +            </classpath>
   2.360 +            <syspropertyset>
   2.361 +                <propertyref prefix="test-sys-prop."/>
   2.362 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.363 +            </syspropertyset>
   2.364 +            <formatter type="brief" usefile="false"/>
   2.365 +            <formatter type="xml"/>
   2.366 +        </junit>
   2.367 +    </target>
   2.368 +    <!--
   2.369                  ===============
   2.370                  JAVADOC SECTION
   2.371                  ===============
   2.372 @@ -696,11 +843,12 @@
   2.373              <classpath>
   2.374                  <path path="${javac.classpath}"/>
   2.375              </classpath>
   2.376 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   2.377 +            <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
   2.378                  <filename name="**/*.java"/>
   2.379              </fileset>
   2.380              <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   2.381                  <include name="**/*.java"/>
   2.382 +                <exclude name="*.java"/>
   2.383              </fileset>
   2.384          </javadoc>
   2.385          <copy todir="${dist.javadoc.dir}">
   2.386 @@ -731,7 +879,7 @@
   2.387      <target if="do.depend.true" name="-compile-test-depend">
   2.388          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   2.389      </target>
   2.390 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   2.391 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   2.392          <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
   2.393          <copy todir="${build.test.classes.dir}">
   2.394              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   2.395 @@ -746,7 +894,7 @@
   2.396          <!-- Empty placeholder for easier customization. -->
   2.397          <!-- You can override this target in the ../build.xml file. -->
   2.398      </target>
   2.399 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   2.400 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   2.401          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   2.402          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   2.403          <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
     3.1 --- a/java/Postak/nbproject/genfiles.properties	Tue Nov 29 17:16:11 2011 +0100
     3.2 +++ b/java/Postak/nbproject/genfiles.properties	Tue Nov 29 17:16:47 2011 +0100
     3.3 @@ -4,5 +4,5 @@
     3.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     3.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     3.6  nbproject/build-impl.xml.data.CRC32=ecce8ba0
     3.7 -nbproject/build-impl.xml.script.CRC32=bcebfc1f
     3.8 -nbproject/build-impl.xml.stylesheet.CRC32=229523de@1.38.3.45
     3.9 +nbproject/build-impl.xml.script.CRC32=c4083fc9
    3.10 +nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
     4.1 --- a/java/Postak/src/cz/frantovo/postak/HromadnaZprava.java	Tue Nov 29 17:16:11 2011 +0100
     4.2 +++ b/java/Postak/src/cz/frantovo/postak/HromadnaZprava.java	Tue Nov 29 17:16:47 2011 +0100
     4.3 @@ -13,7 +13,7 @@
     4.4   */
     4.5  public class HromadnaZprava implements Cloneable {
     4.6  
     4.7 -    private static Logger log = Logger.getLogger(HromadnaZprava.class.getName());
     4.8 +    private static final Logger log = Logger.getLogger(HromadnaZprava.class.getName());
     4.9      /** Předmět zprávy */
    4.10      private String predmet;
    4.11      /** Adresa a případně jméno odesílatele */
    4.12 @@ -65,7 +65,7 @@
    4.13  
    4.14      public void pridejPrijemce(Collection<InternetAddressKomu> prijemci) {
    4.15          if (prijemci == null) {
    4.16 -            log.log(Level.FINER, "Prázdná množina příjemců - nic nepřidáme");
    4.17 +            log.log(Level.FINER, "Prázdná množina příjemců – nic nepřidáme");
    4.18          } else {
    4.19              this.prijemci.addAll(prijemci);
    4.20          }
     5.1 --- a/java/SuperPostak/nbproject/build-impl.xml	Tue Nov 29 17:16:11 2011 +0100
     5.2 +++ b/java/SuperPostak/nbproject/build-impl.xml	Tue Nov 29 17:16:47 2011 +0100
     5.3 @@ -56,7 +56,14 @@
     5.4      </target>
     5.5      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
     5.6          <available file="${manifest.file}" property="manifest.available"/>
     5.7 -        <available file="${application.splash}" property="splashscreen.available"/>
     5.8 +        <condition property="splashscreen.available">
     5.9 +            <and>
    5.10 +                <not>
    5.11 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    5.12 +                </not>
    5.13 +                <available file="${application.splash}"/>
    5.14 +            </and>
    5.15 +        </condition>
    5.16          <condition property="main.class.available">
    5.17              <and>
    5.18                  <isset property="main.class"/>
    5.19 @@ -71,8 +78,14 @@
    5.20                  <isset property="main.class.available"/>
    5.21              </and>
    5.22          </condition>
    5.23 +        <condition property="do.archive">
    5.24 +            <not>
    5.25 +                <istrue value="${jar.archive.disabled}"/>
    5.26 +            </not>
    5.27 +        </condition>
    5.28          <condition property="do.mkdist">
    5.29              <and>
    5.30 +                <isset property="do.archive"/>
    5.31                  <isset property="libs.CopyLibs.classpath"/>
    5.32                  <not>
    5.33                      <istrue value="${mkdist.disabled}"/>
    5.34 @@ -85,40 +98,41 @@
    5.35                  <isset property="do.mkdist"/>
    5.36              </and>
    5.37          </condition>
    5.38 -        <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
    5.39 -            <and>
    5.40 -                <istrue value="${manifest.available+main.class+mkdist.available}"/>
    5.41 -                <istrue value="${splashscreen.available}"/>
    5.42 -            </and>
    5.43 -        </condition>
    5.44 -        <condition property="do.archive">
    5.45 -            <not>
    5.46 -                <istrue value="${jar.archive.disabled}"/>
    5.47 -            </not>
    5.48 -        </condition>
    5.49          <condition property="do.archive+manifest.available">
    5.50              <and>
    5.51                  <isset property="manifest.available"/>
    5.52                  <istrue value="${do.archive}"/>
    5.53              </and>
    5.54          </condition>
    5.55 +        <condition property="do.archive+main.class.available">
    5.56 +            <and>
    5.57 +                <isset property="main.class.available"/>
    5.58 +                <istrue value="${do.archive}"/>
    5.59 +            </and>
    5.60 +        </condition>
    5.61 +        <condition property="do.archive+splashscreen.available">
    5.62 +            <and>
    5.63 +                <isset property="splashscreen.available"/>
    5.64 +                <istrue value="${do.archive}"/>
    5.65 +            </and>
    5.66 +        </condition>
    5.67          <condition property="do.archive+manifest.available+main.class">
    5.68              <and>
    5.69                  <istrue value="${manifest.available+main.class}"/>
    5.70                  <istrue value="${do.archive}"/>
    5.71              </and>
    5.72          </condition>
    5.73 -        <condition property="do.archive+manifest.available+main.class+mkdist.available">
    5.74 -            <and>
    5.75 -                <istrue value="${manifest.available+main.class+mkdist.available}"/>
    5.76 -                <istrue value="${do.archive}"/>
    5.77 -            </and>
    5.78 +        <condition property="manifest.available-mkdist.available">
    5.79 +            <or>
    5.80 +                <istrue value="${manifest.available}"/>
    5.81 +                <isset property="do.mkdist"/>
    5.82 +            </or>
    5.83          </condition>
    5.84 -        <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
    5.85 -            <and>
    5.86 -                <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
    5.87 -                <istrue value="${do.archive}"/>
    5.88 -            </and>
    5.89 +        <condition property="manifest.available+main.class-mkdist.available">
    5.90 +            <or>
    5.91 +                <istrue value="${manifest.available+main.class}"/>
    5.92 +                <isset property="do.mkdist"/>
    5.93 +            </or>
    5.94          </condition>
    5.95          <condition property="have.tests">
    5.96              <or>
    5.97 @@ -174,8 +188,17 @@
    5.98          <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
    5.99              <length length="0" string="${endorsed.classpath}" when="greater"/>
   5.100          </condition>
   5.101 -        <property name="javac.fork" value="false"/>
   5.102 +        <condition else="false" property="jdkBug6558476">
   5.103 +            <and>
   5.104 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   5.105 +                <not>
   5.106 +                    <os family="unix"/>
   5.107 +                </not>
   5.108 +            </and>
   5.109 +        </condition>
   5.110 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   5.111          <property name="jar.index" value="false"/>
   5.112 +        <property name="jar.index.metainf" value="${jar.index}"/>
   5.113          <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   5.114      </target>
   5.115      <target name="-post-init">
   5.116 @@ -303,7 +326,9 @@
   5.117                  <delete>
   5.118                      <files includesfile="${javac.includesfile.binary}"/>
   5.119                  </delete>
   5.120 -                <delete file="${javac.includesfile.binary}"/>
   5.121 +                <delete>
   5.122 +                    <fileset file="${javac.includesfile.binary}"/>
   5.123 +                </delete>
   5.124              </sequential>
   5.125          </macrodef>
   5.126      </target>
   5.127 @@ -313,7 +338,8 @@
   5.128              <attribute default="${excludes}" name="excludes"/>
   5.129              <attribute default="**" name="testincludes"/>
   5.130              <sequential>
   5.131 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
   5.132 +                <property name="junit.forkmode" value="perTest"/>
   5.133 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   5.134                      <batchtest todir="${build.test.results.dir}">
   5.135                          <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   5.136                              <filename name="@{testincludes}"/>
   5.137 @@ -329,11 +355,56 @@
   5.138                      <formatter type="brief" usefile="false"/>
   5.139                      <formatter type="xml"/>
   5.140                      <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.141 +                    <jvmarg value="-ea"/>
   5.142                      <jvmarg line="${run.jvmargs}"/>
   5.143                  </junit>
   5.144              </sequential>
   5.145          </macrodef>
   5.146      </target>
   5.147 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
   5.148 +    <target name="-profile-pre-init">
   5.149 +        <!-- Empty placeholder for easier customization. -->
   5.150 +        <!-- You can override this target in the ../build.xml file. -->
   5.151 +    </target>
   5.152 +    <target name="-profile-post-init">
   5.153 +        <!-- Empty placeholder for easier customization. -->
   5.154 +        <!-- You can override this target in the ../build.xml file. -->
   5.155 +    </target>
   5.156 +    <target name="-profile-init-macrodef-profile">
   5.157 +        <macrodef name="resolve">
   5.158 +            <attribute name="name"/>
   5.159 +            <attribute name="value"/>
   5.160 +            <sequential>
   5.161 +                <property name="@{name}" value="${env.@{value}}"/>
   5.162 +            </sequential>
   5.163 +        </macrodef>
   5.164 +        <macrodef name="profile">
   5.165 +            <attribute default="${main.class}" name="classname"/>
   5.166 +            <element name="customize" optional="true"/>
   5.167 +            <sequential>
   5.168 +                <property environment="env"/>
   5.169 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   5.170 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   5.171 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   5.172 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   5.173 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   5.174 +                    <arg line="${application.args}"/>
   5.175 +                    <classpath>
   5.176 +                        <path path="${run.classpath}"/>
   5.177 +                    </classpath>
   5.178 +                    <syspropertyset>
   5.179 +                        <propertyref prefix="run-sys-prop."/>
   5.180 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   5.181 +                    </syspropertyset>
   5.182 +                    <customize/>
   5.183 +                </java>
   5.184 +            </sequential>
   5.185 +        </macrodef>
   5.186 +    </target>
   5.187 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
   5.188 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   5.189 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   5.190 +    </target>
   5.191      <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   5.192          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   5.193              <attribute default="${main.class}" name="name"/>
   5.194 @@ -428,6 +499,7 @@
   5.195      </target>
   5.196      <target name="-init-macrodef-copylibs">
   5.197          <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.198 +            <attribute default="${manifest.file}" name="manifest"/>
   5.199              <element name="customize" optional="true"/>
   5.200              <sequential>
   5.201                  <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   5.202 @@ -443,7 +515,7 @@
   5.203                      </chainedmapper>
   5.204                  </pathconvert>
   5.205                  <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   5.206 -                <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   5.207 +                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   5.208                      <fileset dir="${build.classes.dir}"/>
   5.209                      <manifest>
   5.210                          <attribute name="Class-Path" value="${jar.classpath}"/>
   5.211 @@ -586,10 +658,10 @@
   5.212          <!-- Empty placeholder for easier customization. -->
   5.213          <!-- You can override this target in the ../build.xml file. -->
   5.214      </target>
   5.215 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
   5.216 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   5.217          <j2seproject1:jar/>
   5.218      </target>
   5.219 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   5.220 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
   5.221          <j2seproject1:jar manifest="${manifest.file}"/>
   5.222      </target>
   5.223      <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   5.224 @@ -598,44 +670,53 @@
   5.225                  <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   5.226              </j2seproject1:manifest>
   5.227          </j2seproject1:jar>
   5.228 -        <echo>To run this application from the command line without Ant, try:</echo>
   5.229 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   5.230          <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   5.231          <property location="${dist.jar}" name="dist.jar.resolved"/>
   5.232          <pathconvert property="run.classpath.with.dist.jar">
   5.233              <path path="${run.classpath}"/>
   5.234              <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   5.235          </pathconvert>
   5.236 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   5.237 +        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   5.238      </target>
   5.239 -    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
   5.240 +    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
   5.241 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   5.242 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   5.243 +    </target>
   5.244 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
   5.245 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   5.246 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   5.247 +    </target>
   5.248 +    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
   5.249 +        <manifest file="${tmp.manifest.file}" mode="update">
   5.250 +            <attribute name="Main-Class" value="${main.class}"/>
   5.251 +        </manifest>
   5.252 +    </target>
   5.253 +    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
   5.254          <basename file="${application.splash}" property="splashscreen.basename"/>
   5.255          <mkdir dir="${build.classes.dir}/META-INF"/>
   5.256          <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   5.257 -        <j2seproject3:copylibs>
   5.258 -            <customize>
   5.259 -                <attribute name="Main-Class" value="${main.class}"/>
   5.260 -                <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   5.261 -            </customize>
   5.262 -        </j2seproject3:copylibs>
   5.263 -        <echo>To run this application from the command line without Ant, try:</echo>
   5.264 +        <manifest file="${tmp.manifest.file}" mode="update">
   5.265 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   5.266 +        </manifest>
   5.267 +    </target>
   5.268 +    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
   5.269 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   5.270 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   5.271          <property location="${dist.jar}" name="dist.jar.resolved"/>
   5.272 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   5.273 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   5.274      </target>
   5.275 -    <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
   5.276 -        <j2seproject3:copylibs>
   5.277 -            <customize>
   5.278 -                <attribute name="Main-Class" value="${main.class}"/>
   5.279 -            </customize>
   5.280 -        </j2seproject3:copylibs>
   5.281 -        <echo>To run this application from the command line without Ant, try:</echo>
   5.282 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
   5.283 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   5.284 +    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
   5.285 +        <delete>
   5.286 +            <fileset file="${tmp.manifest.file}"/>
   5.287 +        </delete>
   5.288      </target>
   5.289 +    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
   5.290      <target name="-post-jar">
   5.291          <!-- Empty placeholder for easier customization. -->
   5.292          <!-- You can override this target in the ../build.xml file. -->
   5.293      </target>
   5.294 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar,jnlp" description="Build JAR." name="jar"/>
   5.295 +    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar,jnlp" description="Build JAR." name="jar"/>
   5.296      <!--
   5.297                  =================
   5.298                  EXECUTION SECTION
   5.299 @@ -701,6 +782,72 @@
   5.300      </target>
   5.301      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   5.302      <!--
   5.303 +                =================
   5.304 +                PROFILING SECTION
   5.305 +                =================
   5.306 +            -->
   5.307 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
   5.308 +        <nbprofiledirect>
   5.309 +            <classpath>
   5.310 +                <path path="${run.classpath}"/>
   5.311 +            </classpath>
   5.312 +        </nbprofiledirect>
   5.313 +        <profile/>
   5.314 +    </target>
   5.315 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
   5.316 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   5.317 +        <nbprofiledirect>
   5.318 +            <classpath>
   5.319 +                <path path="${run.classpath}"/>
   5.320 +            </classpath>
   5.321 +        </nbprofiledirect>
   5.322 +        <profile classname="${profile.class}"/>
   5.323 +    </target>
   5.324 +    <!--
   5.325 +                =========================
   5.326 +                APPLET PROFILING  SECTION
   5.327 +                =========================
   5.328 +            -->
   5.329 +    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
   5.330 +        <nbprofiledirect>
   5.331 +            <classpath>
   5.332 +                <path path="${run.classpath}"/>
   5.333 +            </classpath>
   5.334 +        </nbprofiledirect>
   5.335 +        <profile classname="sun.applet.AppletViewer">
   5.336 +            <customize>
   5.337 +                <arg value="${applet.url}"/>
   5.338 +            </customize>
   5.339 +        </profile>
   5.340 +    </target>
   5.341 +    <!--
   5.342 +                =========================
   5.343 +                TESTS PROFILING  SECTION
   5.344 +                =========================
   5.345 +            -->
   5.346 +    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
   5.347 +        <nbprofiledirect>
   5.348 +            <classpath>
   5.349 +                <path path="${run.test.classpath}"/>
   5.350 +            </classpath>
   5.351 +        </nbprofiledirect>
   5.352 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
   5.353 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   5.354 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   5.355 +            <jvmarg line="${profiler.info.jvmargs}"/>
   5.356 +            <test name="${profile.class}"/>
   5.357 +            <classpath>
   5.358 +                <path path="${run.test.classpath}"/>
   5.359 +            </classpath>
   5.360 +            <syspropertyset>
   5.361 +                <propertyref prefix="test-sys-prop."/>
   5.362 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
   5.363 +            </syspropertyset>
   5.364 +            <formatter type="brief" usefile="false"/>
   5.365 +            <formatter type="xml"/>
   5.366 +        </junit>
   5.367 +    </target>
   5.368 +    <!--
   5.369                  ===============
   5.370                  JAVADOC SECTION
   5.371                  ===============
   5.372 @@ -711,11 +858,12 @@
   5.373              <classpath>
   5.374                  <path path="${javac.classpath}"/>
   5.375              </classpath>
   5.376 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   5.377 +            <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
   5.378                  <filename name="**/*.java"/>
   5.379              </fileset>
   5.380              <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   5.381                  <include name="**/*.java"/>
   5.382 +                <exclude name="*.java"/>
   5.383              </fileset>
   5.384          </javadoc>
   5.385          <copy todir="${dist.javadoc.dir}">
   5.386 @@ -746,7 +894,7 @@
   5.387      <target if="do.depend.true" name="-compile-test-depend">
   5.388          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   5.389      </target>
   5.390 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   5.391 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   5.392          <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
   5.393          <copy todir="${build.test.classes.dir}">
   5.394              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   5.395 @@ -761,7 +909,7 @@
   5.396          <!-- Empty placeholder for easier customization. -->
   5.397          <!-- You can override this target in the ../build.xml file. -->
   5.398      </target>
   5.399 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   5.400 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   5.401          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   5.402          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   5.403          <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
     6.1 --- a/java/SuperPostak/nbproject/genfiles.properties	Tue Nov 29 17:16:11 2011 +0100
     6.2 +++ b/java/SuperPostak/nbproject/genfiles.properties	Tue Nov 29 17:16:47 2011 +0100
     6.3 @@ -4,5 +4,5 @@
     6.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     6.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     6.6  nbproject/build-impl.xml.data.CRC32=d917048a
     6.7 -nbproject/build-impl.xml.script.CRC32=232b6b6d
     6.8 -nbproject/build-impl.xml.stylesheet.CRC32=229523de@1.38.3.45
     6.9 +nbproject/build-impl.xml.script.CRC32=ccb272cf
    6.10 +nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
     7.1 --- a/java/SuperPostak/src/cz/frantovo/superPostak/Data.java	Tue Nov 29 17:16:11 2011 +0100
     7.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/Data.java	Tue Nov 29 17:16:47 2011 +0100
     7.3 @@ -15,7 +15,7 @@
     7.4   */
     7.5  public class Data {
     7.6  
     7.7 -    private static Logger log = Logger.getLogger(Data.class.getName());
     7.8 +    private static final Logger log = Logger.getLogger(Data.class.getName());
     7.9      private static Connection spojeni;
    7.10      private static byte[] hash;
    7.11      private static MessageDigest sha;
    7.12 @@ -48,7 +48,7 @@
    7.13          /** Vrátíme nové spojení */
    7.14          hash = hashuj(url, jmeno, heslo);
    7.15          spojeni = DriverManager.getConnection(url, jmeno, String.valueOf(heslo));
    7.16 -        log.log(Level.INFO, "Otevřeno nové spoejní spojení k databázi: " + url);
    7.17 +        log.log(Level.INFO, "Otevřeno nové spoejní spojení k databázi: {0}", url);
    7.18          return spojeni;
    7.19      }
    7.20  
     8.1 --- a/java/SuperPostak/src/cz/frantovo/superPostak/DataSQL.java	Tue Nov 29 17:16:11 2011 +0100
     8.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/DataSQL.java	Tue Nov 29 17:16:47 2011 +0100
     8.3 @@ -17,7 +17,7 @@
     8.4   */
     8.5  public class DataSQL {
     8.6  
     8.7 -    private static Logger log = Logger.getLogger(DataSQL.class.getName());
     8.8 +    private static final Logger log = Logger.getLogger(DataSQL.class.getName());
     8.9      private Connection spojeni;
    8.10  
    8.11      public DataSQL(Connection spojeni) {
     9.1 --- a/java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.java	Tue Nov 29 17:16:11 2011 +0100
     9.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.java	Tue Nov 29 17:16:47 2011 +0100
     9.3 @@ -44,255 +44,255 @@
     9.4   */
     9.5  public class SuperPostak extends javax.swing.JFrame {
     9.6  
     9.7 -    /** Soubor, kde je uložené nastavení */
     9.8 -    private static final String NASTAVENI_SOUBOR = "Nastaveni.xml.gz";
     9.9 -    private static final String CERTIFIKATY_SOUBOR = "DuveryhodneCertifikaty.keystore";
    9.10 -    private static final String NASTAVENI_SLOZKA = ".SuperPostak";
    9.11 -    private static final String DOMACI_ADRESAR = System.getProperty("user.home");
    9.12 -    private static final Logger log = Logger.getLogger(SuperPostak.class.getName());
    9.13 -    private static final long serialVersionUID = -7026850569575604048L;
    9.14 -    private Nastaveni nastaveni = new Nastaveni();
    9.15 -    private Postak postak = new Postak(nastaveni);
    9.16 +	/** Soubor, kde je uložené nastavení */
    9.17 +	private static final String NASTAVENI_SOUBOR = "Nastaveni.xml.gz";
    9.18 +	private static final String CERTIFIKATY_SOUBOR = "DuveryhodneCertifikaty.keystore";
    9.19 +	private static final String NASTAVENI_SLOZKA = ".SuperPostak";
    9.20 +	private static final String DOMACI_ADRESAR = System.getProperty("user.home");
    9.21 +	private static final Logger log = Logger.getLogger(SuperPostak.class.getName());
    9.22 +	private static final long serialVersionUID = -7026850569575604048L;
    9.23 +	private Nastaveni nastaveni = new Nastaveni();
    9.24 +	private Postak postak = new Postak(nastaveni);
    9.25  
    9.26 -    /**
    9.27 -     * Creates new form SuperPostak
    9.28 -     * @param ladit předvyplní testovací hodnoty - zprávu
    9.29 -     * @param exit při zavření okna ukončí program     
    9.30 -     */
    9.31 -    public SuperPostak(boolean ladit, boolean exit) {
    9.32 -        log.log(Level.WARNING, "Program byl spuštěn.");
    9.33 -        nactiOvladaceJDBC();
    9.34 -        vytvorSlozkuProgramu();
    9.35 -        initComponents();
    9.36 +	/**
    9.37 +	 * Creates new form SuperPostak
    9.38 +	 * @param ladit předvyplní testovací hodnoty - zprávu
    9.39 +	 * @param exit při zavření okna ukončí program
    9.40 +	 */
    9.41 +	public SuperPostak(boolean ladit, boolean exit) {
    9.42 +		log.log(Level.WARNING, "Program byl spuštěn.");
    9.43 +		nactiOvladaceJDBC();
    9.44 +		vytvorSlozkuProgramu();
    9.45 +		initComponents();
    9.46  
    9.47 -        nactiNastaveni();
    9.48 -        ulozNastaveni();
    9.49 -        nastaveni.setCestaKCertifikatum(getCestaKCertifikatum());
    9.50 +		nactiNastaveni();
    9.51 +		ulozNastaveni();
    9.52 +		nastaveni.setCestaKCertifikatum(getCestaKCertifikatum());
    9.53  
    9.54 -        inicializujCardLayout();
    9.55 -        setLocationRelativeTo(null);
    9.56 +		inicializujCardLayout();
    9.57 +		setLocationRelativeTo(null);
    9.58  
    9.59  		/** Kvůli souborovým dialogům – aby se otvírali ve stejné složce jako minule. */
    9.60  		prijemciDodatecni.setNastaveni(nastaveni);
    9.61  		prijemciVychozi.setNastaveni(nastaveni);
    9.62  		prijemciZkusebni.setNastaveni(nastaveni);
    9.63  
    9.64 -        /** Vyřešíme problém TAB vs. Focus */
    9.65 -        vyresitTabFocusProblem(vstupSQL);
    9.66 -        vyresitTabFocusProblem(vstupZprava);
    9.67 +		/** Vyřešíme problém TAB vs. Focus */
    9.68 +		vyresitTabFocusProblem(vstupSQL);
    9.69 +		vyresitTabFocusProblem(vstupZprava);
    9.70  
    9.71 -        /** Ladicí hodnoty */
    9.72 -        if (ladit) {
    9.73 -            nastavLadiciHodnoty();
    9.74 -        }
    9.75 +		/** Ladicí hodnoty */
    9.76 +		if (ladit) {
    9.77 +			nastavLadiciHodnoty();
    9.78 +		}
    9.79  
    9.80 -        if (exit) {
    9.81 -            setDefaultCloseOperation(EXIT_ON_CLOSE);
    9.82 -        }
    9.83 +		if (exit) {
    9.84 +			setDefaultCloseOperation(EXIT_ON_CLOSE);
    9.85 +		}
    9.86  
    9.87  
    9.88 -    }
    9.89 +	}
    9.90  
    9.91 -    private void inicializujCardLayout() {
    9.92 -        panelDatabaze.setName("panelDatabaze");
    9.93 -        panelOdeslat.setName("panelOdeslat");
    9.94 -        panelPrijemci.setName("panelPrijemci");
    9.95 -        panelServer.setName("panelServer");
    9.96 -        panelVychoziPrijemci.setName("panelVychoziPrijemci");
    9.97 -        panelZprava.setName("panelZprava");
    9.98 +	private void inicializujCardLayout() {
    9.99 +		panelDatabaze.setName("panelDatabaze");
   9.100 +		panelOdeslat.setName("panelOdeslat");
   9.101 +		panelPrijemci.setName("panelPrijemci");
   9.102 +		panelServer.setName("panelServer");
   9.103 +		panelVychoziPrijemci.setName("panelVychoziPrijemci");
   9.104 +		panelZprava.setName("panelZprava");
   9.105  
   9.106 -        panel.add(panelDatabaze, panelDatabaze.getName());
   9.107 -        panel.add(panelOdeslat, panelOdeslat.getName());
   9.108 -        panel.add(panelPrijemci, panelPrijemci.getName());
   9.109 -        panel.add(panelServer, panelServer.getName());
   9.110 -        panel.add(panelVychoziPrijemci, panelVychoziPrijemci.getName());
   9.111 -        panel.add(panelZprava, panelZprava.getName());
   9.112 +		panel.add(panelDatabaze, panelDatabaze.getName());
   9.113 +		panel.add(panelOdeslat, panelOdeslat.getName());
   9.114 +		panel.add(panelPrijemci, panelPrijemci.getName());
   9.115 +		panel.add(panelServer, panelServer.getName());
   9.116 +		panel.add(panelVychoziPrijemci, panelVychoziPrijemci.getName());
   9.117 +		panel.add(panelZprava, panelZprava.getName());
   9.118  
   9.119 -        setPanel(panelZprava);
   9.120 -        pack();
   9.121 -    }
   9.122 +		setPanel(panelZprava);
   9.123 +		pack();
   9.124 +	}
   9.125  
   9.126 -    /**
   9.127 -     * Vyplní formuláře (odesílatel, předmět, zpráva, příjemci...) výchozími hodnotami,
   9.128 -     * aby se dal program testovat jedním kliknutím.
   9.129 -     */
   9.130 -    private void nastavLadiciHodnoty() {
   9.131 -        try {
   9.132 -            vstupAdresaOdesilatele.setText("SuperPostak@frantovo.cz");
   9.133 -            vstupJmenoOdesilatele.setText("SuperPošťák");
   9.134 -            vstupPredmet.setText("Zkušební zpráva od SuperPošťáka");
   9.135 -            vstupZprava.setText("Toto je obyčejná zkušební zpráva v češtině :-)");
   9.136 -            ArrayList<InternetAddressKomu> adresy = new ArrayList<InternetAddressKomu>();
   9.137 -            adresy.add(new InternetAddressKomu("SuperPostak@frantovo.cz", "SuperPošťák"));
   9.138 -            prijemciZkusebni.setAdresy(adresy);
   9.139 -        } catch (UnsupportedEncodingException e) {
   9.140 -            log.log(Level.SEVERE, null, e);
   9.141 -        }
   9.142 -    }
   9.143 +	/**
   9.144 +	 * Vyplní formuláře (odesílatel, předmět, zpráva, příjemci...) výchozími hodnotami,
   9.145 +	 * aby se dal program testovat jedním kliknutím.
   9.146 +	 */
   9.147 +	private void nastavLadiciHodnoty() {
   9.148 +		try {
   9.149 +			vstupAdresaOdesilatele.setText("SuperPostak@frantovo.cz");
   9.150 +			vstupJmenoOdesilatele.setText("SuperPošťák");
   9.151 +			vstupPredmet.setText("Zkušební zpráva od SuperPošťáka");
   9.152 +			vstupZprava.setText("Toto je obyčejná zkušební zpráva v češtině :-)");
   9.153 +			ArrayList<InternetAddressKomu> adresy = new ArrayList<InternetAddressKomu>();
   9.154 +			adresy.add(new InternetAddressKomu("SuperPostak@frantovo.cz", "SuperPošťák"));
   9.155 +			prijemciZkusebni.setAdresy(adresy);
   9.156 +		} catch (UnsupportedEncodingException e) {
   9.157 +			log.log(Level.SEVERE, null, e);
   9.158 +		}
   9.159 +	}
   9.160  
   9.161 -    /**
   9.162 -     * Pokusíme se načíst ovladače pro různé DB a výsledek zapíšeme do logu.
   9.163 -     * Další ovladače je možné přidat pomocí manifestu v příslušných knihovnách.
   9.164 -     * viz http://www.sweb.cz/pichlik/archive/2006_08_06_archive.html#115502885631518161
   9.165 -     */
   9.166 -    private void nactiOvladaceJDBC() {
   9.167 -        nactiOvladacJDBC("org.postgresql.Driver", "PostgreSQL");
   9.168 -        nactiOvladacJDBC("com.mysql.jdbc.Driver", "MySQL");
   9.169 -        nactiOvladacJDBC("net.sourceforge.jtds.jdbc.Driver", "jTDS Sybase a MS SQL");
   9.170 -        nactiOvladacJDBC("com.sybase.jdbc2.jdbc.SybDriver", "Sybase.com");
   9.171 -        nactiOvladacJDBC("oracle.jdbc.OracleDriver", "Oracle");
   9.172 -    }
   9.173 +	/**
   9.174 +	 * Pokusíme se načíst ovladače pro různé DB a výsledek zapíšeme do logu.
   9.175 +	 * Další ovladače je možné přidat pomocí manifestu v příslušných knihovnách.
   9.176 +	 * viz http://www.sweb.cz/pichlik/archive/2006_08_06_archive.html#115502885631518161
   9.177 +	 */
   9.178 +	private void nactiOvladaceJDBC() {
   9.179 +		nactiOvladacJDBC("org.postgresql.Driver", "PostgreSQL");
   9.180 +		nactiOvladacJDBC("com.mysql.jdbc.Driver", "MySQL");
   9.181 +		nactiOvladacJDBC("net.sourceforge.jtds.jdbc.Driver", "jTDS Sybase a MS SQL");
   9.182 +		nactiOvladacJDBC("com.sybase.jdbc2.jdbc.SybDriver", "Sybase.com");
   9.183 +		nactiOvladacJDBC("oracle.jdbc.OracleDriver", "Oracle");
   9.184 +	}
   9.185  
   9.186 -    /**
   9.187 -     * @param trida ovladač databáze, který se má načíst
   9.188 -     * @param jmeno název databáze     
   9.189 -     */
   9.190 -    private void nactiOvladacJDBC(String trida, String jmeno) {
   9.191 -        try {
   9.192 -            Class.forName(trida);
   9.193 -            log.log(Level.INFO, "JDBC ovladač pro " + jmeno + " byl úspěšně načten.");
   9.194 -        } catch (ClassNotFoundException e) {
   9.195 -            log.log(Level.INFO, "JDBC ovladač pro " + jmeno + " se nepodařilo načíst.");
   9.196 -        }
   9.197 -    }
   9.198 +	/**
   9.199 +	 * @param trida ovladač databáze, který se má načíst
   9.200 +	 * @param jmeno název databáze
   9.201 +	 */
   9.202 +	private void nactiOvladacJDBC(String trida, String jmeno) {
   9.203 +		try {
   9.204 +			Class.forName(trida);
   9.205 +			log.log(Level.INFO, "JDBC ovladač pro {0} byl úspěšně načten.", jmeno);
   9.206 +		} catch (ClassNotFoundException e) {
   9.207 +			log.log(Level.INFO, "JDBC ovladač pro {0} se nepodařilo načíst.", jmeno);
   9.208 +		}
   9.209 +	}
   9.210  
   9.211 -    /** Vrací plnou cestu k souboru s nastavením */
   9.212 -    protected static String getCestaKCertifikatum() {
   9.213 -        return getCestaKeSlozceProgramu() + CERTIFIKATY_SOUBOR;
   9.214 -    }
   9.215 +	/** Vrací plnou cestu k souboru s nastavením */
   9.216 +	protected static String getCestaKCertifikatum() {
   9.217 +		return getCestaKeSlozceProgramu() + CERTIFIKATY_SOUBOR;
   9.218 +	}
   9.219  
   9.220 -    /** Vrací plnou cestu k souboru s nastavením */
   9.221 -    protected static String getCestaKNastaveni() {
   9.222 -        return getCestaKeSlozceProgramu() + NASTAVENI_SOUBOR;
   9.223 -    }
   9.224 +	/** Vrací plnou cestu k souboru s nastavením */
   9.225 +	protected static String getCestaKNastaveni() {
   9.226 +		return getCestaKeSlozceProgramu() + NASTAVENI_SOUBOR;
   9.227 +	}
   9.228  
   9.229 -    /** Vrací plnou cestu ke složce programu (nastavení, certifikáty a logy) */
   9.230 -    protected static String getCestaKeSlozceProgramu() {
   9.231 -        return DOMACI_ADRESAR + File.separator + NASTAVENI_SLOZKA + File.separator;
   9.232 -    }
   9.233 +	/** Vrací plnou cestu ke složce programu (nastavení, certifikáty a logy) */
   9.234 +	protected static String getCestaKeSlozceProgramu() {
   9.235 +		return DOMACI_ADRESAR + File.separator + NASTAVENI_SLOZKA + File.separator;
   9.236 +	}
   9.237  
   9.238 -    /** Načte nastavení ze souboru */
   9.239 -    private void nactiNastaveni() {
   9.240 -        try {
   9.241 -            XMLDecoder d = new XMLDecoder(new BufferedInputStream(new GZIPInputStream(new FileInputStream(getCestaKNastaveni()))));
   9.242 -            Object xmlObjekt = d.readObject();
   9.243 -            d.close();
   9.244 +	/** Načte nastavení ze souboru */
   9.245 +	private void nactiNastaveni() {
   9.246 +		try {
   9.247 +			XMLDecoder d = new XMLDecoder(new BufferedInputStream(new GZIPInputStream(new FileInputStream(getCestaKNastaveni()))));
   9.248 +			Object xmlObjekt = d.readObject();
   9.249 +			d.close();
   9.250  
   9.251 -            if (xmlObjekt instanceof Nastaveni) {
   9.252 -                nastaveni = (Nastaveni) xmlObjekt;
   9.253 -            } else {
   9.254 -                nastaveni = new Nastaveni();
   9.255 -                log.log(Level.SEVERE, "Nepodařilo se načíst nastavení: není instancí");
   9.256 -            }
   9.257 +			if (xmlObjekt instanceof Nastaveni) {
   9.258 +				nastaveni = (Nastaveni) xmlObjekt;
   9.259 +			} else {
   9.260 +				nastaveni = new Nastaveni();
   9.261 +				log.log(Level.SEVERE, "Nepodařilo se načíst nastavení: není instancí");
   9.262 +			}
   9.263  
   9.264 -            nactiNastaveniGUI();
   9.265 +			nactiNastaveniGUI();
   9.266  
   9.267 -            log.log(Level.INFO, "Nastavení bylo načteno.");
   9.268 -        } catch (FileNotFoundException ex) {
   9.269 -            log.log(Level.SEVERE, "Nepodařilo se načíst nastavení: soubor nenalezen", ex);
   9.270 -        } catch (IOException ex) {
   9.271 -            log.log(Level.SEVERE, "Nastavení se nepodařilo načíst: I/O.", ex);
   9.272 -        }
   9.273 -    }
   9.274 +			log.log(Level.INFO, "Nastavení bylo načteno.");
   9.275 +		} catch (FileNotFoundException ex) {
   9.276 +			log.log(Level.SEVERE, "Nepodařilo se načíst nastavení: soubor nenalezen", ex);
   9.277 +		} catch (IOException ex) {
   9.278 +			log.log(Level.SEVERE, "Nastavení se nepodařilo načíst: I/O.", ex);
   9.279 +		}
   9.280 +	}
   9.281  
   9.282 -    /** Vytvoří (pokud neexistuje) v domovském adresáři složku, kam se ukládá nastavení a případně logy */
   9.283 -    private static boolean vytvorSlozkuProgramu() {
   9.284 -        if (new File(getCestaKeSlozceProgramu()).mkdirs()) {
   9.285 -            log.log(Level.INFO, "Složka pro nastavení programu byla vytvořena: " + getCestaKeSlozceProgramu());
   9.286 -            return true;
   9.287 -        } else {
   9.288 -            return false;
   9.289 -        }
   9.290 -    }
   9.291 +	/** Vytvoří (pokud neexistuje) v domovském adresáři složku, kam se ukládá nastavení a případně logy */
   9.292 +	private static boolean vytvorSlozkuProgramu() {
   9.293 +		if (new File(getCestaKeSlozceProgramu()).mkdirs()) {
   9.294 +			log.log(Level.INFO, "Složka pro nastavení programu byla vytvořena: {0}", getCestaKeSlozceProgramu());
   9.295 +			return true;
   9.296 +		} else {
   9.297 +			return false;
   9.298 +		}
   9.299 +	}
   9.300  
   9.301 -    /** Uloží nastavení do souboru */
   9.302 -    private void ulozNastaveni() {
   9.303 -        try {
   9.304 -            ulozNastaveniGUI();
   9.305 +	/** Uloží nastavení do souboru */
   9.306 +	private void ulozNastaveni() {
   9.307 +		try {
   9.308 +			ulozNastaveniGUI();
   9.309  
   9.310 -            vytvorSlozkuProgramu();
   9.311 +			vytvorSlozkuProgramu();
   9.312  
   9.313 -            XMLEncoder e = new XMLEncoder(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(getCestaKNastaveni()))));
   9.314 -            e.writeObject(nastaveni);
   9.315 -            e.close();
   9.316 -            log.log(Level.INFO, "Nastavení bylo uloženo.");
   9.317 -        } catch (FileNotFoundException ex) {
   9.318 -            log.log(Level.SEVERE, "Nastavení se nepodařilo uložit: soubor nenalezen.", ex);
   9.319 -        } catch (IOException ex) {
   9.320 -            log.log(Level.SEVERE, "Nastavení se nepodařilo uložit: I/O.", ex);
   9.321 -        }
   9.322 -    }
   9.323 +			XMLEncoder e = new XMLEncoder(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(getCestaKNastaveni()))));
   9.324 +			e.writeObject(nastaveni);
   9.325 +			e.close();
   9.326 +			log.log(Level.INFO, "Nastavení bylo uloženo.");
   9.327 +		} catch (FileNotFoundException ex) {
   9.328 +			log.log(Level.SEVERE, "Nastavení se nepodařilo uložit: soubor nenalezen.", ex);
   9.329 +		} catch (IOException ex) {
   9.330 +			log.log(Level.SEVERE, "Nastavení se nepodařilo uložit: I/O.", ex);
   9.331 +		}
   9.332 +	}
   9.333  
   9.334 -    /** Posbírá zadané hodnoty z GUI a uloží je do objektu nastaveni */
   9.335 -    private void ulozNastaveniGUI() {
   9.336 -        nastaveni.setDatabaze(vstupDatabaze.getText());
   9.337 -        nastaveni.setDbHeslo(vstupDBheslo.getPassword());
   9.338 -        nastaveni.setDbJmeno(vstupDBjmeno.getText());
   9.339 -        nastaveni.setLimitZprav((Integer) vstupSMTPlimitPrijemcu.getValue());
   9.340 -        nastaveni.setPostovniHeslo(vstupSMTPheslo.getPassword());
   9.341 -        nastaveni.setPostovniJmeno(vstupSMTPjmeno.getText());
   9.342 -        nastaveni.setPostovniPort((Integer) vstupSMTPport.getValue());
   9.343 -        nastaveni.setPostovniServer(vstupSMTPserver.getText());
   9.344 -        nastaveni.setVychoziPrijemci(prijemciVychozi.getAdresy());
   9.345 -    }
   9.346 +	/** Posbírá zadané hodnoty z GUI a uloží je do objektu nastaveni */
   9.347 +	private void ulozNastaveniGUI() {
   9.348 +		nastaveni.setDatabaze(vstupDatabaze.getText());
   9.349 +		nastaveni.setDbHeslo(vstupDBheslo.getPassword());
   9.350 +		nastaveni.setDbJmeno(vstupDBjmeno.getText());
   9.351 +		nastaveni.setLimitZprav((Integer) vstupSMTPlimitPrijemcu.getValue());
   9.352 +		nastaveni.setPostovniHeslo(vstupSMTPheslo.getPassword());
   9.353 +		nastaveni.setPostovniJmeno(vstupSMTPjmeno.getText());
   9.354 +		nastaveni.setPostovniPort((Integer) vstupSMTPport.getValue());
   9.355 +		nastaveni.setPostovniServer(vstupSMTPserver.getText());
   9.356 +		nastaveni.setVychoziPrijemci(prijemciVychozi.getAdresy());
   9.357 +	}
   9.358  
   9.359 -    /** Aktualizuje GUI formuláře hodnotami z objektu nastaveni */
   9.360 -    private void nactiNastaveniGUI() {
   9.361 -        vstupDatabaze.setText(nastaveni.getDatabaze());
   9.362 -        if (nastaveni.getDbHeslo() != null) {
   9.363 -            vstupDBheslo.setText(String.valueOf(nastaveni.getDbHeslo()));
   9.364 -        }
   9.365 -        vstupDBjmeno.setText(nastaveni.getDbJmeno());
   9.366 -        vstupSMTPlimitPrijemcu.setValue(nastaveni.getLimitZprav());
   9.367 -        if (nastaveni.getPostovniHeslo() != null) {
   9.368 -            vstupSMTPheslo.setText(String.valueOf(nastaveni.getPostovniHeslo()));
   9.369 -        }
   9.370 -        vstupSMTPjmeno.setText(nastaveni.getPostovniJmeno());
   9.371 -        vstupSMTPport.setValue(nastaveni.getPostovniPort());
   9.372 -        vstupSMTPserver.setText(nastaveni.getPostovniServer());
   9.373 -        prijemciVychozi.setAdresy(nastaveni.getVychoziPrijemci());
   9.374 -    }
   9.375 +	/** Aktualizuje GUI formuláře hodnotami z objektu nastaveni */
   9.376 +	private void nactiNastaveniGUI() {
   9.377 +		vstupDatabaze.setText(nastaveni.getDatabaze());
   9.378 +		if (nastaveni.getDbHeslo() != null) {
   9.379 +			vstupDBheslo.setText(String.valueOf(nastaveni.getDbHeslo()));
   9.380 +		}
   9.381 +		vstupDBjmeno.setText(nastaveni.getDbJmeno());
   9.382 +		vstupSMTPlimitPrijemcu.setValue(nastaveni.getLimitZprav());
   9.383 +		if (nastaveni.getPostovniHeslo() != null) {
   9.384 +			vstupSMTPheslo.setText(String.valueOf(nastaveni.getPostovniHeslo()));
   9.385 +		}
   9.386 +		vstupSMTPjmeno.setText(nastaveni.getPostovniJmeno());
   9.387 +		vstupSMTPport.setValue(nastaveni.getPostovniPort());
   9.388 +		vstupSMTPserver.setText(nastaveni.getPostovniServer());
   9.389 +		prijemciVychozi.setAdresy(nastaveni.getVychoziPrijemci());
   9.390 +	}
   9.391  
   9.392 -    protected static void zobrazChybovyDialog(Component vlastnik, String strucnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.393 -        zobrazChybovyDialog(vlastnik, "Chyba", strucnaZprava, null, vyjimka, zavaznost, logovat);
   9.394 -    }
   9.395 +	protected static void zobrazChybovyDialog(Component vlastnik, String strucnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.396 +		zobrazChybovyDialog(vlastnik, "Chyba", strucnaZprava, null, vyjimka, zavaznost, logovat);
   9.397 +	}
   9.398  
   9.399 -    protected static void zobrazInformacniDialog(Component vlastnik, String nadpis, String text, boolean loguj) {
   9.400 -        JOptionPane.showMessageDialog(vlastnik, text, nadpis, JOptionPane.INFORMATION_MESSAGE);
   9.401 -        if (loguj) {
   9.402 -            log.log(Level.INFO, nadpis + ": " + text);
   9.403 -        }
   9.404 -    }
   9.405 +	protected static void zobrazInformacniDialog(Component vlastnik, String nadpis, String text, boolean loguj) {
   9.406 +		JOptionPane.showMessageDialog(vlastnik, text, nadpis, JOptionPane.INFORMATION_MESSAGE);
   9.407 +		if (loguj) {
   9.408 +			log.log(Level.INFO, "{0}: {1}", new Object[]{nadpis, text});
   9.409 +		}
   9.410 +	}
   9.411  
   9.412 -    protected static void zobrazChybovyDialog(Component vlastnik, String nadpis, String strucnaZprava, String podrobnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.413 -        if (logovat) {
   9.414 -            log.log(zavaznost, strucnaZprava, vyjimka);
   9.415 -        }
   9.416 +	protected static void zobrazChybovyDialog(Component vlastnik, String nadpis, String strucnaZprava, String podrobnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.417 +		if (logovat) {
   9.418 +			log.log(zavaznost, strucnaZprava, vyjimka);
   9.419 +		}
   9.420  
   9.421 -        JXErrorPane chybovyPanel = new JXErrorPane();
   9.422 -        ErrorInfo chybovaInformace = new ErrorInfo(nadpis, strucnaZprava, podrobnaZprava, null, vyjimka, zavaznost, null);
   9.423 -        chybovyPanel.setErrorInfo(chybovaInformace);
   9.424 -        JDialog dialog = JXErrorPane.createDialog(vlastnik, chybovyPanel);
   9.425 -        dialog.setVisible(true);
   9.426 -    }
   9.427 +		JXErrorPane chybovyPanel = new JXErrorPane();
   9.428 +		ErrorInfo chybovaInformace = new ErrorInfo(nadpis, strucnaZprava, podrobnaZprava, null, vyjimka, zavaznost, null);
   9.429 +		chybovyPanel.setErrorInfo(chybovaInformace);
   9.430 +		JDialog dialog = JXErrorPane.createDialog(vlastnik, chybovyPanel);
   9.431 +		dialog.setVisible(true);
   9.432 +	}
   9.433  
   9.434 -    private void zobrazChybovyDialog(String strucnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.435 -        zobrazChybovyDialog(this, strucnaZprava, vyjimka, zavaznost, logovat);
   9.436 -    }
   9.437 +	private void zobrazChybovyDialog(String strucnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.438 +		zobrazChybovyDialog(this, strucnaZprava, vyjimka, zavaznost, logovat);
   9.439 +	}
   9.440  
   9.441 -    private void zobrazInformacniDialog(String nadpis, String text, boolean loguj) {
   9.442 -        zobrazInformacniDialog(this, nadpis, text, loguj);
   9.443 -    }
   9.444 +	private void zobrazInformacniDialog(String nadpis, String text, boolean loguj) {
   9.445 +		zobrazInformacniDialog(this, nadpis, text, loguj);
   9.446 +	}
   9.447  
   9.448 -    private void zobrazChybovyDialog(String nadpis, String strucnaZprava, String podrobnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.449 -        zobrazChybovyDialog(this, nadpis, strucnaZprava, podrobnaZprava, vyjimka, zavaznost, logovat);
   9.450 -    }
   9.451 +	private void zobrazChybovyDialog(String nadpis, String strucnaZprava, String podrobnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
   9.452 +		zobrazChybovyDialog(this, nadpis, strucnaZprava, podrobnaZprava, vyjimka, zavaznost, logovat);
   9.453 +	}
   9.454  
   9.455 -    /** This method is called from within the constructor to
   9.456 -     * initialize the form.
   9.457 -     * WARNING: Do NOT modify this code. The content of this method is
   9.458 -     * always regenerated by the Form Editor.
   9.459 -     */
   9.460 +	/** This method is called from within the constructor to
   9.461 +	 * initialize the form.
   9.462 +	 * WARNING: Do NOT modify this code. The content of this method is
   9.463 +	 * always regenerated by the Form Editor.
   9.464 +	 */
   9.465      // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
   9.466      private void initComponents() {
   9.467  
   9.468 @@ -926,249 +926,249 @@
   9.469  }//GEN-LAST:event_vstupPredmetActionPerformed
   9.470  
   9.471      private void lnTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnTextActionPerformed
   9.472 -        setPanel(panelZprava);
   9.473 +		setPanel(panelZprava);
   9.474      }//GEN-LAST:event_lnTextActionPerformed
   9.475  
   9.476      private void lnPrijemciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnPrijemciActionPerformed
   9.477 -        setPanel(panelPrijemci);
   9.478 +		setPanel(panelPrijemci);
   9.479      }//GEN-LAST:event_lnPrijemciActionPerformed
   9.480  
   9.481      private void lnOdeslatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnOdeslatActionPerformed
   9.482 -        setPanel(panelOdeslat);
   9.483 +		setPanel(panelOdeslat);
   9.484      }//GEN-LAST:event_lnOdeslatActionPerformed
   9.485  
   9.486      private void lnServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnServerActionPerformed
   9.487 -        setPanel(panelServer);
   9.488 +		setPanel(panelServer);
   9.489      }//GEN-LAST:event_lnServerActionPerformed
   9.490  
   9.491      private void lnDatabazeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnDatabazeActionPerformed
   9.492 -        setPanel(panelDatabaze);
   9.493 +		setPanel(panelDatabaze);
   9.494      }//GEN-LAST:event_lnDatabazeActionPerformed
   9.495  
   9.496      private void lnVychoziPrijemciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnVychoziPrijemciActionPerformed
   9.497 -        setPanel(panelVychoziPrijemci);
   9.498 +		setPanel(panelVychoziPrijemci);
   9.499      }//GEN-LAST:event_lnVychoziPrijemciActionPerformed
   9.500  
   9.501      private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
   9.502 -        ulozNastaveni();
   9.503 -        log.log(Level.WARNING, "Ukončuji program.");
   9.504 +		ulozNastaveni();
   9.505 +		log.log(Level.WARNING, "Ukončuji program.");
   9.506      }//GEN-LAST:event_formWindowClosing
   9.507  
   9.508 -    /**
   9.509 -     * Sestaví zprávu na základě GUI vstupů. Všechno kromě příjemců,
   9.510 -     * ti se přidají až dodatečně, podle toho,
   9.511 -     * jestli jde o zkušební nebo skutečné rozesílání.
   9.512 -     */
   9.513 -    private HromadnaZprava getZprava() throws UnsupportedEncodingException {
   9.514 -        HromadnaZprava zprava = new HromadnaZprava();
   9.515 -        zprava.setOdesilatel(new InternetAddress(vstupAdresaOdesilatele.getText(), vstupJmenoOdesilatele.getText()));
   9.516 -        zprava.setPredmet(vstupPredmet.getText());
   9.517 -        zprava.setText(vstupZprava.getText());
   9.518 -        zprava.setFormatHTML(vstupFormatHTML.isSelected());
   9.519 +	/**
   9.520 +	 * Sestaví zprávu na základě GUI vstupů. Všechno kromě příjemců,
   9.521 +	 * ti se přidají až dodatečně, podle toho,
   9.522 +	 * jestli jde o zkušební nebo skutečné rozesílání.
   9.523 +	 */
   9.524 +	private HromadnaZprava getZprava() throws UnsupportedEncodingException {
   9.525 +		HromadnaZprava zprava = new HromadnaZprava();
   9.526 +		zprava.setOdesilatel(new InternetAddress(vstupAdresaOdesilatele.getText(), vstupJmenoOdesilatele.getText()));
   9.527 +		zprava.setPredmet(vstupPredmet.getText());
   9.528 +		zprava.setText(vstupZprava.getText());
   9.529 +		zprava.setFormatHTML(vstupFormatHTML.isSelected());
   9.530  
   9.531 -        if (Postak.zkontrolujAdresu(odpovedetKomuAdresa.getText())) {
   9.532 -            InternetAddress komu = new InternetAddress();
   9.533 -            komu.setPersonal(odpovedetKomuJmeno.getText());
   9.534 -            komu.setAddress(odpovedetKomuAdresa.getText());
   9.535 -            zprava.setOdpovedetKomu(komu);
   9.536 -        }
   9.537 +		if (Postak.zkontrolujAdresu(odpovedetKomuAdresa.getText())) {
   9.538 +			InternetAddress komu = new InternetAddress();
   9.539 +			komu.setPersonal(odpovedetKomuJmeno.getText());
   9.540 +			komu.setAddress(odpovedetKomuAdresa.getText());
   9.541 +			zprava.setOdpovedetKomu(komu);
   9.542 +		}
   9.543  
   9.544 -        return zprava;
   9.545 -    }
   9.546 +		return zprava;
   9.547 +	}
   9.548  
   9.549 -    /** Všichni příjemci, kterým bude odeslána ostrá zpráva. */
   9.550 -    private ArrayList<InternetAddressKomu> getPrijemciVsichni() throws SQLException, UnsupportedEncodingException {
   9.551 -        ArrayList<InternetAddressKomu> vsichni = new ArrayList<InternetAddressKomu>();
   9.552 -        Collection<InternetAddressKomu> adresyVychozi = nastaveni.getVychoziPrijemci();
   9.553 -        Collection<InternetAddressKomu> adresySQL = getPrijemciSQL();
   9.554 -        Collection<InternetAddressKomu> adresyDodatecne = prijemciDodatecni.getAdresy();
   9.555 +	/** Všichni příjemci, kterým bude odeslána ostrá zpráva. */
   9.556 +	private ArrayList<InternetAddressKomu> getPrijemciVsichni() throws SQLException, UnsupportedEncodingException {
   9.557 +		ArrayList<InternetAddressKomu> vsichni = new ArrayList<InternetAddressKomu>();
   9.558 +		Collection<InternetAddressKomu> adresyVychozi = nastaveni.getVychoziPrijemci();
   9.559 +		Collection<InternetAddressKomu> adresySQL = getPrijemciSQL();
   9.560 +		Collection<InternetAddressKomu> adresyDodatecne = prijemciDodatecni.getAdresy();
   9.561  
   9.562 -        if (adresyVychozi != null) {
   9.563 -            vsichni.addAll(adresyVychozi);
   9.564 -        }
   9.565 -        if (adresySQL != null) {
   9.566 -            vsichni.addAll(adresySQL);
   9.567 -        }
   9.568 -        if (adresyDodatecne != null) {
   9.569 -            vsichni.addAll(adresyDodatecne);
   9.570 -        }
   9.571 -        return vsichni;
   9.572 -    }
   9.573 +		if (adresyVychozi != null) {
   9.574 +			vsichni.addAll(adresyVychozi);
   9.575 +		}
   9.576 +		if (adresySQL != null) {
   9.577 +			vsichni.addAll(adresySQL);
   9.578 +		}
   9.579 +		if (adresyDodatecne != null) {
   9.580 +			vsichni.addAll(adresyDodatecne);
   9.581 +		}
   9.582 +		return vsichni;
   9.583 +	}
   9.584  
   9.585      private void rozeslatHromadnouZpravuTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rozeslatHromadnouZpravuTlacitkoActionPerformed
   9.586 -        try {
   9.587 -            ulozNastaveniGUI();
   9.588 -            HromadnaZprava zprava = getZprava();
   9.589 -            zprava.setPrijemci(getPrijemciVsichni());
   9.590 +		try {
   9.591 +			ulozNastaveniGUI();
   9.592 +			HromadnaZprava zprava = getZprava();
   9.593 +			zprava.setPrijemci(getPrijemciVsichni());
   9.594  
   9.595 -            int volba = JOptionPane.showOptionDialog(this, "Počet příjemců hromadné zprávy: " + zprava.getPrijemci().size() + "\nPřejete si zprávu odeslat?", "Potvrdit odeslání", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);
   9.596 -            if (volba == JOptionPane.YES_OPTION) {
   9.597 -                odesli(zprava);
   9.598 -                Postak.vypisPrijemce(zprava.getPrijemci());
   9.599 -                zobrazInformacniDialog("Odesláno", "Zpráva byla odeslána.\nPočet příjemců: " + zprava.getPrijemci().size(), true);
   9.600 -            }
   9.601 -        } catch (Exception e) {
   9.602 -            zobrazChybovyDialog("Zprávu se nepodařilo odeslat", e, Level.SEVERE, true);
   9.603 -        }
   9.604 +			int volba = JOptionPane.showOptionDialog(this, "Počet příjemců hromadné zprávy: " + zprava.getPrijemci().size() + "\nPřejete si zprávu odeslat?", "Potvrdit odeslání", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);
   9.605 +			if (volba == JOptionPane.YES_OPTION) {
   9.606 +				odesli(zprava);
   9.607 +				Postak.vypisPrijemce(zprava.getPrijemci());
   9.608 +				zobrazInformacniDialog("Odesláno", "Zpráva byla odeslána.\nPočet příjemců: " + zprava.getPrijemci().size(), true);
   9.609 +			}
   9.610 +		} catch (Exception e) {
   9.611 +			zobrazChybovyDialog("Zprávu se nepodařilo odeslat", e, Level.SEVERE, true);
   9.612 +		}
   9.613  }//GEN-LAST:event_rozeslatHromadnouZpravuTlacitkoActionPerformed
   9.614  
   9.615      private void rozeslatZkusebniTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rozeslatZkusebniTlacitkoActionPerformed
   9.616 -        try {
   9.617 -            ulozNastaveniGUI();
   9.618 -            HromadnaZprava zprava = getZprava();
   9.619 -            zprava.setPrijemci(prijemciZkusebni.getAdresy());
   9.620 +		try {
   9.621 +			ulozNastaveniGUI();
   9.622 +			HromadnaZprava zprava = getZprava();
   9.623 +			zprava.setPrijemci(prijemciZkusebni.getAdresy());
   9.624  
   9.625 -            odesli(zprava);
   9.626 +			odesli(zprava);
   9.627  
   9.628 -            zobrazInformacniDialog("Odesláno", "Zkušební zpráva byla odeslána.\nPočet adresátů: " + zprava.getPrijemci().size(), true);
   9.629 -        } catch (Exception e) {
   9.630 -            zobrazChybovyDialog("Zkušební zprávu se nepodařilo odeslat", e, Level.SEVERE, true);
   9.631 -        }
   9.632 +			zobrazInformacniDialog("Odesláno", "Zkušební zpráva byla odeslána.\nPočet adresátů: " + zprava.getPrijemci().size(), true);
   9.633 +		} catch (Exception e) {
   9.634 +			zobrazChybovyDialog("Zkušební zprávu se nepodařilo odeslat", e, Level.SEVERE, true);
   9.635 +		}
   9.636      }//GEN-LAST:event_rozeslatZkusebniTlacitkoActionPerformed
   9.637  
   9.638      private void vyzkousetPripojeniTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vyzkousetPripojeniTlacitkoActionPerformed
   9.639 -        try {
   9.640 +		try {
   9.641              getSpojeni();//GEN-LAST:event_vyzkousetPripojeniTlacitkoActionPerformed
   9.642 -            zobrazInformacniDialog("Připojeno k DB", "Připojení k DB proběhlo úspěšně", false);
   9.643 -        } catch (SQLException e) {
   9.644 -            zobrazChybovyDialog("Spojení s DB", "Připojení k databázi selhalo", null, e, Level.SEVERE, true);
   9.645 -        }
   9.646 -    }
   9.647 +			zobrazInformacniDialog("Připojeno k DB", "Připojení k DB proběhlo úspěšně", false);
   9.648 +		} catch (SQLException e) {
   9.649 +			zobrazChybovyDialog("Spojení s DB", "Připojení k databázi selhalo", null, e, Level.SEVERE, true);
   9.650 +		}
   9.651 +	}
   9.652  
   9.653      private void vyzkousetSQLTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vyzkousetSQLTlacitkoActionPerformed
   9.654 -        try {
   9.655 +		try {
   9.656              Collection<InternetAddressKomu> adresy = getPrijemciSQL();//GEN-LAST:event_vyzkousetSQLTlacitkoActionPerformed
   9.657 -            if (adresy == null) {
   9.658 -                zobrazInformacniDialog("SQL dotaz", "Dotaz do databáze neproběhl.\nSQL dotaz je prázdný.", false);
   9.659 -            } else {
   9.660 -                zobrazInformacniDialog("SQL dotaz", "Dotaz do databáze byl úspěšný.\nPočet získaných záznamů: " + adresy.size(), false);
   9.661 -            }
   9.662 -        } catch (Exception e) {
   9.663 -            zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
   9.664 -        }
   9.665 -    }
   9.666 +			if (adresy == null) {
   9.667 +				zobrazInformacniDialog("SQL dotaz", "Dotaz do databáze neproběhl.\nSQL dotaz je prázdný.", false);
   9.668 +			} else {
   9.669 +				zobrazInformacniDialog("SQL dotaz", "Dotaz do databáze byl úspěšný.\nPočet získaných záznamů: " + adresy.size(), false);
   9.670 +			}
   9.671 +		} catch (Exception e) {
   9.672 +			zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
   9.673 +		}
   9.674 +	}
   9.675  
   9.676      private void zobrazitSQLPrijemceTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zobrazitSQLPrijemceTlacitkoActionPerformed
   9.677 -        try {
   9.678 -            Collection<InternetAddressKomu> adresy = getPrijemciSQL();
   9.679 +		try {
   9.680 +			Collection<InternetAddressKomu> adresy = getPrijemciSQL();
   9.681  
   9.682 -            ZobrazovacAdres zobrazovac = new ZobrazovacAdres(this, false);
   9.683 +			ZobrazovacAdres zobrazovac = new ZobrazovacAdres(this, false);
   9.684  			zobrazovac.setNastaveni(nastaveni);
   9.685 -            zobrazovac.setAdresy(adresy);
   9.686 -            zobrazovac.setLocationRelativeTo(this);
   9.687 -            zobrazovac.setVisible(true);
   9.688 +			zobrazovac.setAdresy(adresy);
   9.689 +			zobrazovac.setLocationRelativeTo(this);
   9.690 +			zobrazovac.setVisible(true);
   9.691  
   9.692 -        } catch (Exception e) {
   9.693 -            zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
   9.694 -        }
   9.695 +		} catch (Exception e) {
   9.696 +			zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
   9.697 +		}
   9.698      }//GEN-LAST:event_zobrazitSQLPrijemceTlacitkoActionPerformed
   9.699  
   9.700      private void zobrazitVsechnyPrijemceTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zobrazitVsechnyPrijemceTlacitkoActionPerformed
   9.701 -        try {
   9.702 -            Collection<InternetAddressKomu> adresy = getPrijemciVsichni();
   9.703 +		try {
   9.704 +			Collection<InternetAddressKomu> adresy = getPrijemciVsichni();
   9.705  
   9.706 -            ZobrazovacAdres zobrazovac = new ZobrazovacAdres(this, false);
   9.707 -            zobrazovac.setAdresy(adresy);
   9.708 -            zobrazovac.setLocationRelativeTo(this);
   9.709 -            zobrazovac.setVisible(true);
   9.710 +			ZobrazovacAdres zobrazovac = new ZobrazovacAdres(this, false);
   9.711 +			zobrazovac.setAdresy(adresy);
   9.712 +			zobrazovac.setLocationRelativeTo(this);
   9.713 +			zobrazovac.setVisible(true);
   9.714  
   9.715 -        } catch (Exception e) {
   9.716 -            zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
   9.717 -        }
   9.718 +		} catch (Exception e) {
   9.719 +			zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
   9.720 +		}
   9.721      }//GEN-LAST:event_zobrazitVsechnyPrijemceTlacitkoActionPerformed
   9.722  
   9.723      private void odpovedetKomuOdkazActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odpovedetKomuOdkazActionPerformed
   9.724 -        odpovedetKomuDialog.pack();
   9.725 -        odpovedetKomuDialog.setLocationRelativeTo(this);
   9.726 -        odpovedetKomuDialog.setModalityType(ModalityType.APPLICATION_MODAL);
   9.727 -        odpovedetKomuDialog.getRootPane().setDefaultButton(odpovedetKomuHotovo);
   9.728 -        odpovedetKomuDialog.setVisible(true);
   9.729 +		odpovedetKomuDialog.pack();
   9.730 +		odpovedetKomuDialog.setLocationRelativeTo(this);
   9.731 +		odpovedetKomuDialog.setModalityType(ModalityType.APPLICATION_MODAL);
   9.732 +		odpovedetKomuDialog.getRootPane().setDefaultButton(odpovedetKomuHotovo);
   9.733 +		odpovedetKomuDialog.setVisible(true);
   9.734  }//GEN-LAST:event_odpovedetKomuOdkazActionPerformed
   9.735  
   9.736      private void odpovedetKomuHotovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odpovedetKomuHotovoActionPerformed
   9.737 -        odpovedetKomuDialog.setVisible(false);
   9.738 +		odpovedetKomuDialog.setVisible(false);
   9.739  }//GEN-LAST:event_odpovedetKomuHotovoActionPerformed
   9.740  
   9.741 -    /** Provede uživatelem zadaný SQL dotaz a vrátí získané příjemce */
   9.742 -    private Collection<InternetAddressKomu> getPrijemciSQL() throws SQLException, UnsupportedEncodingException {
   9.743 -        if ("".equals(vstupSQL.getText())) {
   9.744 -            return null;
   9.745 -        } else {
   9.746 -            return getSpojeni().getAdresy(vstupSQL.getText());
   9.747 -        }
   9.748 -    }
   9.749 +	/** Provede uživatelem zadaný SQL dotaz a vrátí získané příjemce */
   9.750 +	private Collection<InternetAddressKomu> getPrijemciSQL() throws SQLException, UnsupportedEncodingException {
   9.751 +		if ("".equals(vstupSQL.getText())) {
   9.752 +			return null;
   9.753 +		} else {
   9.754 +			return getSpojeni().getAdresy(vstupSQL.getText());
   9.755 +		}
   9.756 +	}
   9.757  
   9.758 -    private DataSQL getSpojeni() throws SQLException {
   9.759 -        return Data.getSpojeniSQL(vstupDatabaze.getText(), vstupDBjmeno.getText(), vstupDBheslo.getPassword());
   9.760 -    }
   9.761 +	private DataSQL getSpojeni() throws SQLException {
   9.762 +		return Data.getSpojeniSQL(vstupDatabaze.getText(), vstupDBjmeno.getText(), vstupDBheslo.getPassword());
   9.763 +	}
   9.764  
   9.765 -    /** Obalovací třída, která v průběhu odesílání zobrazuje kurzor s hodinami. */
   9.766 -    private void odesli(HromadnaZprava zprava) throws MessagingException {
   9.767 -        setCursor(new Cursor(Cursor.WAIT_CURSOR));
   9.768 -        try {
   9.769 -            postak.setNastaveni(nastaveni);
   9.770 -            postak.odesli(zprava);
   9.771 +	/** Obalovací třída, která v průběhu odesílání zobrazuje kurzor s hodinami. */
   9.772 +	private void odesli(HromadnaZprava zprava) throws MessagingException {
   9.773 +		setCursor(new Cursor(Cursor.WAIT_CURSOR));
   9.774 +		try {
   9.775 +			postak.setNastaveni(nastaveni);
   9.776 +			postak.odesli(zprava);
   9.777  
   9.778 -        } catch (MessagingException e) {
   9.779 -            throw e;
   9.780 -        } finally {
   9.781 -            setCursor(Cursor.getDefaultCursor());
   9.782 -        }
   9.783 -    }
   9.784 +		} catch (MessagingException e) {
   9.785 +			throw e;
   9.786 +		} finally {
   9.787 +			setCursor(Cursor.getDefaultCursor());
   9.788 +		}
   9.789 +	}
   9.790  
   9.791 -    private void setPanel(JComponent komponenta) {
   9.792 +	private void setPanel(JComponent komponenta) {
   9.793  
   9.794 -        if (panel.getLayout() instanceof CardLayout) {
   9.795 -            CardLayout l = (CardLayout) panel.getLayout();
   9.796 -            l.show(panel, komponenta.getName());
   9.797 -        } else {
   9.798 -            log.log(Level.WARNING, "Neplatí: panel.getLayout() instanceof CardLayout");
   9.799 -        }
   9.800 +		if (panel.getLayout() instanceof CardLayout) {
   9.801 +			CardLayout l = (CardLayout) panel.getLayout();
   9.802 +			l.show(panel, komponenta.getName());
   9.803 +		} else {
   9.804 +			log.log(Level.WARNING, "Neplatí: panel.getLayout() instanceof CardLayout");
   9.805 +		}
   9.806  
   9.807 -    }
   9.808 +	}
   9.809  
   9.810 -    /** Změní chování tabulátoru v textovém poli - aby se pomocí TABu dalo skočit na další komponentu */
   9.811 -    private void vyresitTabFocusProblem(JTextArea textArea) {
   9.812 -        textArea.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
   9.813 -        textArea.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null);
   9.814 -    }
   9.815 +	/** Změní chování tabulátoru v textovém poli - aby se pomocí TABu dalo skočit na další komponentu */
   9.816 +	private void vyresitTabFocusProblem(JTextArea textArea) {
   9.817 +		textArea.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
   9.818 +		textArea.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null);
   9.819 +	}
   9.820  
   9.821 -    public JXTaskPaneContainer getTaskPanel() {
   9.822 -        return taskPanel;
   9.823 -    }
   9.824 +	public JXTaskPaneContainer getTaskPanel() {
   9.825 +		return taskPanel;
   9.826 +	}
   9.827  
   9.828 -    /**
   9.829 -     * @param args the command line arguments
   9.830 -     */
   9.831 -    public static void main(String args[]) {
   9.832 -        final boolean ladit = (args != null && args.length > 0 && args[0].equals("ladit"));
   9.833 +	/**
   9.834 +	 * @param args the command line arguments
   9.835 +	 */
   9.836 +	public static void main(String args[]) {
   9.837 +		final boolean ladit = (args != null && args.length > 0 && args[0].equals("ladit"));
   9.838  
   9.839 -        try {
   9.840 -            //LookAndFeel laf = UIManager.getLookAndFeel();
   9.841 +		try {
   9.842 +			//LookAndFeel laf = UIManager.getLookAndFeel();
   9.843  
   9.844 -            //laf = new SubstanceLookAndFeel();
   9.845 -            //laf = new SubstanceBusinessLookAndFeel();
   9.846 -            //laf = new SubstanceBusinessBlueSteelLookAndFeel();
   9.847 -            //laf = new SubstanceBusinessBlackSteelLookAndFeel();
   9.848 +			//laf = new SubstanceLookAndFeel();
   9.849 +			//laf = new SubstanceBusinessLookAndFeel();
   9.850 +			//laf = new SubstanceBusinessBlueSteelLookAndFeel();
   9.851 +			//laf = new SubstanceBusinessBlackSteelLookAndFeel();
   9.852  
   9.853 -            UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel");
   9.854 -        } catch (ClassNotFoundException ex) {
   9.855 -            log.log(Level.SEVERE, null, ex);
   9.856 -        } catch (InstantiationException ex) {
   9.857 -            log.log(Level.SEVERE, null, ex);
   9.858 -        } catch (IllegalAccessException ex) {
   9.859 -            log.log(Level.SEVERE, null, ex);
   9.860 -        } catch (UnsupportedLookAndFeelException ex) {
   9.861 -            log.log(Level.SEVERE, null, ex);
   9.862 -        }
   9.863 +			UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel");
   9.864 +		} catch (ClassNotFoundException ex) {
   9.865 +			log.log(Level.SEVERE, null, ex);
   9.866 +		} catch (InstantiationException ex) {
   9.867 +			log.log(Level.SEVERE, null, ex);
   9.868 +		} catch (IllegalAccessException ex) {
   9.869 +			log.log(Level.SEVERE, null, ex);
   9.870 +		} catch (UnsupportedLookAndFeelException ex) {
   9.871 +			log.log(Level.SEVERE, null, ex);
   9.872 +		}
   9.873  
   9.874 -        java.awt.EventQueue.invokeLater(new Runnable() {
   9.875 +		java.awt.EventQueue.invokeLater(new Runnable() {
   9.876  
   9.877 -            public void run() {
   9.878 -                new SuperPostak(ladit, true).setVisible(true);
   9.879 -            }
   9.880 -        });
   9.881 -    }
   9.882 +			public void run() {
   9.883 +				new SuperPostak(ladit, true).setVisible(true);
   9.884 +			}
   9.885 +		});
   9.886 +	}
   9.887      // Variables declaration - do not modify//GEN-BEGIN:variables
   9.888      private javax.swing.JLabel jLabel1;
   9.889      private javax.swing.JLabel jLabel10;