Přidání SuperPošťáka do Mercurialu (původně byl v Subversionu)
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun Nov 23 22:19:20 2008 +0100 (2008-11-23)
changeset 0e76872ad5226
child 1 699b6c66228b
Přidání SuperPošťáka do Mercurialu (původně byl v Subversionu)
Postak – základ, knihovna
SuperPostak – GUI nadstavba
SuperPostak2 – pokus o implementaci aplikace jako modulu pro Netbeans, POZOR: není přidán do Mercurialu, možná později (pravděpodobně se ale nebude používat)
.hgignore
java/Postak/nbproject/build-impl.xml
java/Postak/nbproject/genfiles.properties
java/Postak/nbproject/private/config.properties
java/Postak/nbproject/private/private.properties
java/Postak/nbproject/project.properties
java/Postak/nbproject/project.xml
java/Postak/src/cz/frantovo/postak/HromadnaZprava.java
java/Postak/src/cz/frantovo/postak/InternetAddressKomu.java
java/Postak/src/cz/frantovo/postak/Nastaveni.java
java/Postak/src/cz/frantovo/postak/Postak.java
java/SuperPostak/manifest.mf
java/SuperPostak/master.jnlp
java/SuperPostak/nbproject/build-impl.xml
java/SuperPostak/nbproject/configs/JWS_generated.properties
java/SuperPostak/nbproject/genfiles.properties
java/SuperPostak/nbproject/jnlp-impl.xml
java/SuperPostak/nbproject/private/config.properties
java/SuperPostak/nbproject/private/private.properties
java/SuperPostak/nbproject/private/private.xml
java/SuperPostak/nbproject/project.properties
java/SuperPostak/nbproject/project.xml
java/SuperPostak/src/cz/frantovo/superPostak/Data.java
java/SuperPostak/src/cz/frantovo/superPostak/DataSQL.java
java/SuperPostak/src/cz/frantovo/superPostak/GrafPokus.form
java/SuperPostak/src/cz/frantovo/superPostak/GrafPokus.java
java/SuperPostak/src/cz/frantovo/superPostak/PanelPrijemcu.form
java/SuperPostak/src/cz/frantovo/superPostak/PanelPrijemcu.java
java/SuperPostak/src/cz/frantovo/superPostak/Pokus.java
java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.form
java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.java
java/SuperPostak/src/cz/frantovo/superPostak/TODO.txt
java/SuperPostak/src/cz/frantovo/superPostak/ZobrazovacAdres.form
java/SuperPostak/src/cz/frantovo/superPostak/ZobrazovacAdres.java
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/adept_commit.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/apply.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/editdelete.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/fork.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/gear.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/mail_generic.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/otevrit.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/ulozit.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/vlozit.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/xfmail.png
java/SuperPostak/src/cz/frantovo/superPostak/obrazky/zobrazit_adresy.png
java/SuperPostak/test/cz/frantovo/superPostak/PostakTest.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgignore	Sun Nov 23 22:19:20 2008 +0100
     1.3 @@ -0,0 +1,9 @@
     1.4 +java/Postak/dist/*
     1.5 +java/Postak/build/*
     1.6 +
     1.7 +java/SuperPostak/dist/*
     1.8 +java/SuperPostak/build/*
     1.9 +
    1.10 +java/SuperPostak2/*
    1.11 +java/SuperPostak2/dist/*
    1.12 +java/SuperPostak2/build/*
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/java/Postak/nbproject/build-impl.xml	Sun Nov 23 22:19:20 2008 +0100
     2.3 @@ -0,0 +1,629 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!--
     2.6 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
     2.7 +***         EDIT ../build.xml INSTEAD         ***
     2.8 +
     2.9 +For the purpose of easier reading the script
    2.10 +is divided into following sections:
    2.11 +
    2.12 +  - initialization
    2.13 +  - compilation
    2.14 +  - jar
    2.15 +  - execution
    2.16 +  - debugging
    2.17 +  - javadoc
    2.18 +  - junit compilation
    2.19 +  - junit execution
    2.20 +  - junit debugging
    2.21 +  - applet
    2.22 +  - cleanup
    2.23 +
    2.24 +        -->
    2.25 +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Postak-impl">
    2.26 +    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    2.27 +    <!-- 
    2.28 +                ======================
    2.29 +                INITIALIZATION SECTION 
    2.30 +                ======================
    2.31 +            -->
    2.32 +    <target name="-pre-init">
    2.33 +        <!-- Empty placeholder for easier customization. -->
    2.34 +        <!-- You can override this target in the ../build.xml file. -->
    2.35 +    </target>
    2.36 +    <target depends="-pre-init" name="-init-private">
    2.37 +        <property file="nbproject/private/config.properties"/>
    2.38 +        <property file="nbproject/private/configs/${config}.properties"/>
    2.39 +        <property file="nbproject/private/private.properties"/>
    2.40 +    </target>
    2.41 +    <target depends="-pre-init,-init-private" name="-init-user">
    2.42 +        <property file="${user.properties.file}"/>
    2.43 +        <!-- The two properties below are usually overridden -->
    2.44 +        <!-- by the active platform. Just a fallback. -->
    2.45 +        <property name="default.javac.source" value="1.4"/>
    2.46 +        <property name="default.javac.target" value="1.4"/>
    2.47 +    </target>
    2.48 +    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
    2.49 +        <property file="nbproject/configs/${config}.properties"/>
    2.50 +        <property file="nbproject/project.properties"/>
    2.51 +    </target>
    2.52 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    2.53 +        <available file="${manifest.file}" property="manifest.available"/>
    2.54 +        <condition property="manifest.available+main.class">
    2.55 +            <and>
    2.56 +                <isset property="manifest.available"/>
    2.57 +                <isset property="main.class"/>
    2.58 +                <not>
    2.59 +                    <equals arg1="${main.class}" arg2="" trim="true"/>
    2.60 +                </not>
    2.61 +            </and>
    2.62 +        </condition>
    2.63 +        <condition property="manifest.available+main.class+mkdist.available">
    2.64 +            <and>
    2.65 +                <istrue value="${manifest.available+main.class}"/>
    2.66 +                <isset property="libs.CopyLibs.classpath"/>
    2.67 +            </and>
    2.68 +        </condition>
    2.69 +        <condition property="have.tests">
    2.70 +            <or>
    2.71 +                <available file="${test.src.dir}"/>
    2.72 +            </or>
    2.73 +        </condition>
    2.74 +        <condition property="have.sources">
    2.75 +            <or>
    2.76 +                <available file="${src.dir}"/>
    2.77 +            </or>
    2.78 +        </condition>
    2.79 +        <condition property="netbeans.home+have.tests">
    2.80 +            <and>
    2.81 +                <isset property="netbeans.home"/>
    2.82 +                <isset property="have.tests"/>
    2.83 +            </and>
    2.84 +        </condition>
    2.85 +        <condition property="no.javadoc.preview">
    2.86 +            <and>
    2.87 +                <isset property="javadoc.preview"/>
    2.88 +                <isfalse value="${javadoc.preview}"/>
    2.89 +            </and>
    2.90 +        </condition>
    2.91 +        <property name="run.jvmargs" value=""/>
    2.92 +        <property name="javac.compilerargs" value=""/>
    2.93 +        <property name="work.dir" value="${basedir}"/>
    2.94 +        <condition property="no.deps">
    2.95 +            <and>
    2.96 +                <istrue value="${no.dependencies}"/>
    2.97 +            </and>
    2.98 +        </condition>
    2.99 +        <property name="javac.debug" value="true"/>
   2.100 +        <property name="javadoc.preview" value="true"/>
   2.101 +        <property name="application.args" value=""/>
   2.102 +        <property name="source.encoding" value="${file.encoding}"/>
   2.103 +        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   2.104 +            <and>
   2.105 +                <isset property="javadoc.encoding"/>
   2.106 +                <not>
   2.107 +                    <equals arg1="${javadoc.encoding}" arg2=""/>
   2.108 +                </not>
   2.109 +            </and>
   2.110 +        </condition>
   2.111 +        <property name="javadoc.encoding.used" value="${source.encoding}"/>
   2.112 +        <property name="includes" value="**"/>
   2.113 +        <property name="excludes" value=""/>
   2.114 +        <property name="do.depend" value="false"/>
   2.115 +        <condition property="do.depend.true">
   2.116 +            <istrue value="${do.depend}"/>
   2.117 +        </condition>
   2.118 +        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
   2.119 +            <and>
   2.120 +                <isset property="jaxws.endorsed.dir"/>
   2.121 +                <available file="nbproject/jaxws-build.xml"/>
   2.122 +            </and>
   2.123 +        </condition>
   2.124 +    </target>
   2.125 +    <target name="-post-init">
   2.126 +        <!-- Empty placeholder for easier customization. -->
   2.127 +        <!-- You can override this target in the ../build.xml file. -->
   2.128 +    </target>
   2.129 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   2.130 +        <fail unless="src.dir">Must set src.dir</fail>
   2.131 +        <fail unless="test.src.dir">Must set test.src.dir</fail>
   2.132 +        <fail unless="build.dir">Must set build.dir</fail>
   2.133 +        <fail unless="dist.dir">Must set dist.dir</fail>
   2.134 +        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   2.135 +        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   2.136 +        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   2.137 +        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   2.138 +        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   2.139 +        <fail unless="dist.jar">Must set dist.jar</fail>
   2.140 +    </target>
   2.141 +    <target name="-init-macrodef-property">
   2.142 +        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.143 +            <attribute name="name"/>
   2.144 +            <attribute name="value"/>
   2.145 +            <sequential>
   2.146 +                <property name="@{name}" value="${@{value}}"/>
   2.147 +            </sequential>
   2.148 +        </macrodef>
   2.149 +    </target>
   2.150 +    <target name="-init-macrodef-javac">
   2.151 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.152 +            <attribute default="${src.dir}" name="srcdir"/>
   2.153 +            <attribute default="${build.classes.dir}" name="destdir"/>
   2.154 +            <attribute default="${javac.classpath}" name="classpath"/>
   2.155 +            <attribute default="${includes}" name="includes"/>
   2.156 +            <attribute default="${excludes}" name="excludes"/>
   2.157 +            <attribute default="${javac.debug}" name="debug"/>
   2.158 +            <attribute default="" name="sourcepath"/>
   2.159 +            <element name="customize" optional="true"/>
   2.160 +            <sequential>
   2.161 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
   2.162 +                    <classpath>
   2.163 +                        <path path="@{classpath}"/>
   2.164 +                    </classpath>
   2.165 +                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
   2.166 +                    <customize/>
   2.167 +                </javac>
   2.168 +            </sequential>
   2.169 +        </macrodef>
   2.170 +        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.171 +            <attribute default="${src.dir}" name="srcdir"/>
   2.172 +            <attribute default="${build.classes.dir}" name="destdir"/>
   2.173 +            <attribute default="${javac.classpath}" name="classpath"/>
   2.174 +            <sequential>
   2.175 +                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   2.176 +                    <classpath>
   2.177 +                        <path path="@{classpath}"/>
   2.178 +                    </classpath>
   2.179 +                </depend>
   2.180 +            </sequential>
   2.181 +        </macrodef>
   2.182 +        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.183 +            <attribute default="${build.classes.dir}" name="destdir"/>
   2.184 +            <sequential>
   2.185 +                <fail unless="javac.includes">Must set javac.includes</fail>
   2.186 +                <pathconvert pathsep="," property="javac.includes.binary">
   2.187 +                    <path>
   2.188 +                        <filelist dir="@{destdir}" files="${javac.includes}"/>
   2.189 +                    </path>
   2.190 +                    <globmapper from="*.java" to="*.class"/>
   2.191 +                </pathconvert>
   2.192 +                <delete>
   2.193 +                    <files includes="${javac.includes.binary}"/>
   2.194 +                </delete>
   2.195 +            </sequential>
   2.196 +        </macrodef>
   2.197 +    </target>
   2.198 +    <target name="-init-macrodef-junit">
   2.199 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.200 +            <attribute default="${includes}" name="includes"/>
   2.201 +            <attribute default="${excludes}" name="excludes"/>
   2.202 +            <attribute default="**" name="testincludes"/>
   2.203 +            <sequential>
   2.204 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   2.205 +                    <batchtest todir="${build.test.results.dir}">
   2.206 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.207 +                            <filename name="@{testincludes}"/>
   2.208 +                        </fileset>
   2.209 +                    </batchtest>
   2.210 +                    <classpath>
   2.211 +                        <path path="${run.test.classpath}"/>
   2.212 +                    </classpath>
   2.213 +                    <syspropertyset>
   2.214 +                        <propertyref prefix="test-sys-prop."/>
   2.215 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.216 +                    </syspropertyset>
   2.217 +                    <formatter type="brief" usefile="false"/>
   2.218 +                    <formatter type="xml"/>
   2.219 +                    <jvmarg line="${run.jvmargs}"/>
   2.220 +                </junit>
   2.221 +            </sequential>
   2.222 +        </macrodef>
   2.223 +    </target>
   2.224 +    <target name="-init-macrodef-nbjpda">
   2.225 +        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.226 +            <attribute default="${main.class}" name="name"/>
   2.227 +            <attribute default="${debug.classpath}" name="classpath"/>
   2.228 +            <attribute default="" name="stopclassname"/>
   2.229 +            <sequential>
   2.230 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
   2.231 +                    <classpath>
   2.232 +                        <path path="@{classpath}"/>
   2.233 +                    </classpath>
   2.234 +                </nbjpdastart>
   2.235 +            </sequential>
   2.236 +        </macrodef>
   2.237 +        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.238 +            <attribute default="${build.classes.dir}" name="dir"/>
   2.239 +            <sequential>
   2.240 +                <nbjpdareload>
   2.241 +                    <fileset dir="@{dir}" includes="${fix.classes}">
   2.242 +                        <include name="${fix.includes}*.class"/>
   2.243 +                    </fileset>
   2.244 +                </nbjpdareload>
   2.245 +            </sequential>
   2.246 +        </macrodef>
   2.247 +    </target>
   2.248 +    <target name="-init-debug-args">
   2.249 +        <property name="version-output" value="java version &quot;${ant.java.version}"/>
   2.250 +        <condition property="have-jdk-older-than-1.4">
   2.251 +            <or>
   2.252 +                <contains string="${version-output}" substring="java version &quot;1.0"/>
   2.253 +                <contains string="${version-output}" substring="java version &quot;1.1"/>
   2.254 +                <contains string="${version-output}" substring="java version &quot;1.2"/>
   2.255 +                <contains string="${version-output}" substring="java version &quot;1.3"/>
   2.256 +            </or>
   2.257 +        </condition>
   2.258 +        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   2.259 +            <istrue value="${have-jdk-older-than-1.4}"/>
   2.260 +        </condition>
   2.261 +    </target>
   2.262 +    <target depends="-init-debug-args" name="-init-macrodef-debug">
   2.263 +        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.264 +            <attribute default="${main.class}" name="classname"/>
   2.265 +            <attribute default="${debug.classpath}" name="classpath"/>
   2.266 +            <element name="customize" optional="true"/>
   2.267 +            <sequential>
   2.268 +                <java classname="@{classname}" dir="${work.dir}" fork="true">
   2.269 +                    <jvmarg line="${debug-args-line}"/>
   2.270 +                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
   2.271 +                    <jvmarg line="${run.jvmargs}"/>
   2.272 +                    <classpath>
   2.273 +                        <path path="@{classpath}"/>
   2.274 +                    </classpath>
   2.275 +                    <syspropertyset>
   2.276 +                        <propertyref prefix="run-sys-prop."/>
   2.277 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   2.278 +                    </syspropertyset>
   2.279 +                    <customize/>
   2.280 +                </java>
   2.281 +            </sequential>
   2.282 +        </macrodef>
   2.283 +    </target>
   2.284 +    <target name="-init-macrodef-java">
   2.285 +        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.286 +            <attribute default="${main.class}" name="classname"/>
   2.287 +            <element name="customize" optional="true"/>
   2.288 +            <sequential>
   2.289 +                <java classname="@{classname}" dir="${work.dir}" fork="true">
   2.290 +                    <jvmarg line="${run.jvmargs}"/>
   2.291 +                    <classpath>
   2.292 +                        <path path="${run.classpath}"/>
   2.293 +                    </classpath>
   2.294 +                    <syspropertyset>
   2.295 +                        <propertyref prefix="run-sys-prop."/>
   2.296 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   2.297 +                    </syspropertyset>
   2.298 +                    <customize/>
   2.299 +                </java>
   2.300 +            </sequential>
   2.301 +        </macrodef>
   2.302 +    </target>
   2.303 +    <target name="-init-presetdef-jar">
   2.304 +        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.305 +            <jar compress="${jar.compress}" jarfile="${dist.jar}">
   2.306 +                <j2seproject1:fileset dir="${build.classes.dir}"/>
   2.307 +            </jar>
   2.308 +        </presetdef>
   2.309 +    </target>
   2.310 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
   2.311 +    <!--
   2.312 +                ===================
   2.313 +                COMPILATION SECTION
   2.314 +                ===================
   2.315 +            -->
   2.316 +    <target depends="init" name="deps-jar" unless="no.deps"/>
   2.317 +    <target depends="init,deps-jar" name="-pre-pre-compile">
   2.318 +        <mkdir dir="${build.classes.dir}"/>
   2.319 +    </target>
   2.320 +    <target name="-pre-compile">
   2.321 +        <!-- Empty placeholder for easier customization. -->
   2.322 +        <!-- You can override this target in the ../build.xml file. -->
   2.323 +    </target>
   2.324 +    <target if="do.depend.true" name="-compile-depend">
   2.325 +        <j2seproject3:depend/>
   2.326 +    </target>
   2.327 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   2.328 +        <j2seproject3:javac/>
   2.329 +        <copy todir="${build.classes.dir}">
   2.330 +            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   2.331 +        </copy>
   2.332 +    </target>
   2.333 +    <target name="-post-compile">
   2.334 +        <!-- Empty placeholder for easier customization. -->
   2.335 +        <!-- You can override this target in the ../build.xml file. -->
   2.336 +    </target>
   2.337 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   2.338 +    <target name="-pre-compile-single">
   2.339 +        <!-- Empty placeholder for easier customization. -->
   2.340 +        <!-- You can override this target in the ../build.xml file. -->
   2.341 +    </target>
   2.342 +    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   2.343 +        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   2.344 +        <j2seproject3:force-recompile/>
   2.345 +        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
   2.346 +    </target>
   2.347 +    <target name="-post-compile-single">
   2.348 +        <!-- Empty placeholder for easier customization. -->
   2.349 +        <!-- You can override this target in the ../build.xml file. -->
   2.350 +    </target>
   2.351 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   2.352 +    <!--
   2.353 +                ====================
   2.354 +                JAR BUILDING SECTION
   2.355 +                ====================
   2.356 +            -->
   2.357 +    <target depends="init" name="-pre-pre-jar">
   2.358 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
   2.359 +        <mkdir dir="${dist.jar.dir}"/>
   2.360 +    </target>
   2.361 +    <target name="-pre-jar">
   2.362 +        <!-- Empty placeholder for easier customization. -->
   2.363 +        <!-- You can override this target in the ../build.xml file. -->
   2.364 +    </target>
   2.365 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   2.366 +        <j2seproject1:jar/>
   2.367 +    </target>
   2.368 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   2.369 +        <j2seproject1:jar manifest="${manifest.file}"/>
   2.370 +    </target>
   2.371 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   2.372 +        <j2seproject1:jar manifest="${manifest.file}">
   2.373 +            <j2seproject1:manifest>
   2.374 +                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   2.375 +            </j2seproject1:manifest>
   2.376 +        </j2seproject1:jar>
   2.377 +        <echo>To run this application from the command line without Ant, try:</echo>
   2.378 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.379 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.380 +        <pathconvert property="run.classpath.with.dist.jar">
   2.381 +            <path path="${run.classpath}"/>
   2.382 +            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   2.383 +        </pathconvert>
   2.384 +        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   2.385 +    </target>
   2.386 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   2.387 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.388 +        <pathconvert property="run.classpath.without.build.classes.dir">
   2.389 +            <path path="${run.classpath}"/>
   2.390 +            <map from="${build.classes.dir.resolved}" to=""/>
   2.391 +        </pathconvert>
   2.392 +        <pathconvert pathsep=" " property="jar.classpath">
   2.393 +            <path path="${run.classpath.without.build.classes.dir}"/>
   2.394 +            <chainedmapper>
   2.395 +                <flattenmapper/>
   2.396 +                <globmapper from="*" to="lib/*"/>
   2.397 +            </chainedmapper>
   2.398 +        </pathconvert>
   2.399 +        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   2.400 +        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.401 +            <fileset dir="${build.classes.dir}"/>
   2.402 +            <manifest>
   2.403 +                <attribute name="Main-Class" value="${main.class}"/>
   2.404 +                <attribute name="Class-Path" value="${jar.classpath}"/>
   2.405 +            </manifest>
   2.406 +        </copylibs>
   2.407 +        <echo>To run this application from the command line without Ant, try:</echo>
   2.408 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.409 +        <echo>java -jar "${dist.jar.resolved}"</echo>
   2.410 +    </target>
   2.411 +    <target name="-post-jar">
   2.412 +        <!-- Empty placeholder for easier customization. -->
   2.413 +        <!-- You can override this target in the ../build.xml file. -->
   2.414 +    </target>
   2.415 +    <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.416 +    <!--
   2.417 +                =================
   2.418 +                EXECUTION SECTION
   2.419 +                =================
   2.420 +            -->
   2.421 +    <target depends="init,compile" description="Run a main class." name="run">
   2.422 +        <j2seproject1:java>
   2.423 +            <customize>
   2.424 +                <arg line="${application.args}"/>
   2.425 +            </customize>
   2.426 +        </j2seproject1:java>
   2.427 +    </target>
   2.428 +    <target name="-do-not-recompile">
   2.429 +        <property name="javac.includes.binary" value=""/>
   2.430 +    </target>
   2.431 +    <target depends="init,-do-not-recompile,compile-single" name="run-single">
   2.432 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   2.433 +        <j2seproject1:java classname="${run.class}"/>
   2.434 +    </target>
   2.435 +    <!--
   2.436 +                =================
   2.437 +                DEBUGGING SECTION
   2.438 +                =================
   2.439 +            -->
   2.440 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   2.441 +        <j2seproject1:nbjpdastart name="${debug.class}"/>
   2.442 +    </target>
   2.443 +    <target depends="init,compile" name="-debug-start-debuggee">
   2.444 +        <j2seproject3:debug>
   2.445 +            <customize>
   2.446 +                <arg line="${application.args}"/>
   2.447 +            </customize>
   2.448 +        </j2seproject3:debug>
   2.449 +    </target>
   2.450 +    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
   2.451 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
   2.452 +        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
   2.453 +    </target>
   2.454 +    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
   2.455 +    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   2.456 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   2.457 +        <j2seproject3:debug classname="${debug.class}"/>
   2.458 +    </target>
   2.459 +    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   2.460 +    <target depends="init" name="-pre-debug-fix">
   2.461 +        <fail unless="fix.includes">Must set fix.includes</fail>
   2.462 +        <property name="javac.includes" value="${fix.includes}.java"/>
   2.463 +    </target>
   2.464 +    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   2.465 +        <j2seproject1:nbjpdareload/>
   2.466 +    </target>
   2.467 +    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   2.468 +    <!--
   2.469 +                ===============
   2.470 +                JAVADOC SECTION
   2.471 +                ===============
   2.472 +            -->
   2.473 +    <target depends="init" name="-javadoc-build">
   2.474 +        <mkdir dir="${dist.javadoc.dir}"/>
   2.475 +        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
   2.476 +            <classpath>
   2.477 +                <path path="${javac.classpath}"/>
   2.478 +            </classpath>
   2.479 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   2.480 +                <filename name="**/*.java"/>
   2.481 +            </fileset>
   2.482 +        </javadoc>
   2.483 +    </target>
   2.484 +    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   2.485 +        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   2.486 +    </target>
   2.487 +    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
   2.488 +    <!--
   2.489 +                =========================
   2.490 +                JUNIT COMPILATION SECTION
   2.491 +                =========================
   2.492 +            -->
   2.493 +    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   2.494 +        <mkdir dir="${build.test.classes.dir}"/>
   2.495 +    </target>
   2.496 +    <target name="-pre-compile-test">
   2.497 +        <!-- Empty placeholder for easier customization. -->
   2.498 +        <!-- You can override this target in the ../build.xml file. -->
   2.499 +    </target>
   2.500 +    <target if="do.depend.true" name="-compile-test-depend">
   2.501 +        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   2.502 +    </target>
   2.503 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   2.504 +        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   2.505 +        <copy todir="${build.test.classes.dir}">
   2.506 +            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   2.507 +        </copy>
   2.508 +    </target>
   2.509 +    <target name="-post-compile-test">
   2.510 +        <!-- Empty placeholder for easier customization. -->
   2.511 +        <!-- You can override this target in the ../build.xml file. -->
   2.512 +    </target>
   2.513 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   2.514 +    <target name="-pre-compile-test-single">
   2.515 +        <!-- Empty placeholder for easier customization. -->
   2.516 +        <!-- You can override this target in the ../build.xml file. -->
   2.517 +    </target>
   2.518 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   2.519 +        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   2.520 +        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   2.521 +        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
   2.522 +        <copy todir="${build.test.classes.dir}">
   2.523 +            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   2.524 +        </copy>
   2.525 +    </target>
   2.526 +    <target name="-post-compile-test-single">
   2.527 +        <!-- Empty placeholder for easier customization. -->
   2.528 +        <!-- You can override this target in the ../build.xml file. -->
   2.529 +    </target>
   2.530 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   2.531 +    <!--
   2.532 +                =======================
   2.533 +                JUNIT EXECUTION SECTION
   2.534 +                =======================
   2.535 +            -->
   2.536 +    <target depends="init" if="have.tests" name="-pre-test-run">
   2.537 +        <mkdir dir="${build.test.results.dir}"/>
   2.538 +    </target>
   2.539 +    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   2.540 +        <j2seproject3:junit testincludes="**/*Test.java"/>
   2.541 +    </target>
   2.542 +    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   2.543 +        <fail if="tests.failed">Some tests failed; see details above.</fail>
   2.544 +    </target>
   2.545 +    <target depends="init" if="have.tests" name="test-report"/>
   2.546 +    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   2.547 +    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
   2.548 +    <target depends="init" if="have.tests" name="-pre-test-run-single">
   2.549 +        <mkdir dir="${build.test.results.dir}"/>
   2.550 +    </target>
   2.551 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
   2.552 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
   2.553 +        <j2seproject3:junit excludes="" includes="${test.includes}"/>
   2.554 +    </target>
   2.555 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   2.556 +        <fail if="tests.failed">Some tests failed; see details above.</fail>
   2.557 +    </target>
   2.558 +    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
   2.559 +    <!--
   2.560 +                =======================
   2.561 +                JUNIT DEBUGGING SECTION
   2.562 +                =======================
   2.563 +            -->
   2.564 +    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   2.565 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   2.566 +        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   2.567 +        <delete file="${test.report.file}"/>
   2.568 +        <mkdir dir="${build.test.results.dir}"/>
   2.569 +        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
   2.570 +            <customize>
   2.571 +                <syspropertyset>
   2.572 +                    <propertyref prefix="test-sys-prop."/>
   2.573 +                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.574 +                </syspropertyset>
   2.575 +                <arg value="${test.class}"/>
   2.576 +                <arg value="showoutput=true"/>
   2.577 +                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   2.578 +                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   2.579 +            </customize>
   2.580 +        </j2seproject3:debug>
   2.581 +    </target>
   2.582 +    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   2.583 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   2.584 +    </target>
   2.585 +    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   2.586 +    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   2.587 +        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   2.588 +    </target>
   2.589 +    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
   2.590 +    <!--
   2.591 +                =========================
   2.592 +                APPLET EXECUTION SECTION
   2.593 +                =========================
   2.594 +            -->
   2.595 +    <target depends="init,compile-single" name="run-applet">
   2.596 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   2.597 +        <j2seproject1:java classname="sun.applet.AppletViewer">
   2.598 +            <customize>
   2.599 +                <arg value="${applet.url}"/>
   2.600 +            </customize>
   2.601 +        </j2seproject1:java>
   2.602 +    </target>
   2.603 +    <!--
   2.604 +                =========================
   2.605 +                APPLET DEBUGGING  SECTION
   2.606 +                =========================
   2.607 +            -->
   2.608 +    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
   2.609 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   2.610 +        <j2seproject3:debug classname="sun.applet.AppletViewer">
   2.611 +            <customize>
   2.612 +                <arg value="${applet.url}"/>
   2.613 +            </customize>
   2.614 +        </j2seproject3:debug>
   2.615 +    </target>
   2.616 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
   2.617 +    <!--
   2.618 +                ===============
   2.619 +                CLEANUP SECTION
   2.620 +                ===============
   2.621 +            -->
   2.622 +    <target depends="init" name="deps-clean" unless="no.deps"/>
   2.623 +    <target depends="init" name="-do-clean">
   2.624 +        <delete dir="${build.dir}"/>
   2.625 +        <delete dir="${dist.dir}"/>
   2.626 +    </target>
   2.627 +    <target name="-post-clean">
   2.628 +        <!-- Empty placeholder for easier customization. -->
   2.629 +        <!-- You can override this target in the ../build.xml file. -->
   2.630 +    </target>
   2.631 +    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
   2.632 +</project>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/java/Postak/nbproject/genfiles.properties	Sun Nov 23 22:19:20 2008 +0100
     3.3 @@ -0,0 +1,8 @@
     3.4 +build.xml.data.CRC32=ecce8ba0
     3.5 +build.xml.script.CRC32=b613dcff
     3.6 +build.xml.stylesheet.CRC32=be360661
     3.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     3.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     3.9 +nbproject/build-impl.xml.data.CRC32=ecce8ba0
    3.10 +nbproject/build-impl.xml.script.CRC32=38f4cab2
    3.11 +nbproject/build-impl.xml.stylesheet.CRC32=487672f9
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/java/Postak/nbproject/private/private.properties	Sun Nov 23 22:19:20 2008 +0100
     4.3 @@ -0,0 +1,6 @@
     4.4 +do.depend=false
     4.5 +do.jar=true
     4.6 +javac.debug=true
     4.7 +javadoc.preview=true
     4.8 +jaxws.endorsed.dir=/usr/local/netbeans-6.1/java2/modules/ext/jaxws21/api
     4.9 +user.properties.file=/home/fiki/.netbeans/6.1/build.properties
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/java/Postak/nbproject/project.properties	Sun Nov 23 22:19:20 2008 +0100
     5.3 @@ -0,0 +1,67 @@
     5.4 +application.title=Postak
     5.5 +application.vendor=fiki
     5.6 +build.classes.dir=${build.dir}/classes
     5.7 +build.classes.excludes=**/*.java,**/*.form
     5.8 +# This directory is removed when the project is cleaned:
     5.9 +build.dir=build
    5.10 +build.generated.dir=${build.dir}/generated
    5.11 +# Only compile against the classpath explicitly listed here:
    5.12 +build.sysclasspath=ignore
    5.13 +build.test.classes.dir=${build.dir}/test/classes
    5.14 +build.test.results.dir=${build.dir}/test/results
    5.15 +debug.classpath=\
    5.16 +    ${run.classpath}
    5.17 +debug.test.classpath=\
    5.18 +    ${run.test.classpath}
    5.19 +# This directory is removed when the project is cleaned:
    5.20 +dist.dir=dist
    5.21 +dist.jar=${dist.dir}/Postak.jar
    5.22 +dist.javadoc.dir=${dist.dir}/javadoc
    5.23 +excludes=
    5.24 +includes=**
    5.25 +jar.compress=false
    5.26 +javac.classpath=\
    5.27 +    ${libs.JAF.classpath}:\
    5.28 +    ${libs.JavaMail.classpath}
    5.29 +# Space-separated list of extra javac options
    5.30 +javac.compilerargs=
    5.31 +javac.deprecation=false
    5.32 +javac.source=1.5
    5.33 +javac.target=1.5
    5.34 +javac.test.classpath=\
    5.35 +    ${javac.classpath}:\
    5.36 +    ${build.classes.dir}:\
    5.37 +    ${libs.junit.classpath}:\
    5.38 +    ${libs.junit_4.classpath}
    5.39 +javadoc.additionalparam=
    5.40 +javadoc.author=false
    5.41 +javadoc.encoding=${source.encoding}
    5.42 +javadoc.noindex=false
    5.43 +javadoc.nonavbar=false
    5.44 +javadoc.notree=false
    5.45 +javadoc.private=false
    5.46 +javadoc.splitindex=true
    5.47 +javadoc.use=true
    5.48 +javadoc.version=false
    5.49 +javadoc.windowtitle=
    5.50 +# Property libs.JAF.classpath is set here just to make sharing of project simpler.
    5.51 +# The library definition has always preference over this property.
    5.52 +libs.JAF.classpath=../../../../../java/lib/jaf/jaf-1.1.1/activation.jar
    5.53 +# Property libs.JavaMail.classpath is set here just to make sharing of project simpler.
    5.54 +# The library definition has always preference over this property.
    5.55 +libs.JavaMail.classpath=../../../../../java/lib/java-mail/javamail-1.4.1/mail.jar:../../../../../java/lib/java-mail/javamail-1.4.1/lib/dsn.jar:../../../../../java/lib/java-mail/javamail-1.4.1/lib/imap.jar:../../../../../java/lib/java-mail/javamail-1.4.1/lib/mailapi.jar:../../../../../java/lib/java-mail/javamail-1.4.1/lib/pop3.jar:../../../../../java/lib/java-mail/javamail-1.4.1/lib/smtp.jar
    5.56 +meta.inf.dir=${src.dir}/META-INF
    5.57 +platform.active=default_platform
    5.58 +run.classpath=\
    5.59 +    ${javac.classpath}:\
    5.60 +    ${build.classes.dir}
    5.61 +# Space-separated list of JVM arguments used when running the project
    5.62 +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
    5.63 +# or test-sys-prop.name=value to set system properties for unit tests):
    5.64 +run.jvmargs=
    5.65 +run.test.classpath=\
    5.66 +    ${javac.test.classpath}:\
    5.67 +    ${build.test.classes.dir}
    5.68 +source.encoding=UTF-8
    5.69 +src.dir=src
    5.70 +test.src.dir=test
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/java/Postak/nbproject/project.xml	Sun Nov 23 22:19:20 2008 +0100
     6.3 @@ -0,0 +1,16 @@
     6.4 +<?xml version="1.0" encoding="UTF-8"?>
     6.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
     6.6 +    <type>org.netbeans.modules.java.j2seproject</type>
     6.7 +    <configuration>
     6.8 +        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
     6.9 +            <name>Postak</name>
    6.10 +            <minimum-ant-version>1.6.5</minimum-ant-version>
    6.11 +            <source-roots>
    6.12 +                <root id="src.dir"/>
    6.13 +            </source-roots>
    6.14 +            <test-roots>
    6.15 +                <root id="test.src.dir"/>
    6.16 +            </test-roots>
    6.17 +        </data>
    6.18 +    </configuration>
    6.19 +</project>
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/java/Postak/src/cz/frantovo/postak/HromadnaZprava.java	Sun Nov 23 22:19:20 2008 +0100
     7.3 @@ -0,0 +1,138 @@
     7.4 +package cz.frantovo.postak;
     7.5 +
     7.6 +import java.util.ArrayList;
     7.7 +import java.util.Collection;
     7.8 +import java.util.logging.Level;
     7.9 +import java.util.logging.Logger;
    7.10 +import javax.mail.internet.InternetAddress;
    7.11 +
    7.12 +/**
    7.13 + * Hromadná zpráva. Umí se rozdělit i na více dílčích zpráv,
    7.14 + * které se vejdou do limitu příjemců SMTP serveru.
    7.15 + * @author fiki
    7.16 + */
    7.17 +public class HromadnaZprava implements Cloneable {
    7.18 +
    7.19 +    private static Logger log = Logger.getLogger(HromadnaZprava.class.getName());
    7.20 +    /** Předmět zprávy */
    7.21 +    private String predmet;
    7.22 +    /** Adresa a případně jméno odesílatele */
    7.23 +    private InternetAddress odesilatel;
    7.24 +    /** Zda má být zpráva odeslána jako HTML nebo prostý text */
    7.25 +    private boolean formatHTML = false;
    7.26 +    /** Tělo zprávy - prostý text */
    7.27 +    private String text;
    7.28 +    /** Všichni příjemci této zprávy */
    7.29 +    private ArrayList<InternetAddressKomu> prijemci = new ArrayList<InternetAddressKomu>();
    7.30 +    /** Hlavička Reply-to */
    7.31 +    private InternetAddress odpovedetKomu;
    7.32 +
    7.33 +    public String getPredmet() {
    7.34 +        return predmet;
    7.35 +    }
    7.36 +
    7.37 +    public void setPredmet(String predmet) {
    7.38 +        this.predmet = predmet;
    7.39 +    }
    7.40 +
    7.41 +    public InternetAddress getOdesilatel() {
    7.42 +        return odesilatel;
    7.43 +    }
    7.44 +
    7.45 +    public void setOdesilatel(InternetAddress odesilatel) {
    7.46 +        this.odesilatel = odesilatel;
    7.47 +    }
    7.48 +
    7.49 +    public String getText() {
    7.50 +        return text;
    7.51 +    }
    7.52 +
    7.53 +    public void setText(String text) {
    7.54 +        this.text = text;
    7.55 +    }
    7.56 +
    7.57 +    public ArrayList<InternetAddressKomu> getPrijemci() {
    7.58 +        return prijemci;
    7.59 +    }
    7.60 +
    7.61 +    /** 
    7.62 +     * @param prijemci pokud je null, nastaví prázdná kolekce.
    7.63 +     */
    7.64 +    public void setPrijemci(ArrayList<InternetAddressKomu> prijemci) {
    7.65 +        this.prijemci = new ArrayList<InternetAddressKomu>();
    7.66 +        pridejPrijemce(prijemci);
    7.67 +    }
    7.68 +
    7.69 +    public void pridejPrijemce(Collection<InternetAddressKomu> prijemci) {
    7.70 +        if (prijemci == null) {
    7.71 +            log.log(Level.FINER, "Prázdná množina příjemců - nic nepřidáme");
    7.72 +        } else {
    7.73 +            this.prijemci.addAll(prijemci);
    7.74 +        }
    7.75 +    }
    7.76 +
    7.77 +    /**
    7.78 +     * Pokud má zpráva více přijemců, než je limit povolený SMTP serverem,
    7.79 +     * rozdělí se zpráva na více dílčích zpráv.
    7.80 +     * @param limit maximální počet příjemců jedné zprávy (omezení SMTP serveru)
    7.81 +     */
    7.82 +    public Collection<HromadnaZprava> getDilciZpravy(int limit) {
    7.83 +        Collection<HromadnaZprava> zpravy = new ArrayList<HromadnaZprava>();
    7.84 +
    7.85 +        if (limit < getPrijemci().size()) {
    7.86 +            /** Zprávu je potřeba rozdělit */
    7.87 +            try {
    7.88 +                HromadnaZprava dilciZprava = (HromadnaZprava) clone();
    7.89 +                dilciZprava.setPrijemci(null);
    7.90 +
    7.91 +                ArrayList<InternetAddressKomu> vsichniPrijemci = getPrijemci();
    7.92 +                for (InternetAddressKomu prijemce : vsichniPrijemci) {
    7.93 +                    dilciZprava.getPrijemci().add(prijemce);
    7.94 +
    7.95 +                    if (dilciZprava.getPrijemci().size() == limit) {
    7.96 +                        zpravy.add(dilciZprava);
    7.97 +                        dilciZprava = (HromadnaZprava) clone();
    7.98 +                        dilciZprava.setPrijemci(null);
    7.99 +                    }
   7.100 +                }
   7.101 +
   7.102 +                if (dilciZprava.getPrijemci().size() > 0) {
   7.103 +                    /**
   7.104 +                     * Počet příjemců není násobkem limitu,
   7.105 +                     * takže nakonci ještě někteří zbyli.
   7.106 +                     * Z nich budou příjemci pro poslední dílčí zprávu.
   7.107 +                     */
   7.108 +                    zpravy.add(dilciZprava);
   7.109 +                }
   7.110 +
   7.111 +
   7.112 +            } catch (CloneNotSupportedException ex) {
   7.113 +                /** Tohle by nikdy nemělo nastat */
   7.114 +                log.log(Level.SEVERE, "Hromandou zprávu se nepodařilo naklonovat - divné.", ex);
   7.115 +                zpravy.add(this);
   7.116 +            }
   7.117 +        } else {
   7.118 +            /** Zprávu má málo příjemců - můžeme ji odeslat najednou */
   7.119 +            zpravy.add(this);
   7.120 +        }
   7.121 +
   7.122 +        return zpravy;
   7.123 +    }
   7.124 +
   7.125 +    public boolean isFormatHTML() {
   7.126 +        return formatHTML;
   7.127 +    }
   7.128 +
   7.129 +    public void setFormatHTML(boolean formatHTML) {
   7.130 +        this.formatHTML = formatHTML;
   7.131 +    }
   7.132 +
   7.133 +    public InternetAddress getOdpovedetKomu() {
   7.134 +        return odpovedetKomu;
   7.135 +    }
   7.136 +
   7.137 +    /** Pokud je null, hlavička Reply-to se v e-mailu vůbec nenastaví. */
   7.138 +    public void setOdpovedetKomu(InternetAddress odpovedetKomu) {
   7.139 +        this.odpovedetKomu = odpovedetKomu;
   7.140 +    }
   7.141 +}
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/java/Postak/src/cz/frantovo/postak/InternetAddressKomu.java	Sun Nov 23 22:19:20 2008 +0100
     8.3 @@ -0,0 +1,54 @@
     8.4 +package cz.frantovo.postak;
     8.5 +
     8.6 +import java.io.UnsupportedEncodingException;
     8.7 +import javax.mail.Message.RecipientType;
     8.8 +import javax.mail.internet.InternetAddress;
     8.9 +
    8.10 +/**
    8.11 + * Rozšíření InternetAddress tak, aby obsahovala i informaci o typu příjemce: komu, kopie, skrytá
    8.12 + * @author fiki
    8.13 + */
    8.14 +public class InternetAddressKomu extends InternetAddress {
    8.15 +
    8.16 +    private RecipientType typ = RecipientType.BCC;
    8.17 +
    8.18 +    /**
    8.19 +     * Typ příjemce: komu, kopie, skrytý.
    8.20 +     * Výchozí hodnota je BCC
    8.21 +     */
    8.22 +    public RecipientType getTyp() {
    8.23 +        return typ;
    8.24 +    }
    8.25 +
    8.26 +    /**
    8.27 +     * Typ příjemce: komu, kopie, skrytý.
    8.28 +     * Výchozí hodnota je BCC
    8.29 +     */
    8.30 +    public void setTyp(RecipientType typ) {
    8.31 +        this.typ = typ;
    8.32 +    }
    8.33 +
    8.34 +    @Override
    8.35 +    public String getPersonal() {
    8.36 +        String sup = super.getPersonal();
    8.37 +        if (sup == null || sup.length() < 1) {
    8.38 +            return getAddress();
    8.39 +        } else {
    8.40 +            return sup;
    8.41 +        }
    8.42 +    }
    8.43 +
    8.44 +    public InternetAddressKomu() {
    8.45 +        super();
    8.46 +    }
    8.47 +
    8.48 +    /** Výchozí typ příjemce: skrytá kopie */
    8.49 +    public InternetAddressKomu(String adresa, String jmeno) throws UnsupportedEncodingException {
    8.50 +        super(adresa, jmeno);
    8.51 +    }
    8.52 +
    8.53 +    public InternetAddressKomu(String adresa, String jmeno, RecipientType typ) throws UnsupportedEncodingException {
    8.54 +        super(adresa, jmeno);
    8.55 +        setTyp(typ);
    8.56 +    }
    8.57 +}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/java/Postak/src/cz/frantovo/postak/Nastaveni.java	Sun Nov 23 22:19:20 2008 +0100
     9.3 @@ -0,0 +1,114 @@
     9.4 +/*
     9.5 + * To change this template, choose Tools | Templates
     9.6 + * and open the template in the editor.
     9.7 + */
     9.8 +
     9.9 +package cz.frantovo.postak;
    9.10 +
    9.11 +import java.util.ArrayList;
    9.12 +
    9.13 +/**
    9.14 + *
    9.15 + * @author fiki
    9.16 + */
    9.17 +public class Nastaveni {
    9.18 +    
    9.19 +    private String postovniServer = "localhost";
    9.20 +    private int postovniPort = 25;
    9.21 +    private String postovniJmeno;
    9.22 +    private char[] postovniHeslo;
    9.23 +    private int limitZprav = 1000;
    9.24 +    
    9.25 +    /** Připojovací řetězec */
    9.26 +    private String databaze;
    9.27 +    private String dbJmeno;
    9.28 +    private char[] dbHeslo;
    9.29 +    
    9.30 +    /** Výchozí příjemci */
    9.31 +    private ArrayList<InternetAddressKomu> vychoziPrijemci;
    9.32 +    
    9.33 +    /** Přejatá konstanta od SuperPošťáka */
    9.34 +    private String cestaKCertifikatum;
    9.35 +
    9.36 +    public String getCestaKCertifikatum() {
    9.37 +        return cestaKCertifikatum;
    9.38 +    }
    9.39 +
    9.40 +    public void setCestaKCertifikatum(String cestaKCertifikatum) {
    9.41 +        this.cestaKCertifikatum = cestaKCertifikatum;
    9.42 +    }
    9.43 +
    9.44 +    public String getPostovniServer() {
    9.45 +        return postovniServer;
    9.46 +    }
    9.47 +
    9.48 +    public void setPostovniServer(String postovniServer) {
    9.49 +        this.postovniServer = postovniServer;
    9.50 +    }
    9.51 +
    9.52 +    public int getPostovniPort() {
    9.53 +        return postovniPort;
    9.54 +    }
    9.55 +
    9.56 +    public void setPostovniPort(int postovniPort) {
    9.57 +        this.postovniPort = postovniPort;
    9.58 +    }
    9.59 +
    9.60 +    public String getPostovniJmeno() {
    9.61 +        return postovniJmeno;
    9.62 +    }
    9.63 +
    9.64 +    public void setPostovniJmeno(String postovniJmeno) {
    9.65 +        this.postovniJmeno = postovniJmeno;
    9.66 +    }
    9.67 +
    9.68 +    public char[] getPostovniHeslo() {
    9.69 +        return postovniHeslo;
    9.70 +    }
    9.71 +
    9.72 +    public void setPostovniHeslo(char[] postovniHeslo) {
    9.73 +        this.postovniHeslo = postovniHeslo;
    9.74 +    }
    9.75 +
    9.76 +    public int getLimitZprav() {
    9.77 +        return limitZprav;
    9.78 +    }
    9.79 +
    9.80 +    public void setLimitZprav(int limitZprav) {
    9.81 +        this.limitZprav = limitZprav;
    9.82 +    }
    9.83 +
    9.84 +    public String getDatabaze() {
    9.85 +        return databaze;
    9.86 +    }
    9.87 +
    9.88 +    public String getDbJmeno() {
    9.89 +        return dbJmeno;
    9.90 +    }
    9.91 +
    9.92 +    public char[] getDbHeslo() {
    9.93 +        return dbHeslo;
    9.94 +    }
    9.95 +
    9.96 +    public ArrayList<InternetAddressKomu> getVychoziPrijemci() {
    9.97 +        return vychoziPrijemci;
    9.98 +    }
    9.99 +
   9.100 +    public void setDatabaze(String databaze) {
   9.101 +        this.databaze = databaze;
   9.102 +    }
   9.103 +
   9.104 +    public void setDbJmeno(String dbJmeno) {
   9.105 +        this.dbJmeno = dbJmeno;
   9.106 +    }
   9.107 +
   9.108 +    public void setDbHeslo(char[] dbHeslo) {
   9.109 +        this.dbHeslo = dbHeslo;
   9.110 +    }
   9.111 +
   9.112 +    public void setVychoziPrijemci(ArrayList<InternetAddressKomu> vychoziPrijemci) {
   9.113 +        this.vychoziPrijemci = vychoziPrijemci;
   9.114 +    }
   9.115 +    
   9.116 +
   9.117 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/java/Postak/src/cz/frantovo/postak/Postak.java	Sun Nov 23 22:19:20 2008 +0100
    10.3 @@ -0,0 +1,221 @@
    10.4 +package cz.frantovo.postak;
    10.5 +
    10.6 +import java.io.File;
    10.7 +import java.util.ArrayList;
    10.8 +import java.util.Collection;
    10.9 +import java.util.Properties;
   10.10 +import java.util.logging.Level;
   10.11 +import java.util.logging.Logger;
   10.12 +import java.util.regex.Pattern;
   10.13 +import javax.mail.Address;
   10.14 +import javax.mail.Authenticator;
   10.15 +import javax.mail.MessagingException;
   10.16 +import javax.mail.PasswordAuthentication;
   10.17 +import javax.mail.Session;
   10.18 +import javax.mail.Transport;
   10.19 +import javax.mail.internet.MimeMessage;
   10.20 +
   10.21 +/**
   10.22 + * Odešle hromadnou zprávu pomocí SMTP.
   10.23 + * 
   10.24 + * @author fiki
   10.25 + */
   10.26 +public class Postak {   
   10.27 +    
   10.28 +    private static Logger log = Logger.getLogger(Postak.class.getName());
   10.29 +    /** Regulární výraz pro správnou e-mailovou adresu */
   10.30 +    private static String REGULARNI_EMAIL = "^[_a-zA-Z0-9\\.\\-]+@[_a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,4}$";
   10.31 +    
   10.32 +    private Nastaveni nastaveni;
   10.33 +
   10.34 +    public Postak(Nastaveni nastaveni) {
   10.35 +        this.nastaveni = nastaveni;
   10.36 +    }
   10.37 +
   10.38 +    public void setNastaveni(Nastaveni nastaveni) {
   10.39 +        this.nastaveni = nastaveni;
   10.40 +    }
   10.41 +
   10.42 +    /** 
   10.43 +     * Nízkoúrovňová odesílací metoda, která už nekontroluje limit příjemců.
   10.44 +     * Pokud se nevejdou do limitu SMTP serveru, vyhazuje výjimku.
   10.45 +     * 
   10.46 +     * TODO: lepší to bude nestaické - nastavení si vyžádat v konstruktoru
   10.47 +     */
   10.48 +    private void odesliSMTP(HromadnaZprava zprava) throws MessagingException {
   10.49 +
   10.50 +        if (zkontrolujZpravu(zprava) && zkontrolujNastaveni(nastaveni)) {
   10.51 +
   10.52 +            /** Inicializace SMTP */
   10.53 +            Properties smtpVlastnosti = System.getProperties();
   10.54 +            smtpVlastnosti.put("mail.smtp.host", nastaveni.getPostovniServer());
   10.55 +            smtpVlastnosti.put("mail.smtp.port", String.valueOf(nastaveni.getPostovniPort()));
   10.56 +
   10.57 +            if (nastaveni.getPostovniPort() == 465) {
   10.58 +                if (new File(nastaveni.getCestaKCertifikatum()).exists()) {
   10.59 +                    System.setProperty("javax.net.ssl.trustStore", nastaveni.getCestaKCertifikatum());
   10.60 +                    log.log(Level.INFO, "Používám vlastní důvěryhodné certifikáty: " + nastaveni.getCestaKCertifikatum());
   10.61 +                }
   10.62 +                /** TODO: neřídit se číslem portu, ale přidat příznak pro šifrování */
   10.63 +                smtpVlastnosti.put("mail.smtp.starttls.enable", "true");
   10.64 +                smtpVlastnosti.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
   10.65 +                smtpVlastnosti.put("mail.smtp.socketFactory.port", String.valueOf(nastaveni.getPostovniPort()));
   10.66 +                smtpVlastnosti.put("mail.smtp.socketFactory.fallback", "false");
   10.67 +            /**
   10.68 +             * NAHRÁNÍ CERTIFIKÁTU:
   10.69 +             * 1) stáhneme si certifikát (---BEGIN CERTIFICATE---) a uložíme do vse_ca.cer             
   10.70 +             * 2) keytool -importcert -file vse_ca.cer -keystore DuveryhodneCertifikaty.keystore -storepass "changeit"
   10.71 +             * Pokud daný soubor existuje, program ho používá, pokud ne, používá certifikáty uložené v systému (Javovské).
   10.72 +             */
   10.73 +            }
   10.74 +
   10.75 +            PostakuvHeslovnik heslovnik = new PostakuvHeslovnik();
   10.76 +            if (nastaveni.getPostovniJmeno() != null && nastaveni.getPostovniJmeno().length() > 0) {
   10.77 +                heslovnik.setJmenoHeslo(nastaveni.getPostovniJmeno(), nastaveni.getPostovniHeslo());
   10.78 +                smtpVlastnosti.put("mail.smtp.auth", "true");
   10.79 +                log.log(Level.FINEST, "Používám pro SMTP jméno a heslo");
   10.80 +            }
   10.81 +
   10.82 +            Session smtpRelace = Session.getInstance(smtpVlastnosti, heslovnik);
   10.83 +
   10.84 +            smtpRelace.setDebug(true);
   10.85 +            smtpRelace.setDebugOut(System.out);
   10.86 +
   10.87 +            /** Sestavení zprávy */
   10.88 +            MimeMessage mimeZprava = new MimeMessage(smtpRelace);
   10.89 +            mimeZprava.setFrom(zprava.getOdesilatel());
   10.90 +            if (zprava.getOdpovedetKomu() != null) {
   10.91 +                Address[] odpovedetKomu = {zprava.getOdpovedetKomu()};
   10.92 +                mimeZprava.setReplyTo(odpovedetKomu);
   10.93 +            }
   10.94 +            naplnPrijemce(mimeZprava, zprava);
   10.95 +            mimeZprava.setSubject(zprava.getPredmet());
   10.96 +            mimeZprava.setHeader("User-Agent", "http://frantovo.cz/projekty/SuperPostak/");
   10.97 +            if (zprava.isFormatHTML()) {
   10.98 +                mimeZprava.setText(zprava.getText(), "UTF-8", "html");
   10.99 +            } else {
  10.100 +                mimeZprava.setText(zprava.getText(), "UTF-8");
  10.101 +            }
  10.102 +
  10.103 +            /** Vlastní odeslání */
  10.104 +            Transport.send(mimeZprava);
  10.105 +
  10.106 +        } else {
  10.107 +            MessagingException e = new MessagingException("Zpráva nebo nastavení jsou nevyhovující");
  10.108 +            log.log(Level.SEVERE, null, e);
  10.109 +            throw e;
  10.110 +        }
  10.111 +
  10.112 +    }
  10.113 +
  10.114 +    /**
  10.115 +     * Nastaví zprávě (MimeMessage) všechny příjemce, které najde ve zprávě a nastavení.
  10.116 +     * Respektuje typy příjemců: komu, kopie, skrytá kopie.    
  10.117 +     */
  10.118 +    private static void naplnPrijemce(MimeMessage mimeZprava, HromadnaZprava zprava) throws MessagingException {
  10.119 +        /** 
  10.120 +         * Příjemci se budou definovat pouze ve zprávě.
  10.121 +         * Z nastavení se brát nebudou (výchozí příjemci už ve zprávě budou).
  10.122 +         */
  10.123 +        ArrayList<InternetAddressKomu> prijemci = zprava.getPrijemci();
  10.124 +        for (InternetAddressKomu komu : prijemci) {
  10.125 +            if (zkontrolujAdresu(komu)) {
  10.126 +                mimeZprava.addRecipient(komu.getTyp(), komu);
  10.127 +            }
  10.128 +        }
  10.129 +    }
  10.130 +
  10.131 +    /** Vypíše do logu seznam příjemců */
  10.132 +    public static void vypisPrijemce(Collection<InternetAddressKomu> prijemci) {
  10.133 +        for (InternetAddressKomu p : prijemci) {
  10.134 +            log.log(Level.INFO, p.toString());
  10.135 +        }
  10.136 +    }
  10.137 +
  10.138 +    /** Veřejná odesílací metoda.
  10.139 +     * Postará se o rozdělení zpráv na dílčí (které se vejdou do limitu příjemců)
  10.140 +     */
  10.141 +    public void odesli(HromadnaZprava zprava) throws MessagingException {
  10.142 +        Collection<HromadnaZprava> zpravy = zprava.getDilciZpravy(nastaveni.getLimitZprav());
  10.143 +
  10.144 +        for (HromadnaZprava dilciZprava : zpravy) {
  10.145 +            odesliSMTP(dilciZprava);
  10.146 +        }
  10.147 +    }
  10.148 +
  10.149 +    private static boolean zkontrolujAdresu(InternetAddressKomu a) {
  10.150 +        if (a.getTyp() == null) {
  10.151 +            log.log(Level.WARNING, "Neplatná adresa (typ): " + a.getAddress());
  10.152 +            return false;
  10.153 +        }
  10.154 +
  10.155 +        if (a.getAddress() == null || a.getAddress().length() < 1) {
  10.156 +            log.log(Level.WARNING, "Neplatná adresa (address): " + a.getPersonal());
  10.157 +            return false;
  10.158 +        }
  10.159 +
  10.160 +        if (!zkontrolujAdresu(a.getAddress())) {
  10.161 +            log.log(Level.WARNING, "Adresa nevyhovuje regulárnímu výrazu: " + a.getAddress());
  10.162 +            return false;
  10.163 +        }
  10.164 +
  10.165 +        return true;
  10.166 +    }
  10.167 +
  10.168 +    /** Zkontroluje e-mailovou adresu pomocí regulárního výrazu. */
  10.169 +    public static boolean zkontrolujAdresu(String adresa) {
  10.170 +        return adresa != null && Pattern.matches(REGULARNI_EMAIL, adresa);
  10.171 +    }
  10.172 +
  10.173 +    /** @return  Vrací true, pokud je zpráva v pořádku */
  10.174 +    private static boolean zkontrolujZpravu(HromadnaZprava z) {
  10.175 +
  10.176 +        if (z.getPrijemci() == null) {
  10.177 +            log.log(Level.WARNING, "getPrijemci() == null");
  10.178 +            return false;
  10.179 +        }
  10.180 +
  10.181 +        if (z.getPrijemci().size() < 1) {
  10.182 +            log.log(Level.WARNING, "getPrijemci().size() < 1");
  10.183 +            return false;
  10.184 +        }
  10.185 +
  10.186 +        if (z.getOdesilatel() == null) {
  10.187 +            log.log(Level.WARNING, "getOdesilatel() == null");
  10.188 +            return false;
  10.189 +        }
  10.190 +
  10.191 +        if (z.getPredmet() == null) {
  10.192 +            log.log(Level.WARNING, "getPredmet() == null");
  10.193 +            return false;
  10.194 +        }
  10.195 +
  10.196 +        return true;
  10.197 +    }
  10.198 +
  10.199 +    private static boolean zkontrolujNastaveni(Nastaveni n) {
  10.200 +
  10.201 +        if (n.getPostovniServer() == null || n.getPostovniServer().length() < 1) {
  10.202 +            return false;
  10.203 +        }
  10.204 +
  10.205 +        return true;
  10.206 +    }
  10.207 +
  10.208 +    /** Slouží k uložení jména a hesla pro SMTP */
  10.209 +    private static class PostakuvHeslovnik extends Authenticator {
  10.210 +
  10.211 +        private String jmeno = "user";
  10.212 +        private char[] heslo = "luser".toCharArray();
  10.213 +
  10.214 +        @Override
  10.215 +        public PasswordAuthentication getPasswordAuthentication() {
  10.216 +            return new PasswordAuthentication(jmeno, String.valueOf(heslo));
  10.217 +        }
  10.218 +
  10.219 +        public void setJmenoHeslo(String jmeno, char[] heslo) {
  10.220 +            this.jmeno = jmeno;
  10.221 +            this.heslo = heslo;
  10.222 +        }
  10.223 +    }
  10.224 +}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/java/SuperPostak/manifest.mf	Sun Nov 23 22:19:20 2008 +0100
    11.3 @@ -0,0 +1,3 @@
    11.4 +Manifest-Version: 1.0
    11.5 +X-COMMENT: Main-Class will be added automatically by build
    11.6 +
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/java/SuperPostak/master.jnlp	Sun Nov 23 22:19:20 2008 +0100
    12.3 @@ -0,0 +1,21 @@
    12.4 +<?xml version="1.0" encoding="UTF-8"?>
    12.5 +<jnlp spec="1.0+" codebase="${jnlp.codebase}" href="launch.jnlp">
    12.6 +    <information>
    12.7 +        <title>${APPLICATION.TITLE}</title>
    12.8 +        <vendor>${APPLICATION.VENDOR}</vendor>
    12.9 +        <description>${APPLICATION.DESC}</description>
   12.10 +        <description kind="short">${APPLICATION.DESC.SHORT}</description>
   12.11 +        <homepage href="${APPLICATION.HOMEPAGE}"/>
   12.12 +<!--${JNLP.ICONS}-->
   12.13 +<!--${JNLP.OFFLINE.ALLOWED}-->
   12.14 +    </information>
   12.15 +<!--${JNLP.SECURITY}-->
   12.16 +    <resources>
   12.17 +<!--${JNLP.RESOURCES.RUNTIME}-->
   12.18 +<!--${JNLP.RESOURCES.MAIN.JAR}-->
   12.19 +<!--${JNLP.RESOURCES.JARS}-->
   12.20 +    </resources>
   12.21 +    <application-desc main-class="${jnlp.main.class}">
   12.22 +<!--${JNLP.APPLICATION.ARGS}-->
   12.23 +    </application-desc>
   12.24 +</jnlp>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/java/SuperPostak/nbproject/build-impl.xml	Sun Nov 23 22:19:20 2008 +0100
    13.3 @@ -0,0 +1,636 @@
    13.4 +<?xml version="1.0" encoding="UTF-8"?>
    13.5 +<!--
    13.6 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
    13.7 +***         EDIT ../build.xml INSTEAD         ***
    13.8 +
    13.9 +For the purpose of easier reading the script
   13.10 +is divided into following sections:
   13.11 +
   13.12 +  - initialization
   13.13 +  - compilation
   13.14 +  - jar
   13.15 +  - execution
   13.16 +  - debugging
   13.17 +  - javadoc
   13.18 +  - junit compilation
   13.19 +  - junit execution
   13.20 +  - junit debugging
   13.21 +  - applet
   13.22 +  - cleanup
   13.23 +
   13.24 +        -->
   13.25 +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="SuperPostak-impl">
   13.26 +    <import file="jnlp-impl.xml"/>
   13.27 +    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
   13.28 +    <!-- 
   13.29 +                ======================
   13.30 +                INITIALIZATION SECTION 
   13.31 +                ======================
   13.32 +            -->
   13.33 +    <target name="-pre-init">
   13.34 +        <!-- Empty placeholder for easier customization. -->
   13.35 +        <!-- You can override this target in the ../build.xml file. -->
   13.36 +    </target>
   13.37 +    <target depends="-pre-init" name="-init-private">
   13.38 +        <property file="nbproject/private/config.properties"/>
   13.39 +        <property file="nbproject/private/configs/${config}.properties"/>
   13.40 +        <property file="nbproject/private/private.properties"/>
   13.41 +    </target>
   13.42 +    <target depends="-pre-init,-init-private" name="-init-user">
   13.43 +        <property file="${user.properties.file}"/>
   13.44 +        <!-- The two properties below are usually overridden -->
   13.45 +        <!-- by the active platform. Just a fallback. -->
   13.46 +        <property name="default.javac.source" value="1.4"/>
   13.47 +        <property name="default.javac.target" value="1.4"/>
   13.48 +    </target>
   13.49 +    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
   13.50 +        <property file="nbproject/configs/${config}.properties"/>
   13.51 +        <property file="nbproject/project.properties"/>
   13.52 +    </target>
   13.53 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
   13.54 +        <available file="${manifest.file}" property="manifest.available"/>
   13.55 +        <condition property="manifest.available+main.class">
   13.56 +            <and>
   13.57 +                <isset property="manifest.available"/>
   13.58 +                <isset property="main.class"/>
   13.59 +                <not>
   13.60 +                    <equals arg1="${main.class}" arg2="" trim="true"/>
   13.61 +                </not>
   13.62 +            </and>
   13.63 +        </condition>
   13.64 +        <condition property="manifest.available+main.class+mkdist.available">
   13.65 +            <and>
   13.66 +                <istrue value="${manifest.available+main.class}"/>
   13.67 +                <isset property="libs.CopyLibs.classpath"/>
   13.68 +            </and>
   13.69 +        </condition>
   13.70 +        <condition property="have.tests">
   13.71 +            <or>
   13.72 +                <available file="${test.src.dir}"/>
   13.73 +            </or>
   13.74 +        </condition>
   13.75 +        <condition property="have.sources">
   13.76 +            <or>
   13.77 +                <available file="${src.dir}"/>
   13.78 +            </or>
   13.79 +        </condition>
   13.80 +        <condition property="netbeans.home+have.tests">
   13.81 +            <and>
   13.82 +                <isset property="netbeans.home"/>
   13.83 +                <isset property="have.tests"/>
   13.84 +            </and>
   13.85 +        </condition>
   13.86 +        <condition property="no.javadoc.preview">
   13.87 +            <and>
   13.88 +                <isset property="javadoc.preview"/>
   13.89 +                <isfalse value="${javadoc.preview}"/>
   13.90 +            </and>
   13.91 +        </condition>
   13.92 +        <property name="run.jvmargs" value=""/>
   13.93 +        <property name="javac.compilerargs" value=""/>
   13.94 +        <property name="work.dir" value="${basedir}"/>
   13.95 +        <condition property="no.deps">
   13.96 +            <and>
   13.97 +                <istrue value="${no.dependencies}"/>
   13.98 +            </and>
   13.99 +        </condition>
  13.100 +        <property name="javac.debug" value="true"/>
  13.101 +        <property name="javadoc.preview" value="true"/>
  13.102 +        <property name="application.args" value=""/>
  13.103 +        <property name="source.encoding" value="${file.encoding}"/>
  13.104 +        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  13.105 +            <and>
  13.106 +                <isset property="javadoc.encoding"/>
  13.107 +                <not>
  13.108 +                    <equals arg1="${javadoc.encoding}" arg2=""/>
  13.109 +                </not>
  13.110 +            </and>
  13.111 +        </condition>
  13.112 +        <property name="javadoc.encoding.used" value="${source.encoding}"/>
  13.113 +        <property name="includes" value="**"/>
  13.114 +        <property name="excludes" value=""/>
  13.115 +        <property name="do.depend" value="false"/>
  13.116 +        <condition property="do.depend.true">
  13.117 +            <istrue value="${do.depend}"/>
  13.118 +        </condition>
  13.119 +        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
  13.120 +            <and>
  13.121 +                <isset property="jaxws.endorsed.dir"/>
  13.122 +                <available file="nbproject/jaxws-build.xml"/>
  13.123 +            </and>
  13.124 +        </condition>
  13.125 +    </target>
  13.126 +    <target name="-post-init">
  13.127 +        <!-- Empty placeholder for easier customization. -->
  13.128 +        <!-- You can override this target in the ../build.xml file. -->
  13.129 +    </target>
  13.130 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  13.131 +        <fail unless="src.dir">Must set src.dir</fail>
  13.132 +        <fail unless="test.src.dir">Must set test.src.dir</fail>
  13.133 +        <fail unless="build.dir">Must set build.dir</fail>
  13.134 +        <fail unless="dist.dir">Must set dist.dir</fail>
  13.135 +        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  13.136 +        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  13.137 +        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  13.138 +        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  13.139 +        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  13.140 +        <fail unless="dist.jar">Must set dist.jar</fail>
  13.141 +    </target>
  13.142 +    <target name="-init-macrodef-property">
  13.143 +        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  13.144 +            <attribute name="name"/>
  13.145 +            <attribute name="value"/>
  13.146 +            <sequential>
  13.147 +                <property name="@{name}" value="${@{value}}"/>
  13.148 +            </sequential>
  13.149 +        </macrodef>
  13.150 +    </target>
  13.151 +    <target name="-init-macrodef-javac">
  13.152 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  13.153 +            <attribute default="${src.dir}" name="srcdir"/>
  13.154 +            <attribute default="${build.classes.dir}" name="destdir"/>
  13.155 +            <attribute default="${javac.classpath}" name="classpath"/>
  13.156 +            <attribute default="${includes}" name="includes"/>
  13.157 +            <attribute default="${excludes}" name="excludes"/>
  13.158 +            <attribute default="${javac.debug}" name="debug"/>
  13.159 +            <attribute default="" name="sourcepath"/>
  13.160 +            <element name="customize" optional="true"/>
  13.161 +            <sequential>
  13.162 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
  13.163 +                    <classpath>
  13.164 +                        <path path="@{classpath}"/>
  13.165 +                    </classpath>
  13.166 +                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
  13.167 +                    <customize/>
  13.168 +                </javac>
  13.169 +            </sequential>
  13.170 +        </macrodef>
  13.171 +        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  13.172 +            <attribute default="${src.dir}" name="srcdir"/>
  13.173 +            <attribute default="${build.classes.dir}" name="destdir"/>
  13.174 +            <attribute default="${javac.classpath}" name="classpath"/>
  13.175 +            <sequential>
  13.176 +                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  13.177 +                    <classpath>
  13.178 +                        <path path="@{classpath}"/>
  13.179 +                    </classpath>
  13.180 +                </depend>
  13.181 +            </sequential>
  13.182 +        </macrodef>
  13.183 +        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  13.184 +            <attribute default="${build.classes.dir}" name="destdir"/>
  13.185 +            <sequential>
  13.186 +                <fail unless="javac.includes">Must set javac.includes</fail>
  13.187 +                <pathconvert pathsep="," property="javac.includes.binary">
  13.188 +                    <path>
  13.189 +                        <filelist dir="@{destdir}" files="${javac.includes}"/>
  13.190 +                    </path>
  13.191 +                    <globmapper from="*.java" to="*.class"/>
  13.192 +                </pathconvert>
  13.193 +                <delete>
  13.194 +                    <files includes="${javac.includes.binary}"/>
  13.195 +                </delete>
  13.196 +            </sequential>
  13.197 +        </macrodef>
  13.198 +    </target>
  13.199 +    <target name="-init-macrodef-junit">
  13.200 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  13.201 +            <attribute default="${includes}" name="includes"/>
  13.202 +            <attribute default="${excludes}" name="excludes"/>
  13.203 +            <attribute default="**" name="testincludes"/>
  13.204 +            <sequential>
  13.205 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
  13.206 +                    <batchtest todir="${build.test.results.dir}">
  13.207 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  13.208 +                            <filename name="@{testincludes}"/>
  13.209 +                        </fileset>
  13.210 +                    </batchtest>
  13.211 +                    <classpath>
  13.212 +                        <path path="${run.test.classpath}"/>
  13.213 +                    </classpath>
  13.214 +                    <syspropertyset>
  13.215 +                        <propertyref prefix="test-sys-prop."/>
  13.216 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
  13.217 +                    </syspropertyset>
  13.218 +                    <formatter type="brief" usefile="false"/>
  13.219 +                    <formatter type="xml"/>
  13.220 +                    <jvmarg line="${run.jvmargs}"/>
  13.221 +                </junit>
  13.222 +            </sequential>
  13.223 +        </macrodef>
  13.224 +    </target>
  13.225 +    <target name="-init-macrodef-nbjpda">
  13.226 +        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  13.227 +            <attribute default="${main.class}" name="name"/>
  13.228 +            <attribute default="${debug.classpath}" name="classpath"/>
  13.229 +            <attribute default="" name="stopclassname"/>
  13.230 +            <sequential>
  13.231 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
  13.232 +                    <classpath>
  13.233 +                        <path path="@{classpath}"/>
  13.234 +                    </classpath>
  13.235 +                </nbjpdastart>
  13.236 +            </sequential>
  13.237 +        </macrodef>
  13.238 +        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  13.239 +            <attribute default="${build.classes.dir}" name="dir"/>
  13.240 +            <sequential>
  13.241 +                <nbjpdareload>
  13.242 +                    <fileset dir="@{dir}" includes="${fix.classes}">
  13.243 +                        <include name="${fix.includes}*.class"/>
  13.244 +                    </fileset>
  13.245 +                </nbjpdareload>
  13.246 +            </sequential>
  13.247 +        </macrodef>
  13.248 +    </target>
  13.249 +    <target name="-init-debug-args">
  13.250 +        <property name="version-output" value="java version &quot;${ant.java.version}"/>
  13.251 +        <condition property="have-jdk-older-than-1.4">
  13.252 +            <or>
  13.253 +                <contains string="${version-output}" substring="java version &quot;1.0"/>
  13.254 +                <contains string="${version-output}" substring="java version &quot;1.1"/>
  13.255 +                <contains string="${version-output}" substring="java version &quot;1.2"/>
  13.256 +                <contains string="${version-output}" substring="java version &quot;1.3"/>
  13.257 +            </or>
  13.258 +        </condition>
  13.259 +        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  13.260 +            <istrue value="${have-jdk-older-than-1.4}"/>
  13.261 +        </condition>
  13.262 +    </target>
  13.263 +    <target depends="-init-debug-args" name="-init-macrodef-debug">
  13.264 +        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  13.265 +            <attribute default="${main.class}" name="classname"/>
  13.266 +            <attribute default="${debug.classpath}" name="classpath"/>
  13.267 +            <element name="customize" optional="true"/>
  13.268 +            <sequential>
  13.269 +                <java classname="@{classname}" dir="${work.dir}" fork="true">
  13.270 +                    <jvmarg line="${debug-args-line}"/>
  13.271 +                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
  13.272 +                    <jvmarg line="${run.jvmargs}"/>
  13.273 +                    <classpath>
  13.274 +                        <path path="@{classpath}"/>
  13.275 +                    </classpath>
  13.276 +                    <syspropertyset>
  13.277 +                        <propertyref prefix="run-sys-prop."/>
  13.278 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
  13.279 +                    </syspropertyset>
  13.280 +                    <customize/>
  13.281 +                </java>
  13.282 +            </sequential>
  13.283 +        </macrodef>
  13.284 +    </target>
  13.285 +    <target name="-init-macrodef-java">
  13.286 +        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  13.287 +            <attribute default="${main.class}" name="classname"/>
  13.288 +            <element name="customize" optional="true"/>
  13.289 +            <sequential>
  13.290 +                <java classname="@{classname}" dir="${work.dir}" fork="true">
  13.291 +                    <jvmarg line="${run.jvmargs}"/>
  13.292 +                    <classpath>
  13.293 +                        <path path="${run.classpath}"/>
  13.294 +                    </classpath>
  13.295 +                    <syspropertyset>
  13.296 +                        <propertyref prefix="run-sys-prop."/>
  13.297 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
  13.298 +                    </syspropertyset>
  13.299 +                    <customize/>
  13.300 +                </java>
  13.301 +            </sequential>
  13.302 +        </macrodef>
  13.303 +    </target>
  13.304 +    <target name="-init-presetdef-jar">
  13.305 +        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  13.306 +            <jar compress="${jar.compress}" jarfile="${dist.jar}">
  13.307 +                <j2seproject1:fileset dir="${build.classes.dir}"/>
  13.308 +            </jar>
  13.309 +        </presetdef>
  13.310 +    </target>
  13.311 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
  13.312 +    <!--
  13.313 +                ===================
  13.314 +                COMPILATION SECTION
  13.315 +                ===================
  13.316 +            -->
  13.317 +    <target depends="init" name="deps-jar" unless="no.deps">
  13.318 +        <ant antfile="${project.JFTable}/build.xml" inheritall="false" target="jar"/>
  13.319 +        <ant antfile="${project.Postak}/build.xml" inheritall="false" target="jar"/>
  13.320 +    </target>
  13.321 +    <target depends="init,deps-jar" name="-pre-pre-compile">
  13.322 +        <mkdir dir="${build.classes.dir}"/>
  13.323 +    </target>
  13.324 +    <target name="-pre-compile">
  13.325 +        <!-- Empty placeholder for easier customization. -->
  13.326 +        <!-- You can override this target in the ../build.xml file. -->
  13.327 +    </target>
  13.328 +    <target if="do.depend.true" name="-compile-depend">
  13.329 +        <j2seproject3:depend/>
  13.330 +    </target>
  13.331 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
  13.332 +        <j2seproject3:javac/>
  13.333 +        <copy todir="${build.classes.dir}">
  13.334 +            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  13.335 +        </copy>
  13.336 +    </target>
  13.337 +    <target name="-post-compile">
  13.338 +        <!-- Empty placeholder for easier customization. -->
  13.339 +        <!-- You can override this target in the ../build.xml file. -->
  13.340 +    </target>
  13.341 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  13.342 +    <target name="-pre-compile-single">
  13.343 +        <!-- Empty placeholder for easier customization. -->
  13.344 +        <!-- You can override this target in the ../build.xml file. -->
  13.345 +    </target>
  13.346 +    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  13.347 +        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  13.348 +        <j2seproject3:force-recompile/>
  13.349 +        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
  13.350 +    </target>
  13.351 +    <target name="-post-compile-single">
  13.352 +        <!-- Empty placeholder for easier customization. -->
  13.353 +        <!-- You can override this target in the ../build.xml file. -->
  13.354 +    </target>
  13.355 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  13.356 +    <!--
  13.357 +                ====================
  13.358 +                JAR BUILDING SECTION
  13.359 +                ====================
  13.360 +            -->
  13.361 +    <target depends="init" name="-pre-pre-jar">
  13.362 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
  13.363 +        <mkdir dir="${dist.jar.dir}"/>
  13.364 +    </target>
  13.365 +    <target name="-pre-jar">
  13.366 +        <!-- Empty placeholder for easier customization. -->
  13.367 +        <!-- You can override this target in the ../build.xml file. -->
  13.368 +    </target>
  13.369 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
  13.370 +        <j2seproject1:jar/>
  13.371 +    </target>
  13.372 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
  13.373 +        <j2seproject1:jar manifest="${manifest.file}"/>
  13.374 +    </target>
  13.375 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
  13.376 +        <j2seproject1:jar manifest="${manifest.file}">
  13.377 +            <j2seproject1:manifest>
  13.378 +                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  13.379 +            </j2seproject1:manifest>
  13.380 +        </j2seproject1:jar>
  13.381 +        <echo>To run this application from the command line without Ant, try:</echo>
  13.382 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  13.383 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
  13.384 +        <pathconvert property="run.classpath.with.dist.jar">
  13.385 +            <path path="${run.classpath}"/>
  13.386 +            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  13.387 +        </pathconvert>
  13.388 +        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  13.389 +    </target>
  13.390 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
  13.391 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  13.392 +        <pathconvert property="run.classpath.without.build.classes.dir">
  13.393 +            <path path="${run.classpath}"/>
  13.394 +            <map from="${build.classes.dir.resolved}" to=""/>
  13.395 +        </pathconvert>
  13.396 +        <pathconvert pathsep=" " property="jar.classpath">
  13.397 +            <path path="${run.classpath.without.build.classes.dir}"/>
  13.398 +            <chainedmapper>
  13.399 +                <flattenmapper/>
  13.400 +                <globmapper from="*" to="lib/*"/>
  13.401 +            </chainedmapper>
  13.402 +        </pathconvert>
  13.403 +        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  13.404 +        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  13.405 +            <fileset dir="${build.classes.dir}"/>
  13.406 +            <manifest>
  13.407 +                <attribute name="Main-Class" value="${main.class}"/>
  13.408 +                <attribute name="Class-Path" value="${jar.classpath}"/>
  13.409 +            </manifest>
  13.410 +        </copylibs>
  13.411 +        <echo>To run this application from the command line without Ant, try:</echo>
  13.412 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
  13.413 +        <echo>java -jar "${dist.jar.resolved}"</echo>
  13.414 +    </target>
  13.415 +    <target name="-post-jar">
  13.416 +        <!-- Empty placeholder for easier customization. -->
  13.417 +        <!-- You can override this target in the ../build.xml file. -->
  13.418 +    </target>
  13.419 +    <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"/>
  13.420 +    <!--
  13.421 +                =================
  13.422 +                EXECUTION SECTION
  13.423 +                =================
  13.424 +            -->
  13.425 +    <target depends="init,compile" description="Run a main class." name="run">
  13.426 +        <j2seproject1:java>
  13.427 +            <customize>
  13.428 +                <arg line="${application.args}"/>
  13.429 +            </customize>
  13.430 +        </j2seproject1:java>
  13.431 +    </target>
  13.432 +    <target name="-do-not-recompile">
  13.433 +        <property name="javac.includes.binary" value=""/>
  13.434 +    </target>
  13.435 +    <target depends="init,-do-not-recompile,compile-single" name="run-single">
  13.436 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  13.437 +        <j2seproject1:java classname="${run.class}"/>
  13.438 +    </target>
  13.439 +    <!--
  13.440 +                =================
  13.441 +                DEBUGGING SECTION
  13.442 +                =================
  13.443 +            -->
  13.444 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  13.445 +        <j2seproject1:nbjpdastart name="${debug.class}"/>
  13.446 +    </target>
  13.447 +    <target depends="init,compile" name="-debug-start-debuggee">
  13.448 +        <j2seproject3:debug>
  13.449 +            <customize>
  13.450 +                <arg line="${application.args}"/>
  13.451 +            </customize>
  13.452 +        </j2seproject3:debug>
  13.453 +    </target>
  13.454 +    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  13.455 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  13.456 +        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  13.457 +    </target>
  13.458 +    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  13.459 +    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  13.460 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  13.461 +        <j2seproject3:debug classname="${debug.class}"/>
  13.462 +    </target>
  13.463 +    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  13.464 +    <target depends="init" name="-pre-debug-fix">
  13.465 +        <fail unless="fix.includes">Must set fix.includes</fail>
  13.466 +        <property name="javac.includes" value="${fix.includes}.java"/>
  13.467 +    </target>
  13.468 +    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  13.469 +        <j2seproject1:nbjpdareload/>
  13.470 +    </target>
  13.471 +    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  13.472 +    <!--
  13.473 +                ===============
  13.474 +                JAVADOC SECTION
  13.475 +                ===============
  13.476 +            -->
  13.477 +    <target depends="init" name="-javadoc-build">
  13.478 +        <mkdir dir="${dist.javadoc.dir}"/>
  13.479 +        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  13.480 +            <classpath>
  13.481 +                <path path="${javac.classpath}"/>
  13.482 +            </classpath>
  13.483 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  13.484 +                <filename name="**/*.java"/>
  13.485 +            </fileset>
  13.486 +        </javadoc>
  13.487 +    </target>
  13.488 +    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  13.489 +        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  13.490 +    </target>
  13.491 +    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  13.492 +    <!--
  13.493 +                =========================
  13.494 +                JUNIT COMPILATION SECTION
  13.495 +                =========================
  13.496 +            -->
  13.497 +    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  13.498 +        <mkdir dir="${build.test.classes.dir}"/>
  13.499 +    </target>
  13.500 +    <target name="-pre-compile-test">
  13.501 +        <!-- Empty placeholder for easier customization. -->
  13.502 +        <!-- You can override this target in the ../build.xml file. -->
  13.503 +    </target>
  13.504 +    <target if="do.depend.true" name="-compile-test-depend">
  13.505 +        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  13.506 +    </target>
  13.507 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  13.508 +        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  13.509 +        <copy todir="${build.test.classes.dir}">
  13.510 +            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  13.511 +        </copy>
  13.512 +    </target>
  13.513 +    <target name="-post-compile-test">
  13.514 +        <!-- Empty placeholder for easier customization. -->
  13.515 +        <!-- You can override this target in the ../build.xml file. -->
  13.516 +    </target>
  13.517 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  13.518 +    <target name="-pre-compile-test-single">
  13.519 +        <!-- Empty placeholder for easier customization. -->
  13.520 +        <!-- You can override this target in the ../build.xml file. -->
  13.521 +    </target>
  13.522 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  13.523 +        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  13.524 +        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  13.525 +        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  13.526 +        <copy todir="${build.test.classes.dir}">
  13.527 +            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  13.528 +        </copy>
  13.529 +    </target>
  13.530 +    <target name="-post-compile-test-single">
  13.531 +        <!-- Empty placeholder for easier customization. -->
  13.532 +        <!-- You can override this target in the ../build.xml file. -->
  13.533 +    </target>
  13.534 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  13.535 +    <!--
  13.536 +                =======================
  13.537 +                JUNIT EXECUTION SECTION
  13.538 +                =======================
  13.539 +            -->
  13.540 +    <target depends="init" if="have.tests" name="-pre-test-run">
  13.541 +        <mkdir dir="${build.test.results.dir}"/>
  13.542 +    </target>
  13.543 +    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  13.544 +        <j2seproject3:junit testincludes="**/*Test.java"/>
  13.545 +    </target>
  13.546 +    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  13.547 +        <fail if="tests.failed">Some tests failed; see details above.</fail>
  13.548 +    </target>
  13.549 +    <target depends="init" if="have.tests" name="test-report"/>
  13.550 +    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  13.551 +    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  13.552 +    <target depends="init" if="have.tests" name="-pre-test-run-single">
  13.553 +        <mkdir dir="${build.test.results.dir}"/>
  13.554 +    </target>
  13.555 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  13.556 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  13.557 +        <j2seproject3:junit excludes="" includes="${test.includes}"/>
  13.558 +    </target>
  13.559 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  13.560 +        <fail if="tests.failed">Some tests failed; see details above.</fail>
  13.561 +    </target>
  13.562 +    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  13.563 +    <!--
  13.564 +                =======================
  13.565 +                JUNIT DEBUGGING SECTION
  13.566 +                =======================
  13.567 +            -->
  13.568 +    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  13.569 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  13.570 +        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  13.571 +        <delete file="${test.report.file}"/>
  13.572 +        <mkdir dir="${build.test.results.dir}"/>
  13.573 +        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  13.574 +            <customize>
  13.575 +                <syspropertyset>
  13.576 +                    <propertyref prefix="test-sys-prop."/>
  13.577 +                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
  13.578 +                </syspropertyset>
  13.579 +                <arg value="${test.class}"/>
  13.580 +                <arg value="showoutput=true"/>
  13.581 +                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  13.582 +                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  13.583 +            </customize>
  13.584 +        </j2seproject3:debug>
  13.585 +    </target>
  13.586 +    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  13.587 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  13.588 +    </target>
  13.589 +    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  13.590 +    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  13.591 +        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  13.592 +    </target>
  13.593 +    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  13.594 +    <!--
  13.595 +                =========================
  13.596 +                APPLET EXECUTION SECTION
  13.597 +                =========================
  13.598 +            -->
  13.599 +    <target depends="init,compile-single" name="run-applet">
  13.600 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  13.601 +        <j2seproject1:java classname="sun.applet.AppletViewer">
  13.602 +            <customize>
  13.603 +                <arg value="${applet.url}"/>
  13.604 +            </customize>
  13.605 +        </j2seproject1:java>
  13.606 +    </target>
  13.607 +    <!--
  13.608 +                =========================
  13.609 +                APPLET DEBUGGING  SECTION
  13.610 +                =========================
  13.611 +            -->
  13.612 +    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  13.613 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  13.614 +        <j2seproject3:debug classname="sun.applet.AppletViewer">
  13.615 +            <customize>
  13.616 +                <arg value="${applet.url}"/>
  13.617 +            </customize>
  13.618 +        </j2seproject3:debug>
  13.619 +    </target>
  13.620 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  13.621 +    <!--
  13.622 +                ===============
  13.623 +                CLEANUP SECTION
  13.624 +                ===============
  13.625 +            -->
  13.626 +    <target depends="init" name="deps-clean" unless="no.deps">
  13.627 +        <ant antfile="${project.JFTable}/build.xml" inheritall="false" target="clean"/>
  13.628 +        <ant antfile="${project.Postak}/build.xml" inheritall="false" target="clean"/>
  13.629 +    </target>
  13.630 +    <target depends="init" name="-do-clean">
  13.631 +        <delete dir="${build.dir}"/>
  13.632 +        <delete dir="${dist.dir}"/>
  13.633 +    </target>
  13.634 +    <target name="-post-clean">
  13.635 +        <!-- Empty placeholder for easier customization. -->
  13.636 +        <!-- You can override this target in the ../build.xml file. -->
  13.637 +    </target>
  13.638 +    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  13.639 +</project>
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/java/SuperPostak/nbproject/configs/JWS_generated.properties	Sun Nov 23 22:19:20 2008 +0100
    14.3 @@ -0,0 +1,4 @@
    14.4 +#Sun Dec 09 02:37:31 CET 2007
    14.5 +$label=Web Start
    14.6 +$target.debug=jws-debug
    14.7 +$target.run=jws-run
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/java/SuperPostak/nbproject/genfiles.properties	Sun Nov 23 22:19:20 2008 +0100
    15.3 @@ -0,0 +1,8 @@
    15.4 +build.xml.data.CRC32=d917048a
    15.5 +build.xml.script.CRC32=bda184ca
    15.6 +build.xml.stylesheet.CRC32=be360661
    15.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    15.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    15.9 +nbproject/build-impl.xml.data.CRC32=d917048a
   15.10 +nbproject/build-impl.xml.script.CRC32=5446e5b9
   15.11 +nbproject/build-impl.xml.stylesheet.CRC32=487672f9
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/java/SuperPostak/nbproject/jnlp-impl.xml	Sun Nov 23 22:19:20 2008 +0100
    16.3 @@ -0,0 +1,453 @@
    16.4 +<?xml version="1.0" encoding="UTF-8"?>
    16.5 +<!--
    16.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    16.7 +
    16.8 +Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    16.9 +
   16.10 +
   16.11 +The contents of this file are subject to the terms of either the GNU
   16.12 +General Public License Version 2 only ("GPL") or the Common
   16.13 +Development and Distribution License("CDDL") (collectively, the
   16.14 +"License"). You may not use this file except in compliance with the
   16.15 +License. You can obtain a copy of the License at
   16.16 +http://www.netbeans.org/cddl-gplv2.html
   16.17 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   16.18 +specific language governing permissions and limitations under the
   16.19 +License.  When distributing the software, include this License Header
   16.20 +Notice in each file and include the License file at
   16.21 +nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   16.22 +particular file as subject to the "Classpath" exception as provided
   16.23 +by Sun in the GPL Version 2 section of the License file that
   16.24 +accompanied this code. If applicable, add the following below the
   16.25 +License Header, with the fields enclosed by brackets [] replaced by
   16.26 +your own identifying information:
   16.27 +"Portions Copyrighted [year] [name of copyright owner]"
   16.28 +
   16.29 +Contributor(s):
   16.30 +
   16.31 +The Original Software is NetBeans. The Initial Developer of the Original
   16.32 +Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
   16.33 +Microsystems, Inc. All Rights Reserved.
   16.34 +
   16.35 +If you wish your version of this file to be governed by only the CDDL
   16.36 +or only the GPL Version 2, indicate your decision by adding
   16.37 +"[Contributor] elects to include this software in this distribution
   16.38 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   16.39 +single choice of license, a recipient has the option to distribute
   16.40 +your version of this file under either the CDDL, the GPL Version 2 or
   16.41 +to extend the choice of license to its licensees as provided above.
   16.42 +However, if you add GPL Version 2 code and therefore, elected the GPL
   16.43 +Version 2 license, then the option applies only if the new code is
   16.44 +made subject to such option by the copyright holder.
   16.45 +-->
   16.46 +
   16.47 +<project name="jnlp-impl" default="default" basedir="..">
   16.48 +
   16.49 +    <property name="master.jnlp.file" location="master.jnlp"/>
   16.50 +    <property name="launch.jnlp.file" value="launch.jnlp"/>
   16.51 +    <property name="jnlp.dest.dir" location="dist"/>
   16.52 +    
   16.53 +    <!-- helper file to create list of arguments, etc. -->
   16.54 +    <property name="helper.file" location="helper.txt"/>
   16.55 +    
   16.56 +    <target name="default">
   16.57 +        <echo message="Default target is not set."/>
   16.58 +    </target>
   16.59 +    
   16.60 +    <!-- Main target -->
   16.61 +    
   16.62 +    <target name="jnlp" depends="-init-check,-test-jnlp-enabled" if="is.jnlp.enabled">
   16.63 +        <delete file="dist/lib/javaws.jar" failonerror="false"/>
   16.64 +        <antcall target="generate-jnlp"/>
   16.65 +    </target>
   16.66 +    
   16.67 +    <!-- Generate master -->
   16.68 +    
   16.69 +    <target name="-check-for-master.jnlp">
   16.70 +        <available file="${master.jnlp.file}" property="master.jnlp.exists"/>
   16.71 +    </target>
   16.72 +    <target name="jnlp-init-generate-master" depends="-check-for-master.jnlp" unless="master.jnlp.exists">
   16.73 +        <echo file="${master.jnlp.file}" encoding="UTF-8"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
   16.74 +<jnlp spec="1.0+" codebase="$${jnlp.codebase}" href="launch.jnlp">
   16.75 +    <information>
   16.76 +        <title>$${APPLICATION.TITLE}</title>
   16.77 +        <vendor>$${APPLICATION.VENDOR}</vendor>
   16.78 +        <description>$${APPLICATION.DESC}</description>
   16.79 +        <description kind="short">$${APPLICATION.DESC.SHORT}</description>
   16.80 +        <homepage href="$${APPLICATION.HOMEPAGE}"/>
   16.81 +<!--$${JNLP.ICONS}-->
   16.82 +<!--$${JNLP.OFFLINE.ALLOWED}-->
   16.83 +    </information>
   16.84 +<!--$${JNLP.SECURITY}-->
   16.85 +    <resources>
   16.86 +<!--$${JNLP.RESOURCES.RUNTIME}-->
   16.87 +<!--$${JNLP.RESOURCES.MAIN.JAR}-->
   16.88 +<!--$${JNLP.RESOURCES.JARS}-->
   16.89 +    </resources>
   16.90 +    <application-desc main-class="$${jnlp.main.class}">
   16.91 +<!--$${JNLP.APPLICATION.ARGS}-->
   16.92 +    </application-desc>
   16.93 +</jnlp>
   16.94 +]]></echo>
   16.95 +    </target>
   16.96 +    
   16.97 +    <!-- Initial check -->
   16.98 +    
   16.99 +    <target name="-init-check">
  16.100 +        <fail unless="application.title" message="Must set application title."/>
  16.101 +        <fail unless="application.vendor" message="Must set application vendor."/>
  16.102 +    </target>
  16.103 +    
  16.104 +    <!-- Icons -->
  16.105 +    
  16.106 +    <target name="-init-icons" depends="-preinit-icons,-set-icon-elem,-set-splash-elem">
  16.107 +        <property name="jnlp.icon.elem" value=""/>
  16.108 +        <property name="application.splash.elem" value=""/>
  16.109 +        <property name="icon.separator" value=""/>
  16.110 +        <property name="jnlp.icons.value" value="${jnlp.icon.elem}${icon.separator}${application.splash.elem}"/>
  16.111 +    </target>
  16.112 +    <target name="-preinit-icons" depends="-copy-app-icon,-copy-app-splash"/>
  16.113 +    <target name="-copy-app-icon" if="jnlp.icon" depends="-get-app-icon-name">
  16.114 +        <copy file="${jnlp.icon}" todir="${jnlp.dest.dir}" failonerror="false"/>
  16.115 +        <available file="${jnlp.dest.dir}${file.separator}${jnlp.icon.name}" property="jnlp.icon.copied"/>
  16.116 +    </target>
  16.117 +    <target name="-copy-app-splash" if="application.splash" depends="-get-app-splash-name">
  16.118 +        <copy file="${application.splash}" todir="${jnlp.dest.dir}" failonerror="false"/>
  16.119 +        <available file="${jnlp.dest.dir}${file.separator}${application.splash.name}" property="application.splash.copied"/>
  16.120 +    </target>
  16.121 +    <target name="-get-app-icon-name" if="jnlp.icon">
  16.122 +        <dirname file="${jnlp.icon}" property="jnlp.icon.basedir"/>
  16.123 +        <pathconvert property="jnlp.icon.name" setonempty="false">
  16.124 +            <path location="${jnlp.icon}"/>
  16.125 +            <map from="${jnlp.icon.basedir}${file.separator}" to=""/>
  16.126 +        </pathconvert>
  16.127 +    </target>
  16.128 +    <target name="-get-app-splash-name" if="application.splash">
  16.129 +        <dirname file="${application.splash}" property="application.splash.basedir"/>
  16.130 +        <pathconvert property="application.splash.name" setonempty="false">
  16.131 +            <path location="${application.splash}"/>
  16.132 +            <map from="${application.splash.basedir}${file.separator}" to=""/>
  16.133 +        </pathconvert>
  16.134 +    </target>
  16.135 +    <target name="-set-icon-elem" if="jnlp.icon.copied">
  16.136 +        <property name="jnlp.icon.elem" value='        &lt;icon href="${jnlp.icon.name}" kind="default"/&gt;'/>
  16.137 +    </target>
  16.138 +    <target name="-set-splash-elem" if="application.splash.copied" depends="-set-icon-elem">
  16.139 +        <property name="application.splash.elem" value='        &lt;icon href="${application.splash.name}" kind="splash"/&gt;'/>
  16.140 +        <condition property="icon.separator" value="${line.separator}">
  16.141 +            <isset property="jnlp.icon.elem"/>
  16.142 +        </condition>
  16.143 +    </target>
  16.144 +    
  16.145 +    <!-- Offline-Allowed -->
  16.146 +    
  16.147 +    <target name="-init-offline" if="offline.allowed.set" depends="-preinit-offline">
  16.148 +        <property name="jnlp.offline.allowed.value" value="        &lt;offline-allowed/&gt;"/>
  16.149 +    </target>
  16.150 +    <target name="-preinit-offline">
  16.151 +        <condition property="offline.allowed.set">
  16.152 +            <equals arg1="${jnlp.offline-allowed}" arg2="true" trim="true"/>
  16.153 +        </condition>
  16.154 +    </target>
  16.155 +    
  16.156 +    <!-- Descriptions -->
  16.157 +    
  16.158 +    <target name="-init-descriptions" depends="-descriptions-props-check,-init-desc-value,-init-desc-value-short">
  16.159 +        <property name="application.desc.value" value="${application.title}"/>
  16.160 +        <property name="application.desc.short.value" value="${application.title}"/>
  16.161 +    </target>
  16.162 +    <target name="-descriptions-props-check">
  16.163 +        <condition property="application.desc.set">
  16.164 +            <and>
  16.165 +                <isset property="application.desc"/>
  16.166 +                <not>
  16.167 +                    <equals arg1="${application.desc}" arg2="" trim="true"/>
  16.168 +                </not>
  16.169 +            </and>
  16.170 +        </condition>
  16.171 +        <condition property="application.desc.short.set">
  16.172 +            <and>
  16.173 +                <isset property="application.desc.short"/>
  16.174 +                <not>
  16.175 +                    <equals arg1="${application.desc.short}" arg2="" trim="true"/>
  16.176 +                </not>
  16.177 +            </and>
  16.178 +        </condition>
  16.179 +    </target>
  16.180 +    <target name="-init-desc-value" if="application.desc.set">
  16.181 +        <property name="application.desc.value" value="${application.desc}"/>
  16.182 +    </target>
  16.183 +    <target name="-init-desc-value-short" if="application.desc.short.set">
  16.184 +        <property name="application.desc.short.value" value="${application.desc.short}"/>
  16.185 +    </target>
  16.186 +    
  16.187 +    <!-- Security -->
  16.188 +    
  16.189 +    <target name="-init-security" depends="-check-signing-possible" if="jnlp.signed.true+signjarstask.available">
  16.190 +        <property name="jnlp.security" value="    &lt;security&gt;${line.separator}        &lt;all-permissions/&gt;${line.separator}    &lt;/security&gt;"/>
  16.191 +    </target>
  16.192 +    <target name="-security-props-check">
  16.193 +        <condition property="jnlp.signed.true">
  16.194 +            <istrue value="${jnlp.signed}"/>
  16.195 +        </condition>
  16.196 +    </target>
  16.197 +    <target name="-jnlp-init-keystore" depends="-jnlp-init-keystore-props,-check-keystore-exists" unless="jnlp.signjar.keystore.exists">
  16.198 +        <echo message="${application.vendor}" file="${helper.file}"/>
  16.199 +        <loadfile property="application.vendor.filtered" srcfile="${helper.file}">
  16.200 +            <filterchain>
  16.201 +                <deletecharacters chars=","/>
  16.202 +            </filterchain>
  16.203 +        </loadfile>
  16.204 +        <delete file="${helper.file}"/>
  16.205 +        <property name="jnlp.signjar.vendor" value="CN=${application.vendor.filtered}"/>
  16.206 +        <echo message="Going to create default keystore in ${jnlp.signjar.keystore}"/>
  16.207 +        <genkey dname="${jnlp.signjar.vendor}" alias="${jnlp.signjar.alias}" keystore="${jnlp.signjar.keystore}"
  16.208 +            storepass="${jnlp.signjar.storepass}" keypass="${jnlp.signjar.keypass}"/>
  16.209 +    </target>
  16.210 +    <target name="-check-keystore-exists">
  16.211 +        <available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}"/>
  16.212 +    </target>
  16.213 +    <target name="-jnlp-init-keystore-props">
  16.214 +        <property name="jnlp.signjar.keystore" value="${basedir}/build/nb-jws.ks"/>
  16.215 +        <property name="jnlp.signjar.storepass" value="storepass"/>
  16.216 +        <property name="jnlp.signjar.keypass" value="keypass"/>
  16.217 +        <property name="jnlp.signjar.alias" value="nb-jws"/>
  16.218 +    </target>    
  16.219 +    
  16.220 +    <!-- Generating JNLP file -->
  16.221 +    
  16.222 +    <target name="generate-jnlp" depends="jnlp-init-generate-master,-init-codebase,-init-resources-runtime,-init-security,-init-resources-jars,-init-application-args,-init-icons,-init-offline,-init-descriptions,jnlp-init-notinited">
  16.223 +        <copy file="${master.jnlp.file}" tofile="${jnlp.dest.dir}/${launch.jnlp.file}__" overwrite="true" encoding="UTF-8">
  16.224 +            <filterchain>
  16.225 +                <replacestring from="$${jnlp.codebase}" to="${jnlp.codebase.value}"/>
  16.226 +                <replacestring from="&lt;!--$${JNLP.ICONS}--&gt;" to="${jnlp.icons.value}"/>
  16.227 +                <replacestring from="&lt;!--$${JNLP.SECURITY}--&gt;" to="${jnlp.security}"/>
  16.228 +                <replacestring from="&lt;!--$${JNLP.OFFLINE.ALLOWED}--&gt;" to="${jnlp.offline.allowed.value}"/>
  16.229 +                <replacestring from="&lt;!--$${JNLP.RESOURCES.RUNTIME}--&gt;" to="${jnlp.resources.runtime.value}"/>
  16.230 +                <replacestring from="&lt;!--$${JNLP.RESOURCES.MAIN.JAR}--&gt;" to="${jnlp.resources.main.jar.value}"/>
  16.231 +                <replacestring from="&lt;!--$${JNLP.RESOURCES.JARS}--&gt;" to="${jnlp.resources.jars.value}"/>
  16.232 +                <replacestring from="&lt;!--$${JNLP.APPLICATION.ARGS}--&gt;" to="${jnlp.application.args.value}"/>
  16.233 +                <replacestring from="$${APPLICATION.TITLE}" to="${application.title}"/>
  16.234 +                <replacestring from="$${APPLICATION.VENDOR}" to="${application.vendor}"/>
  16.235 +                <replacestring from="$${APPLICATION.DESC}" to="${application.desc.value}"/>
  16.236 +                <replacestring from="$${APPLICATION.DESC.SHORT}" to="${application.desc.short.value}"/>
  16.237 +                <replacestring from="$${APPLICATION.HOMEPAGE}" to="${application.homepage}"/>
  16.238 +                <replacestring from="$${jnlp.main.class}" to="${main.class}"/>
  16.239 +            </filterchain>
  16.240 +        </copy>
  16.241 +        <antcall target="-strip-empty-lines"/>
  16.242 +        <antcall target="-generate-html-page"/>
  16.243 +    </target>
  16.244 +    <target name="jnlp-init-notinited">
  16.245 +        <property name="jnlp.security" value=""/>
  16.246 +        <property name="jnlp.offline.allowed.value" value=""/>
  16.247 +        <property name="application.homepage" value=""/>
  16.248 +        <property name="jnlp.application.args.value" value=""/>
  16.249 +    </target>
  16.250 +    <target name="-strip-empty-lines">
  16.251 +        <move file="${jnlp.dest.dir}/${launch.jnlp.file}__" tofile="${jnlp.dest.dir}/${launch.jnlp.file}" overwrite="true" encoding="UTF-8">
  16.252 +            <filterchain>
  16.253 +                <linecontainsregexp>
  16.254 +                    <regexp pattern=".+"/>
  16.255 +                </linecontainsregexp>
  16.256 +            </filterchain>
  16.257 +        </move>
  16.258 +    </target>
  16.259 +    
  16.260 +    <!-- Codebase processing -->
  16.261 +    
  16.262 +    <target name="-init-codebase" depends="-codebase-props-check,-init-non-user-codebase,-init-user-codebase"/>
  16.263 +    <target name="-codebase-props-check">
  16.264 +        <condition property="local.codebase">
  16.265 +            <or>
  16.266 +                <not>
  16.267 +                    <isset property="jnlp.codebase.type"/>
  16.268 +                </not>
  16.269 +                <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/>
  16.270 +            </or>
  16.271 +        </condition>
  16.272 +        <condition property="non.user.codebase">
  16.273 +            <or>
  16.274 +                <not>
  16.275 +                    <isset property="jnlp.codebase.type"/>
  16.276 +                </not>
  16.277 +                <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/>
  16.278 +                <equals arg1="${jnlp.codebase.type}" arg2="web" trim="true"/>
  16.279 +            </or>
  16.280 +        </condition>
  16.281 +        <condition property="user.codebase">
  16.282 +            <equals arg1="${jnlp.codebase.type}" arg2="user" trim="true"/>
  16.283 +        </condition>
  16.284 +    </target>
  16.285 +    <target name="-init-non-user-codebase" if="non.user.codebase">
  16.286 +        <property name="jnlp.codebase.value" value="${jnlp.codebase.url}"/>
  16.287 +    </target>
  16.288 +    <target name="-init-user-codebase" if="user.codebase">
  16.289 +        <property name="jnlp.codebase.value" value="${jnlp.codebase.user}"/>
  16.290 +    </target>
  16.291 +    
  16.292 +    <!-- j2se resources -->
  16.293 +    
  16.294 +    <target name="-init-resources-runtime" depends="-init-runtime-props">
  16.295 +        <property name="run.jvmargs.value" value=""/>
  16.296 +        <property name="initial-heap-size.value" value=""/>
  16.297 +        <property name="max-heap-size.value" value=""/>
  16.298 +        <property name="jnlp.resources.runtime.value" 
  16.299 +            value='        &lt;j2se version="${javac.target}+"${initial-heap-size.value}${max-heap-size.value}${run.jvmargs.value}/&gt;'/>
  16.300 +    </target>
  16.301 +    <target name="-init-runtime-props" depends="-runtime-props-check,-init-run-jvmargs-value,-init-initial-heap-size-value,-init-max-heap-size-value"/>
  16.302 +    <target name="-runtime-props-check">
  16.303 +        <condition property="run.jvmargs.set">
  16.304 +            <and>
  16.305 +                <isset property="run.jvmargs"/>
  16.306 +                <not>
  16.307 +                    <equals arg1="${run.jvmargs}" arg2="" trim="true"/>
  16.308 +                </not>
  16.309 +            </and>
  16.310 +        </condition>
  16.311 +        <condition property="jnlp.initial-heap-size.set">
  16.312 +            <and>
  16.313 +                <isset property="jnlp.initial-heap-size"/>
  16.314 +                <not>
  16.315 +                    <equals arg1="${jnlp.initial-heap-size}" arg2="" trim="true"/>
  16.316 +                </not>
  16.317 +            </and>
  16.318 +        </condition>
  16.319 +        <condition property="jnlp.max-heap-size.set">
  16.320 +            <and>
  16.321 +                <isset property="jnlp.max-heap-size"/>
  16.322 +                <not>
  16.323 +                    <equals arg1="${jnlp.max-heap-size}" arg2="" trim="true"/>
  16.324 +                </not>
  16.325 +            </and>
  16.326 +        </condition>
  16.327 +    </target>
  16.328 +    <target name="-init-run-jvmargs-value" if="run.jvmargs.set">
  16.329 +        <property name="run.jvmargs.value" value=' java-vm-args="${run.jvmargs}"'/>
  16.330 +    </target>
  16.331 +    <target name="-init-initial-heap-size-value" if="jnlp.initial-heap-size.set">
  16.332 +        <property name="initial-heap-size.value" value=' initial-heap-size="${jnlp.initial-heap-size}"'/>
  16.333 +    </target>
  16.334 +    <target name="-init-max-heap-size-value" if="jnlp.max-heap-size.set">
  16.335 +        <property name="max-heap-size.value" value=' max-heap-size="${jnlp.max-heap-size}"'/>
  16.336 +    </target>
  16.337 +    
  16.338 +    <!-- JAR resources -->
  16.339 +    
  16.340 +    <target name="-init-resources-jars" depends="-preinit-resources-unsigned-jars,-preinit-resources-signed-jars,-preinit-resources-main-jar"/>
  16.341 +    <target name="-preinit-resources-unsigned-jars" depends="-exclude-javaws-from-cp,-check-signing-possible" unless="jnlp.signed.true+signjarstask.available">
  16.342 +        <pathconvert pathsep="${line.separator}" property="jnlp.resources.jars.value">
  16.343 +            <path path="${run.classpath.without.javaws.jar}"/>
  16.344 +            <mapper type="regexp" from="^.*[/\\]([^/\\]+\.jar)"
  16.345 +                to='        &lt;jar href="lib/\1" download="eager"/&gt;'/>
  16.346 +        </pathconvert>
  16.347 +    </target>
  16.348 +    <target name="-preinit-resources-main-jar">
  16.349 +        <pathconvert pathsep="${line.separator}" property="jnlp.resources.main.jar.value">
  16.350 +            <path location="${dist.jar}"/>
  16.351 +            <mapper type="regexp" from="^.*[/\\]([^/\\]+\.jar)"
  16.352 +                to='        &lt;jar href="\1" main="true" download="eager"/&gt;'/>
  16.353 +        </pathconvert>
  16.354 +    </target>
  16.355 +    <target name="-exclude-javaws-from-cp">
  16.356 +        <pathconvert property="path.element.to.be.removed">
  16.357 +            <path path="${run.classpath}"/>
  16.358 +            <mapper type="regexp" from="(^.*[/\\]javaws.jar)" to="\1"/>
  16.359 +        </pathconvert>
  16.360 +        <pathconvert property="run.classpath.without.javaws.jar">
  16.361 +            <path path="${run.classpath}"/>
  16.362 +            <map from="${path.element.to.be.removed}" to=""/>
  16.363 +        </pathconvert>
  16.364 +    </target>
  16.365 +    <target name="-check-task-available">
  16.366 +        <condition property="signjarstask.available">
  16.367 +            <isset property="netbeans.home"/>
  16.368 +        </condition>
  16.369 +    </target>
  16.370 +    <target name="-check-signing-possible" depends="-security-props-check,-check-task-available">
  16.371 +        <condition property="jnlp.signed.true+signjarstask.available">
  16.372 +            <and>
  16.373 +                <isset property="jnlp.signed.true"/>
  16.374 +                <isset property="signjarstask.available"/>
  16.375 +            </and>
  16.376 +        </condition>
  16.377 +    </target>
  16.378 +    <target name="-unavailable-task-warning" depends="-check-task-available" unless="signjarstask.available">
  16.379 +        <echo message="Signtask is not available, jar files will not be signed. Task is available only when running inside NetBeans IDE."/>
  16.380 +    </target>
  16.381 +    <target name="-preinit-resources-signed-jars" depends="-unavailable-task-warning,-sign-jars" if="jnlp.signed.true+signjarstask.available">
  16.382 +        <property name="jnlp.resources.jars.value" value="${jnlp.signed.jars}${jnlp.components}"/>
  16.383 +    </target>
  16.384 +    <target name="-sign-jars" depends="-jnlp-init-keystore,-check-signing-possible" if="jnlp.signed.true+signjarstask.available">
  16.385 +        <jnlpsignjars keystore="${jnlp.signjar.keystore}" storepass="${jnlp.signjar.storepass}" 
  16.386 +                keypass="${jnlp.signjar.keypass}" alias="${jnlp.signjar.alias}" mainjar="${dist.jar}" destdir="dist"
  16.387 +                codebase="${jnlp.codebase.value}" signedjarsprop="jnlp.signed.jars"
  16.388 +                componentsprop="jnlp.components">
  16.389 +            <fileset dir="dist/lib">
  16.390 +                <include name="*.jar"/>
  16.391 +            </fileset>
  16.392 +        </jnlpsignjars>
  16.393 +    </target>
  16.394 +    
  16.395 +    <!-- Application arguments -->
  16.396 +    
  16.397 +    <target name="-init-application-args" if="application.args">
  16.398 +        <echo message="${application.args}" file="${helper.file}"/>
  16.399 +        <loadfile srcfile="${helper.file}" property="jnlp.application.args.value">
  16.400 +            <filterchain>
  16.401 +                <tokenfilter delimoutput="\n">
  16.402 +                    <stringtokenizer/>
  16.403 +                    <replaceregex pattern="(.+)" replace="        &lt;argument&gt;\1&lt;/argument&gt;"/>
  16.404 +                </tokenfilter>
  16.405 +            </filterchain>
  16.406 +        </loadfile>
  16.407 +        <delete file="${helper.file}"/>
  16.408 +    </target>
  16.409 +    
  16.410 +    <!-- Running/Debugging -->
  16.411 +    
  16.412 +    <target name="jws-run" depends="jar,-verify-jnlp-enabled,-verify-codebase" description="Start javaws execution">
  16.413 +        <exec executable="${java.home}/bin/javaws">
  16.414 +            <arg file="${jnlp.dest.dir}/${launch.jnlp.file}"/>
  16.415 +        </exec>
  16.416 +    </target>
  16.417 +    <target name="jws-debug" if="netbeans.home" depends="jar,-verify-jnlp-enabled,-verify-codebase,-debug-start-debugger,-debug-javaws-debuggee" 
  16.418 +        description="Debug javaws project in IDE"/>
  16.419 +    <target name="-debug-javaws-debuggee">
  16.420 +        <exec executable="${java.home}/bin/javaws">
  16.421 +            <env key="JAVAWS_VM_ARGS" value="-Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
  16.422 +            <arg file="${jnlp.dest.dir}/${launch.jnlp.file}"/>
  16.423 +        </exec>
  16.424 +    </target>
  16.425 +    <target name="-verify-codebase" depends="-codebase-props-check" unless="local.codebase">
  16.426 +        <fail message="Project cannot be run with non-local codebase. Open project properties dialog and set Web Start Codebase to Local Execution."/>
  16.427 +    </target>
  16.428 +    <target name="-verify-jnlp-enabled" depends="-test-jnlp-enabled" unless="is.jnlp.enabled">
  16.429 +        <fail message="Project cannot be run with selected Run Configuration when Java Web Start is disabled."/>
  16.430 +    </target>
  16.431 +    
  16.432 +    <!-- Test JNLP enabled-->
  16.433 +    
  16.434 +    <target name="-test-jnlp-enabled">
  16.435 +        <condition property="is.jnlp.enabled">
  16.436 +            <equals arg1="${jnlp.enabled}" arg2="true" casesensitive="false" trim="true"/>
  16.437 +        </condition>
  16.438 +    </target>
  16.439 +    
  16.440 +    <!-- Generate simple HTML test page -->
  16.441 +    
  16.442 +    <target name="-generate-html-page">
  16.443 +        <echo file="${jnlp.dest.dir}/launch.html"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  16.444 +<html>
  16.445 +    <head>
  16.446 +        <title>Test page for launching the application via JNLP</title>
  16.447 +    </head>
  16.448 +    <body>
  16.449 +        <h3>Test page for launching the application via JNLP</h3>
  16.450 +        <a href="launch.jnlp">Launch the application</a>
  16.451 +    </body>
  16.452 +</html>
  16.453 +]]></echo>
  16.454 +    </target>
  16.455 +    
  16.456 +</project>
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/java/SuperPostak/nbproject/private/private.properties	Sun Nov 23 22:19:20 2008 +0100
    17.3 @@ -0,0 +1,8 @@
    17.4 +do.depend=false
    17.5 +do.jar=true
    17.6 +javac.debug=true
    17.7 +javadoc.preview=true
    17.8 +jaxws.endorsed.dir=/home/fiki/bin/netbeans-6.1/java2/modules/ext/jaxws21/api
    17.9 +project.JFTable=/home/fiki/subversion/JFTable/trunk/java/JFTable
   17.10 +project.Postak=/home/fiki/subversion/SuperPostak/trunk/java/Postak
   17.11 +user.properties.file=/home/fiki/.netbeans/6.1/build.properties
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/java/SuperPostak/nbproject/private/private.xml	Sun Nov 23 22:19:20 2008 +0100
    18.3 @@ -0,0 +1,4 @@
    18.4 +<?xml version="1.0" encoding="UTF-8"?>
    18.5 +<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
    18.6 +    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
    18.7 +</project-private>
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/java/SuperPostak/nbproject/project.properties	Sun Nov 23 22:19:20 2008 +0100
    19.3 @@ -0,0 +1,101 @@
    19.4 +application.title=SuperPostak
    19.5 +application.vendor=fiki
    19.6 +build.classes.dir=${build.dir}/classes
    19.7 +build.classes.excludes=**/*.java,**/*.form
    19.8 +# This directory is removed when the project is cleaned:
    19.9 +build.dir=build
   19.10 +build.generated.dir=${build.dir}/generated
   19.11 +# Only compile against the classpath explicitly listed here:
   19.12 +build.sysclasspath=ignore
   19.13 +build.test.classes.dir=${build.dir}/test/classes
   19.14 +build.test.results.dir=${build.dir}/test/results
   19.15 +debug.classpath=\
   19.16 +    ${run.classpath}
   19.17 +debug.test.classpath=\
   19.18 +    ${run.test.classpath}
   19.19 +# This directory is removed when the project is cleaned:
   19.20 +dist.dir=dist
   19.21 +dist.jar=${dist.dir}/SuperPostak.jar
   19.22 +dist.javadoc.dir=${dist.dir}/javadoc
   19.23 +excludes=
   19.24 +includes=**
   19.25 +jar.compress=false
   19.26 +javac.classpath=\
   19.27 +    ${libs.PostgreSQLDriver.classpath}:\
   19.28 +    ${libs.SwingX.classpath}:\
   19.29 +    ${libs.JAF.classpath}:\
   19.30 +    ${libs.JavaMail.classpath}:\
   19.31 +    ${libs.SubstanceLaF.classpath}:\
   19.32 +    ${reference.JFTable.jar}:\
   19.33 +    ${libs.MySQLDriver.classpath}:\
   19.34 +    ${libs.jTDS-Sybase-MSSQL.classpath}:\
   19.35 +    ${libs.Sybase.com.classpath}:\
   19.36 +    ${reference.Postak.jar}
   19.37 +# Space-separated list of extra javac options
   19.38 +javac.compilerargs=
   19.39 +javac.deprecation=false
   19.40 +javac.source=1.5
   19.41 +javac.target=1.5
   19.42 +javac.test.classpath=\
   19.43 +    ${javac.classpath}:\
   19.44 +    ${build.classes.dir}:\
   19.45 +    ${libs.junit_4.classpath}
   19.46 +javadoc.additionalparam=
   19.47 +javadoc.author=false
   19.48 +javadoc.encoding=${source.encoding}
   19.49 +javadoc.noindex=false
   19.50 +javadoc.nonavbar=false
   19.51 +javadoc.notree=false
   19.52 +javadoc.private=false
   19.53 +javadoc.splitindex=true
   19.54 +javadoc.use=true
   19.55 +javadoc.version=false
   19.56 +javadoc.windowtitle=
   19.57 +jnlp.codebase.type=user
   19.58 +jnlp.codebase.url=file:/home/fiki/subversion/SuperPostak/trunk/java/SuperPostak/dist/
   19.59 +jnlp.codebase.user=http://frantovo.cz/projekty/SuperPostak/jws/
   19.60 +jnlp.enabled=true
   19.61 +jnlp.icon=/home/fiki/java/SuperPostak/src/cz/frantovo/superPostak/mail_generic.png
   19.62 +jnlp.offline-allowed=true
   19.63 +jnlp.signed=true
   19.64 +# Property libs.JAF.classpath is set here just to make sharing of project simpler.
   19.65 +# The library definition has always preference over this property.
   19.66 +libs.JAF.classpath=../lib/jaf/jaf-1.1.1/activation.jar
   19.67 +# Property libs.JavaMail.classpath is set here just to make sharing of project simpler.
   19.68 +# The library definition has always preference over this property.
   19.69 +libs.JavaMail.classpath=../lib/java-mail/javamail-1.4.1/mail.jar:../lib/java-mail/javamail-1.4.1/lib/dsn.jar:../lib/java-mail/javamail-1.4.1/lib/imap.jar:../lib/java-mail/javamail-1.4.1/lib/mailapi.jar:../lib/java-mail/javamail-1.4.1/lib/pop3.jar:../lib/java-mail/javamail-1.4.1/lib/smtp.jar
   19.70 +# Property libs.jTDS-Sybase-MSSQL.classpath is set here just to make sharing of project simpler.
   19.71 +# The library definition has always preference over this property.
   19.72 +libs.jTDS-Sybase-MSSQL.classpath=../../../../../java/lib/jTDS - Sybase a MS SQL/jtds-1.2.2-dist/jtds-1.2.2.jar
   19.73 +# Property libs.MySQLDriver.classpath is set here just to make sharing of project simpler.
   19.74 +# The library definition has always preference over this property.
   19.75 +libs.MySQLDriver.classpath=../../../../../../../usr/local/netbeans-6.0/ide8/modules/ext/mysql-connector-java-5.0.7-bin.jar
   19.76 +# Property libs.PostgreSQLDriver.classpath is set here just to make sharing of project simpler.
   19.77 +# The library definition has always preference over this property.
   19.78 +libs.PostgreSQLDriver.classpath=../../../../usr/local/netbeans-6.0/ide8/modules/ext/postgresql-8.2-506.jdbc3.jar
   19.79 +# Property libs.SubstanceLaF.classpath is set here just to make sharing of project simpler.
   19.80 +# The library definition has always preference over this property.
   19.81 +libs.SubstanceLaF.classpath=../../../../../java/lib/substance/lib/asm-all-2.2.2.jar:../../../../../java/lib/substance/lib/forms-1.1.0.jar:../../../../../java/lib/substance/lib/laf-plugin-50.jar:../../../../../java/lib/substance/lib/laf-widget.jar:../../../../../java/lib/substance/lib/substance-baseline.jar:../../../../../java/lib/substance/lib/substance-swingx.jar:../../../../../java/lib/substance/lib/substance-watermark-pack.jar:../../../../../java/lib/substance/lib/swingx.jar:../../../../../java/lib/substance/build/classes
   19.82 +# Property libs.SwingX.classpath is set here just to make sharing of project simpler.
   19.83 +# The library definition has always preference over this property.
   19.84 +libs.SwingX.classpath=../lib/swingx/SwingX 0.9.1/swingx/dist/swingx-0.9.1.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/jmock-1.1.0RC1.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/junit-4.0-src.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/junit-4.0.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/optional/Filters.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/optional/MultipleGradientPaint.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/optional/swing-layout.jar:../lib/swingx/SwingX 0.9.1/swingx/lib/optional/swing-worker.jar
   19.85 +# Property libs.Sybase.com.classpath is set here just to make sharing of project simpler.
   19.86 +# The library definition has always preference over this property.
   19.87 +libs.Sybase.com.classpath=../../../../../java/lib/Sybase.com/jconn2.jar:../../../../../java/lib/Sybase.com/jTDS2.jar
   19.88 +main.class=cz.frantovo.superPostak.SuperPostak
   19.89 +manifest.file=manifest.mf
   19.90 +meta.inf.dir=${src.dir}/META-INF
   19.91 +platform.active=default_platform
   19.92 +project.JFTable=../../../../JFTable/trunk/java/JFTable
   19.93 +project.Postak=../Postak
   19.94 +reference.JFTable.jar=${project.JFTable}/dist/JFTable.jar
   19.95 +reference.Postak.jar=${project.Postak}/dist/Postak.jar
   19.96 +run.classpath=\
   19.97 +    ${javac.classpath}:\
   19.98 +    ${build.classes.dir}
   19.99 +run.test.classpath=\
  19.100 +    ${javac.test.classpath}:\
  19.101 +    ${build.test.classes.dir}
  19.102 +source.encoding=UTF-8
  19.103 +src.dir=src
  19.104 +test.src.dir=test
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/java/SuperPostak/nbproject/project.xml	Sun Nov 23 22:19:20 2008 +0100
    20.3 @@ -0,0 +1,39 @@
    20.4 +<?xml version="1.0" encoding="UTF-8"?>
    20.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    20.6 +    <type>org.netbeans.modules.java.j2seproject</type>
    20.7 +    <configuration>
    20.8 +        <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
    20.9 +            <extension file="jnlp-impl.xml" id="jws">
   20.10 +                <dependency dependsOn="jnlp" target="jar"/>
   20.11 +            </extension>
   20.12 +        </buildExtensions>
   20.13 +        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
   20.14 +            <name>SuperPostak</name>
   20.15 +            <minimum-ant-version>1.6.5</minimum-ant-version>
   20.16 +            <source-roots>
   20.17 +                <root id="src.dir"/>
   20.18 +            </source-roots>
   20.19 +            <test-roots>
   20.20 +                <root id="test.src.dir"/>
   20.21 +            </test-roots>
   20.22 +        </data>
   20.23 +        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
   20.24 +            <reference>
   20.25 +                <foreign-project>JFTable</foreign-project>
   20.26 +                <artifact-type>jar</artifact-type>
   20.27 +                <script>build.xml</script>
   20.28 +                <target>jar</target>
   20.29 +                <clean-target>clean</clean-target>
   20.30 +                <id>jar</id>
   20.31 +            </reference>
   20.32 +            <reference>
   20.33 +                <foreign-project>Postak</foreign-project>
   20.34 +                <artifact-type>jar</artifact-type>
   20.35 +                <script>build.xml</script>
   20.36 +                <target>jar</target>
   20.37 +                <clean-target>clean</clean-target>
   20.38 +                <id>jar</id>
   20.39 +            </reference>
   20.40 +        </references>
   20.41 +    </configuration>
   20.42 +</project>
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/Data.java	Sun Nov 23 22:19:20 2008 +0100
    21.3 @@ -0,0 +1,76 @@
    21.4 +/*
    21.5 + * To change this template, choose Tools | Templates
    21.6 + * and open the template in the editor.
    21.7 + */
    21.8 +package cz.frantovo.superPostak;
    21.9 +
   21.10 +import java.security.MessageDigest;
   21.11 +import java.security.NoSuchAlgorithmException;
   21.12 +import java.sql.Connection;
   21.13 +import java.sql.DriverManager;
   21.14 +import java.sql.SQLException;
   21.15 +import java.util.Arrays;
   21.16 +import java.util.logging.Level;
   21.17 +import java.util.logging.Logger;
   21.18 +
   21.19 +/**
   21.20 + * Vrstva pro připojení k databázi
   21.21 + * @author fiki
   21.22 + */
   21.23 +public class Data {
   21.24 +
   21.25 +    private static Logger log = Logger.getLogger(Data.class.getName());
   21.26 +    private static Connection spojeni;
   21.27 +    private static byte[] hash;
   21.28 +    private static MessageDigest sha;
   21.29 +
   21.30 +    public static synchronized DataSQL getSpojeniSQL(String url, String jmeno, char[] heslo) throws SQLException {
   21.31 +        return new DataSQL(getSpojeni(url, jmeno, heslo));
   21.32 +    }
   21.33 +
   21.34 +    private static synchronized Connection getSpojeni(String url, String jmeno, char[] heslo) throws SQLException {
   21.35 +        if (Arrays.equals(hash, hashuj(url, jmeno, heslo)) && spojeni != null && !spojeni.isClosed()) {
   21.36 +            log.log(Level.INFO, "Znovupoužívám DB spojení.");
   21.37 +        } else {
   21.38 +            spojeni = getNoveSpojeni(url, jmeno, heslo);
   21.39 +        }
   21.40 +
   21.41 +        return spojeni;
   21.42 +    }
   21.43 +
   21.44 +    private static Connection getNoveSpojeni(
   21.45 +            String url, String jmeno, char[] heslo) throws SQLException {
   21.46 +        /** Pokusíme se uzavřít staré spojení */
   21.47 +        if (spojeni != null && !spojeni.isClosed()) {
   21.48 +            try {
   21.49 +                spojeni.close();
   21.50 +            } catch (Exception e) {
   21.51 +                log.log(Level.INFO, "Nepodařilo se uzavřít spojení", e);
   21.52 +            }
   21.53 +        }
   21.54 +
   21.55 +        /** Vrátíme nové spojení */
   21.56 +        hash = hashuj(url, jmeno, heslo);
   21.57 +        spojeni = DriverManager.getConnection(url, jmeno, String.valueOf(heslo));
   21.58 +        log.log(Level.INFO, "Otevřeno nové spoejní spojení k databázi: " + url);
   21.59 +        return spojeni;
   21.60 +    }
   21.61 +
   21.62 +    private static byte[] hashuj(String url, String jmeno, char[] heslo) {
   21.63 +        try {
   21.64 +            if (sha == null) {
   21.65 +                sha = MessageDigest.getInstance("SHA-256");
   21.66 +            }
   21.67 +            String text = url + "/" + jmeno + "/" + String.valueOf(heslo);
   21.68 +            return sha.digest(text.getBytes());
   21.69 +
   21.70 +        } catch (NoSuchAlgorithmException e) {
   21.71 +            /** Tohle by nemělo nikdy nastat. V nouzovém případě použijeme součet hodnot místo hashe. */
   21.72 +            log.log(Level.SEVERE, "Neexistující hashovací algoritmus", e);
   21.73 +            String soucet = url + "/" + jmeno + String.valueOf(heslo).length();
   21.74 +            return soucet.getBytes();
   21.75 +        }
   21.76 +    }
   21.77 +}
   21.78 +
   21.79 +
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/DataSQL.java	Sun Nov 23 22:19:20 2008 +0100
    22.3 @@ -0,0 +1,50 @@
    22.4 +/*
    22.5 + * To change this template, choose Tools | Templates
    22.6 + * and open the template in the editor.
    22.7 + */
    22.8 +package cz.frantovo.superPostak;
    22.9 +
   22.10 +import cz.frantovo.postak.InternetAddressKomu;
   22.11 +import java.io.UnsupportedEncodingException;
   22.12 +import java.sql.Connection;
   22.13 +import java.sql.PreparedStatement;
   22.14 +import java.sql.ResultSet;
   22.15 +import java.sql.SQLException;
   22.16 +import java.util.ArrayList;
   22.17 +import java.util.Collection;
   22.18 +import java.util.logging.Level;
   22.19 +import java.util.logging.Logger;
   22.20 +
   22.21 +/**
   22.22 + * Třída pro vykonávání SQL dotazů
   22.23 + * @author fiki
   22.24 + */
   22.25 +public class DataSQL {
   22.26 +
   22.27 +    private static Logger log = Logger.getLogger(DataSQL.class.getName());
   22.28 +    private Connection spojeni;
   22.29 +
   22.30 +    public DataSQL(Connection spojeni) {
   22.31 +        this.spojeni = spojeni;
   22.32 +    }
   22.33 +
   22.34 +    /**
   22.35 +     * Provede SQL příkaz a získá z něj e-mailové adresy.
   22.36 +     * Zatím předpokládá pouze jediný sloupec, který obsahuje adresu.
   22.37 +     */
   22.38 +    public Collection<InternetAddressKomu> getAdresy(String sql) throws SQLException, UnsupportedEncodingException {
   22.39 +        ArrayList<InternetAddressKomu> vysledek = new ArrayList<InternetAddressKomu>();
   22.40 +
   22.41 +        if (sql == null || sql.length() < 3) {
   22.42 +            log.log(Level.FINER, "Prázdný SQL dotaz");
   22.43 +            return null;
   22.44 +        } else {
   22.45 +            PreparedStatement ps = spojeni.prepareStatement(sql);
   22.46 +            ResultSet rs = ps.executeQuery();
   22.47 +            while (rs.next()) {
   22.48 +                vysledek.add(new InternetAddressKomu(rs.getString(1), rs.getString(1)));
   22.49 +            }
   22.50 +            return vysledek;
   22.51 +        }
   22.52 +    }
   22.53 +}
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/GrafPokus.form	Sun Nov 23 22:19:20 2008 +0100
    23.3 @@ -0,0 +1,58 @@
    23.4 +<?xml version="1.0" encoding="UTF-8" ?>
    23.5 +
    23.6 +<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
    23.7 +  <Properties>
    23.8 +    <Property name="defaultCloseOperation" type="int" value="3"/>
    23.9 +  </Properties>
   23.10 +  <SyntheticProperties>
   23.11 +    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
   23.12 +  </SyntheticProperties>
   23.13 +  <AuxValues>
   23.14 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   23.15 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   23.16 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
   23.17 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
   23.18 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
   23.19 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   23.20 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   23.21 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   23.22 +  </AuxValues>
   23.23 +
   23.24 +  <Layout>
   23.25 +    <DimensionLayout dim="0">
   23.26 +      <Group type="103" groupAlignment="0" attributes="0">
   23.27 +          <Group type="102" alignment="0" attributes="0">
   23.28 +              <EmptySpace max="-2" attributes="0"/>
   23.29 +              <Component id="mujGraf" max="32767" attributes="0"/>
   23.30 +              <EmptySpace max="-2" attributes="0"/>
   23.31 +          </Group>
   23.32 +      </Group>
   23.33 +    </DimensionLayout>
   23.34 +    <DimensionLayout dim="1">
   23.35 +      <Group type="103" groupAlignment="0" attributes="0">
   23.36 +          <Group type="102" alignment="0" attributes="0">
   23.37 +              <EmptySpace max="-2" attributes="0"/>
   23.38 +              <Component id="mujGraf" max="32767" attributes="0"/>
   23.39 +              <EmptySpace max="-2" attributes="0"/>
   23.40 +          </Group>
   23.41 +      </Group>
   23.42 +    </DimensionLayout>
   23.43 +  </Layout>
   23.44 +  <SubComponents>
   23.45 +    <Container class="org.jdesktop.swingx.JXGraph" name="mujGraf">
   23.46 +
   23.47 +      <Layout>
   23.48 +        <DimensionLayout dim="0">
   23.49 +          <Group type="103" groupAlignment="0" attributes="0">
   23.50 +              <EmptySpace min="0" pref="465" max="32767" attributes="0"/>
   23.51 +          </Group>
   23.52 +        </DimensionLayout>
   23.53 +        <DimensionLayout dim="1">
   23.54 +          <Group type="103" groupAlignment="0" attributes="0">
   23.55 +              <EmptySpace min="0" pref="422" max="32767" attributes="0"/>
   23.56 +          </Group>
   23.57 +        </DimensionLayout>
   23.58 +      </Layout>
   23.59 +    </Container>
   23.60 +  </SubComponents>
   23.61 +</Form>
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/GrafPokus.java	Sun Nov 23 22:19:20 2008 +0100
    24.3 @@ -0,0 +1,90 @@
    24.4 +/*
    24.5 + * GrafPokus.java
    24.6 + *
    24.7 + * Created on 7. prosinec 2007, 22:33
    24.8 + */
    24.9 +
   24.10 +package cz.frantovo.superPostak;
   24.11 +
   24.12 +import java.awt.Color;
   24.13 +import org.jdesktop.swingx.JXGraph.Plot;
   24.14 +
   24.15 +/**
   24.16 + *
   24.17 + * @author  fiki
   24.18 + */
   24.19 +public class GrafPokus extends javax.swing.JFrame {
   24.20 +    
   24.21 +    /** Creates new form GrafPokus */
   24.22 +    public GrafPokus() {
   24.23 +        initComponents();
   24.24 +        
   24.25 +        mujGraf.addPlots(Color.GREEN, new Plot(){
   24.26 +
   24.27 +            @Override
   24.28 +            public double compute(double value) {
   24.29 +                return value * value;
   24.30 +            }
   24.31 +        
   24.32 +        });
   24.33 +    }
   24.34 +    
   24.35 +    /** This method is called from within the constructor to
   24.36 +     * initialize the form.
   24.37 +     * WARNING: Do NOT modify this code. The content of this method is
   24.38 +     * always regenerated by the Form Editor.
   24.39 +     */
   24.40 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
   24.41 +    private void initComponents() {
   24.42 +
   24.43 +        mujGraf = new org.jdesktop.swingx.JXGraph();
   24.44 +
   24.45 +        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
   24.46 +
   24.47 +        javax.swing.GroupLayout mujGrafLayout = new javax.swing.GroupLayout(mujGraf);
   24.48 +        mujGraf.setLayout(mujGrafLayout);
   24.49 +        mujGrafLayout.setHorizontalGroup(
   24.50 +            mujGrafLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   24.51 +            .addGap(0, 465, Short.MAX_VALUE)
   24.52 +        );
   24.53 +        mujGrafLayout.setVerticalGroup(
   24.54 +            mujGrafLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   24.55 +            .addGap(0, 422, Short.MAX_VALUE)
   24.56 +        );
   24.57 +
   24.58 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
   24.59 +        getContentPane().setLayout(layout);
   24.60 +        layout.setHorizontalGroup(
   24.61 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   24.62 +            .addGroup(layout.createSequentialGroup()
   24.63 +                .addContainerGap()
   24.64 +                .addComponent(mujGraf, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
   24.65 +                .addContainerGap())
   24.66 +        );
   24.67 +        layout.setVerticalGroup(
   24.68 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   24.69 +            .addGroup(layout.createSequentialGroup()
   24.70 +                .addContainerGap()
   24.71 +                .addComponent(mujGraf, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
   24.72 +                .addContainerGap())
   24.73 +        );
   24.74 +
   24.75 +        pack();
   24.76 +    }// </editor-fold>//GEN-END:initComponents
   24.77 +    
   24.78 +    /**
   24.79 +     * @param args the command line arguments
   24.80 +     */
   24.81 +    public static void main(String args[]) {
   24.82 +        java.awt.EventQueue.invokeLater(new Runnable() {
   24.83 +            public void run() {
   24.84 +                new GrafPokus().setVisible(true);
   24.85 +            }
   24.86 +        });
   24.87 +    }
   24.88 +    
   24.89 +    // Variables declaration - do not modify//GEN-BEGIN:variables
   24.90 +    private org.jdesktop.swingx.JXGraph mujGraf;
   24.91 +    // End of variables declaration//GEN-END:variables
   24.92 +    
   24.93 +}
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/PanelPrijemcu.form	Sun Nov 23 22:19:20 2008 +0100
    25.3 @@ -0,0 +1,119 @@
    25.4 +<?xml version="1.0" encoding="UTF-8" ?>
    25.5 +
    25.6 +<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
    25.7 +  <AuxValues>
    25.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
    25.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   25.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
   25.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
   25.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
   25.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   25.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   25.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   25.16 +  </AuxValues>
   25.17 +
   25.18 +  <Layout>
   25.19 +    <DimensionLayout dim="0">
   25.20 +      <Group type="103" groupAlignment="0" attributes="0">
   25.21 +          <Group type="102" alignment="1" attributes="0">
   25.22 +              <EmptySpace pref="97" max="32767" attributes="0"/>
   25.23 +              <Component id="otevrit" min="-2" max="-2" attributes="0"/>
   25.24 +              <EmptySpace max="-2" attributes="0"/>
   25.25 +              <Component id="ulozit" min="-2" max="-2" attributes="0"/>
   25.26 +              <EmptySpace max="-2" attributes="0"/>
   25.27 +              <Component id="odebrat" min="-2" max="-2" attributes="0"/>
   25.28 +              <EmptySpace max="-2" attributes="0"/>
   25.29 +              <Component id="pridat" min="-2" max="-2" attributes="0"/>
   25.30 +              <EmptySpace max="-2" attributes="0"/>
   25.31 +          </Group>
   25.32 +          <Component id="jScrollPane1" alignment="0" pref="410" max="32767" attributes="0"/>
   25.33 +      </Group>
   25.34 +    </DimensionLayout>
   25.35 +    <DimensionLayout dim="1">
   25.36 +      <Group type="103" groupAlignment="0" attributes="0">
   25.37 +          <Group type="102" alignment="1" attributes="0">
   25.38 +              <Component id="jScrollPane1" pref="253" max="32767" attributes="0"/>
   25.39 +              <EmptySpace type="unrelated" max="-2" attributes="0"/>
   25.40 +              <Group type="103" groupAlignment="3" attributes="0">
   25.41 +                  <Component id="pridat" alignment="3" min="-2" max="-2" attributes="0"/>
   25.42 +                  <Component id="odebrat" alignment="3" min="-2" max="-2" attributes="0"/>
   25.43 +                  <Component id="ulozit" alignment="3" min="-2" max="-2" attributes="0"/>
   25.44 +                  <Component id="otevrit" alignment="3" min="-2" max="-2" attributes="0"/>
   25.45 +              </Group>
   25.46 +              <EmptySpace max="-2" attributes="0"/>
   25.47 +          </Group>
   25.48 +      </Group>
   25.49 +    </DimensionLayout>
   25.50 +  </Layout>
   25.51 +  <SubComponents>
   25.52 +    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
   25.53 +      <AuxValues>
   25.54 +        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
   25.55 +      </AuxValues>
   25.56 +
   25.57 +      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
   25.58 +      <SubComponents>
   25.59 +        <Component class="cz.frantovo.gui.tabulky.JTable" name="tabulka">
   25.60 +          <Properties>
   25.61 +            <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
   25.62 +              <Table columnCount="4" rowCount="4">
   25.63 +                <Column editable="true" title="Title 1" type="java.lang.Object"/>
   25.64 +                <Column editable="true" title="Title 2" type="java.lang.Object"/>
   25.65 +                <Column editable="true" title="Title 3" type="java.lang.Object"/>
   25.66 +                <Column editable="true" title="Title 4" type="java.lang.Object"/>
   25.67 +              </Table>
   25.68 +            </Property>
   25.69 +          </Properties>
   25.70 +        </Component>
   25.71 +      </SubComponents>
   25.72 +    </Container>
   25.73 +    <Component class="javax.swing.JButton" name="pridat">
   25.74 +      <Properties>
   25.75 +        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
   25.76 +          <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/vlozit.png"/>
   25.77 +        </Property>
   25.78 +        <Property name="mnemonic" type="int" value="105"/>
   25.79 +        <Property name="text" type="java.lang.String" value="P&#x159;idat"/>
   25.80 +        <Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;&#xa;P&#x159;id&#xe1; pr&#xe1;zdn&#xfd; &#x159;&#xe1;dek pro vlo&#x17e;en&#xed; nov&#xe9;ho p&#x159;&#xed;jemce&lt;br/&gt;&#xa;Aby se napsan&#xe1; zm&#x11b;na projevila, je pot&#x159;eba kliknout jinam do tabulky&lt;br/&gt;&#xa;(tzn. ukon&#x10d;it re&#x17e;im editace bu&#x148;ky)&lt;br/&gt;&#xa;&lt;/html&gt;"/>
   25.81 +      </Properties>
   25.82 +      <Events>
   25.83 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pridatActionPerformed"/>
   25.84 +      </Events>
   25.85 +    </Component>
   25.86 +    <Component class="javax.swing.JButton" name="odebrat">
   25.87 +      <Properties>
   25.88 +        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
   25.89 +          <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/editdelete.png"/>
   25.90 +        </Property>
   25.91 +        <Property name="mnemonic" type="int" value="114"/>
   25.92 +        <Property name="text" type="java.lang.String" value="Odebrat"/>
   25.93 +        <Property name="toolTipText" type="java.lang.String" value="Odebere vybran&#xe9;ho p&#x159;&#xed;jemce"/>
   25.94 +      </Properties>
   25.95 +      <Events>
   25.96 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="odebratActionPerformed"/>
   25.97 +      </Events>
   25.98 +    </Component>
   25.99 +    <Component class="javax.swing.JButton" name="ulozit">
  25.100 +      <Properties>
  25.101 +        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  25.102 +          <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/ulozit.png"/>
  25.103 +        </Property>
  25.104 +        <Property name="toolTipText" type="java.lang.String" value="Ulo&#x17e;it seznam p&#x159;&#xed;jemc&#x16f; do souboru."/>
  25.105 +      </Properties>
  25.106 +      <Events>
  25.107 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ulozitActionPerformed"/>
  25.108 +      </Events>
  25.109 +    </Component>
  25.110 +    <Component class="javax.swing.JButton" name="otevrit">
  25.111 +      <Properties>
  25.112 +        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  25.113 +          <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/otevrit.png"/>
  25.114 +        </Property>
  25.115 +        <Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;P&#x159;idat p&#x159;&#xed;jemce ze souboru.&lt;br/&gt;Na ka&#x17e;d&#xe9;m &#x159;&#xe1;dku se o&#x10d;ek&#xe1;v&#xe1; jedna adresa.&lt;/html&gt;"/>
  25.116 +      </Properties>
  25.117 +      <Events>
  25.118 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="otevritActionPerformed"/>
  25.119 +      </Events>
  25.120 +    </Component>
  25.121 +  </SubComponents>
  25.122 +</Form>
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/PanelPrijemcu.java	Sun Nov 23 22:19:20 2008 +0100
    26.3 @@ -0,0 +1,341 @@
    26.4 +package cz.frantovo.superPostak;
    26.5 +
    26.6 +import cz.frantovo.gui.tabulky.TableSorterModel;
    26.7 +import cz.frantovo.postak.InternetAddressKomu;
    26.8 +import cz.frantovo.postak.Postak;
    26.9 +import java.awt.Cursor;
   26.10 +import java.io.BufferedReader;
   26.11 +import java.io.File;
   26.12 +import java.io.FileReader;
   26.13 +import java.io.FileWriter;
   26.14 +import java.io.OutputStreamWriter;
   26.15 +import java.util.ArrayList;
   26.16 +import java.util.Collection;
   26.17 +import java.util.HashSet;
   26.18 +import java.util.logging.Level;
   26.19 +import java.util.logging.Logger;
   26.20 +import javax.swing.DefaultListSelectionModel;
   26.21 +import javax.swing.JFileChooser;
   26.22 +import javax.swing.event.TableModelEvent;
   26.23 +import javax.swing.event.TableModelListener;
   26.24 +import javax.swing.table.TableModel;
   26.25 +
   26.26 +/**
   26.27 + *
   26.28 + * @author  fiki
   26.29 + */
   26.30 +public class PanelPrijemcu extends javax.swing.JPanel {
   26.31 +
   26.32 +    private static Logger log = Logger.getLogger(PanelPrijemcu.class.getName());
   26.33 +    private ModelTabulky data = new ModelTabulky();
   26.34 +
   26.35 +    /** Creates new form PanelPrijemcu */
   26.36 +    public PanelPrijemcu() {
   26.37 +        initComponents();
   26.38 +        tabulka.setModel(data);
   26.39 +        tabulka.setSelectionMode(DefaultListSelectionModel.SINGLE_SELECTION);
   26.40 +    }
   26.41 +
   26.42 +    public ArrayList<InternetAddressKomu> getAdresy() {
   26.43 +        /** TODO: vracet kopii? */
   26.44 +        return data.data;
   26.45 +    }
   26.46 +
   26.47 +    /** 
   26.48 +     * @param prijemci pokud je null, nastaví prázdná kolekce.
   26.49 +     */
   26.50 +    public void setAdresy(Collection<InternetAddressKomu> adresy) {
   26.51 +        data.data = new ArrayList<InternetAddressKomu>();
   26.52 +        pridejAdresu(adresy);
   26.53 +    }
   26.54 +
   26.55 +    public void pridejAdresu(Collection<InternetAddressKomu> adresy) {
   26.56 +        if (adresy == null) {
   26.57 +            log.log(Level.FINER, "Prázdná množina adres - nic nepřidáme");
   26.58 +        } else {
   26.59 +            data.data.addAll(adresy);
   26.60 +            data.upozorniPosluchace();
   26.61 +        }
   26.62 +    }
   26.63 +
   26.64 +    /**
   26.65 +     * Pokud je needitovatelný, nelze měnit data v tabuce
   26.66 +     * a z tlačítek je povoleno pouze tlačítko pro uložení do souboru.
   26.67 +     */
   26.68 +    public void setEditovatelny(boolean editovatelny) {
   26.69 +        otevrit.setEnabled(editovatelny);
   26.70 +        pridat.setEnabled(editovatelny);
   26.71 +        odebrat.setEnabled(editovatelny);
   26.72 +        tabulka.setEnabled(editovatelny);
   26.73 +    }
   26.74 +
   26.75 +    /** This method is called from within the constructor to
   26.76 +     * initialize the form.
   26.77 +     * WARNING: Do NOT modify this code. The content of this method is
   26.78 +     * always regenerated by the Form Editor.
   26.79 +     */
   26.80 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
   26.81 +    private void initComponents() {
   26.82 +
   26.83 +        jScrollPane1 = new javax.swing.JScrollPane();
   26.84 +        tabulka = new cz.frantovo.gui.tabulky.JTable();
   26.85 +        pridat = new javax.swing.JButton();
   26.86 +        odebrat = new javax.swing.JButton();
   26.87 +        ulozit = new javax.swing.JButton();
   26.88 +        otevrit = new javax.swing.JButton();
   26.89 +
   26.90 +        tabulka.setModel(new javax.swing.table.DefaultTableModel(
   26.91 +            new Object [][] {
   26.92 +                {null, null, null, null},
   26.93 +                {null, null, null, null},
   26.94 +                {null, null, null, null},
   26.95 +                {null, null, null, null}
   26.96 +            },
   26.97 +            new String [] {
   26.98 +                "Title 1", "Title 2", "Title 3", "Title 4"
   26.99 +            }
  26.100 +        ));
  26.101 +        jScrollPane1.setViewportView(tabulka);
  26.102 +
  26.103 +        pridat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/vlozit.png"))); // NOI18N
  26.104 +        pridat.setMnemonic('i');
  26.105 +        pridat.setText("Přidat");
  26.106 +        pridat.setToolTipText("<html>\nPřidá prázdný řádek pro vložení nového příjemce<br/>\nAby se napsaná změna projevila, je potřeba kliknout jinam do tabulky<br/>\n(tzn. ukončit režim editace buňky)<br/>\n</html>");
  26.107 +        pridat.addActionListener(new java.awt.event.ActionListener() {
  26.108 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  26.109 +                pridatActionPerformed(evt);
  26.110 +            }
  26.111 +        });
  26.112 +
  26.113 +        odebrat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/editdelete.png"))); // NOI18N
  26.114 +        odebrat.setMnemonic('r');
  26.115 +        odebrat.setText("Odebrat");
  26.116 +        odebrat.setToolTipText("Odebere vybraného příjemce");
  26.117 +        odebrat.addActionListener(new java.awt.event.ActionListener() {
  26.118 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  26.119 +                odebratActionPerformed(evt);
  26.120 +            }
  26.121 +        });
  26.122 +
  26.123 +        ulozit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/ulozit.png"))); // NOI18N
  26.124 +        ulozit.setToolTipText("Uložit seznam příjemců do souboru.");
  26.125 +        ulozit.addActionListener(new java.awt.event.ActionListener() {
  26.126 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  26.127 +                ulozitActionPerformed(evt);
  26.128 +            }
  26.129 +        });
  26.130 +
  26.131 +        otevrit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/otevrit.png"))); // NOI18N
  26.132 +        otevrit.setToolTipText("<html>Přidat příjemce ze souboru.<br/>Na každém řádku se očekává jedna adresa.</html>");
  26.133 +        otevrit.addActionListener(new java.awt.event.ActionListener() {
  26.134 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  26.135 +                otevritActionPerformed(evt);
  26.136 +            }
  26.137 +        });
  26.138 +
  26.139 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  26.140 +        this.setLayout(layout);
  26.141 +        layout.setHorizontalGroup(
  26.142 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  26.143 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  26.144 +                .addContainerGap(97, Short.MAX_VALUE)
  26.145 +                .addComponent(otevrit)
  26.146 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  26.147 +                .addComponent(ulozit)
  26.148 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  26.149 +                .addComponent(odebrat)
  26.150 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  26.151 +                .addComponent(pridat)
  26.152 +                .addContainerGap())
  26.153 +            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
  26.154 +        );
  26.155 +        layout.setVerticalGroup(
  26.156 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  26.157 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  26.158 +                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE)
  26.159 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  26.160 +                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  26.161 +                    .addComponent(pridat)
  26.162 +                    .addComponent(odebrat)
  26.163 +                    .addComponent(ulozit)
  26.164 +                    .addComponent(otevrit))
  26.165 +                .addContainerGap())
  26.166 +        );
  26.167 +    }// </editor-fold>//GEN-END:initComponents
  26.168 +    private void pridatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pridatActionPerformed
  26.169 +        data.pridejRadek();
  26.170 +    }//GEN-LAST:event_pridatActionPerformed
  26.171 +
  26.172 +    private void odebratActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odebratActionPerformed
  26.173 +        int radkaV = tabulka.getSelectedRow();
  26.174 +        int radka = ((TableSorterModel) tabulka.getModel()).modelIndex(radkaV);
  26.175 +        if (radka > -1 && radka < data.getRowCount()) {
  26.176 +            data.odeberRadek(radka);
  26.177 +        }
  26.178 +    }//GEN-LAST:event_odebratActionPerformed
  26.179 +
  26.180 +    private void ulozitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ulozitActionPerformed
  26.181 +        JFileChooser dialog = new JFileChooser();
  26.182 +        dialog.setMultiSelectionEnabled(false);
  26.183 +        dialog.setDialogTitle("Uložit seznam do souboru");
  26.184 +        int vysledek = dialog.showSaveDialog(this);
  26.185 +        if (vysledek == JFileChooser.APPROVE_OPTION) {
  26.186 +            File soubor = dialog.getSelectedFile();
  26.187 +            try {
  26.188 +                setCursor(new Cursor(Cursor.WAIT_CURSOR));
  26.189 +                OutputStreamWriter zapisovac = new FileWriter(soubor);
  26.190 +                int pocetDobrych = 0;
  26.191 +                int pocetPreskocenych = 0;
  26.192 +
  26.193 +                for (InternetAddressKomu adresa : data.data) {
  26.194 +                    /** TODO: různé formátování, případně jména */
  26.195 +                    if (Postak.zkontrolujAdresu(adresa.getAddress())) {
  26.196 +                        zapisovac.write(adresa.getAddress() + "\n");
  26.197 +                        pocetDobrych++;
  26.198 +                    } else {
  26.199 +                        pocetPreskocenych++;
  26.200 +                    }
  26.201 +                }
  26.202 +
  26.203 +                zapisovac.close();
  26.204 +                String preskocene = "";
  26.205 +                if (pocetPreskocenych > 0) {
  26.206 +                    preskocene = "\nPočet přeskočených: " + pocetPreskocenych + "\n(Přeskočené neodpovídaly regulárnímu výrazu.)";
  26.207 +
  26.208 +                }
  26.209 +                SuperPostak.zobrazInformacniDialog(this, "Uložení seznamu", "Adresy příjemců byly úspěšně uloženy do souboru:\n" + soubor.getAbsolutePath() + "\nPočet uložených adres: " + pocetDobrych + preskocene, true);
  26.210 +            } catch (Exception e) {
  26.211 +                SuperPostak.zobrazChybovyDialog(this, "Uložení seznamu selhalo", "Adresy se nepodařilo uložit do souboru.", null, e, Level.WARNING, false);
  26.212 +            } finally {
  26.213 +                setCursor(Cursor.getDefaultCursor());
  26.214 +            }
  26.215 +        }
  26.216 +    }//GEN-LAST:event_ulozitActionPerformed
  26.217 +
  26.218 +    private void otevritActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_otevritActionPerformed
  26.219 +        JFileChooser dialog = new JFileChooser();
  26.220 +        dialog.setMultiSelectionEnabled(false);
  26.221 +        dialog.setDialogTitle("Načíst adresy ze souboru");
  26.222 +        int vysledek = dialog.showOpenDialog(this);
  26.223 +        if (vysledek == JFileChooser.APPROVE_OPTION) {
  26.224 +            File soubor = dialog.getSelectedFile();
  26.225 +            try {
  26.226 +                setCursor(new Cursor(Cursor.WAIT_CURSOR));
  26.227 +                BufferedReader ctenar = new BufferedReader(new FileReader(soubor));
  26.228 +                int pocetDobrych = 0;
  26.229 +                int pocetPreskocenych = 0;
  26.230 +                String radka = ctenar.readLine();
  26.231 +                ArrayList<InternetAddressKomu> adresy = new ArrayList<InternetAddressKomu>();
  26.232 +
  26.233 +                while (radka != null) {
  26.234 +                    if (Postak.zkontrolujAdresu(radka)) {
  26.235 +                        adresy.add(new InternetAddressKomu(radka, null));
  26.236 +                        pocetDobrych++;
  26.237 +
  26.238 +                    } else {
  26.239 +                        pocetPreskocenych++;
  26.240 +                    }
  26.241 +
  26.242 +                    radka = ctenar.readLine();
  26.243 +                }
  26.244 +
  26.245 +                setAdresy(adresy);
  26.246 +                ctenar.close();
  26.247 +                String preskocene = "";
  26.248 +                if (pocetPreskocenych > 0) {
  26.249 +                    preskocene = "\nPočet přeskočených: " + pocetPreskocenych + "\n(Přeskočené neodpovídaly regulárnímu výrazu.)";
  26.250 +
  26.251 +                }
  26.252 +
  26.253 +                SuperPostak.zobrazInformacniDialog(this, "Načtení adres", "Byl načten seznam adres ze souboru:\n" + soubor.getAbsolutePath() + "\nPočet načtených adres: " + pocetDobrych + preskocene, true);
  26.254 +            } catch (Exception e) {
  26.255 +                SuperPostak.zobrazChybovyDialog(this, "Načtení souboru selhalo", "Nepodařilo se načíst soubor s adresami.", null, e, Level.WARNING, false);
  26.256 +            } finally {
  26.257 +                setCursor(Cursor.getDefaultCursor());
  26.258 +            }
  26.259 +
  26.260 +        }
  26.261 +    }//GEN-LAST:event_otevritActionPerformed
  26.262 +
  26.263 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  26.264 +    private javax.swing.JScrollPane jScrollPane1;
  26.265 +    private javax.swing.JButton odebrat;
  26.266 +    private javax.swing.JButton otevrit;
  26.267 +    private javax.swing.JButton pridat;
  26.268 +    private cz.frantovo.gui.tabulky.JTable tabulka;
  26.269 +    private javax.swing.JButton ulozit;
  26.270 +    // End of variables declaration//GEN-END:variables
  26.271 +    private class ModelTabulky implements TableModel {
  26.272 +
  26.273 +        private String[] sloupecky = {"Jméno", "e-mail"};
  26.274 +        private ArrayList<InternetAddressKomu> data = new ArrayList<InternetAddressKomu>();
  26.275 +        private HashSet<TableModelListener> posluchace = new HashSet<TableModelListener>();
  26.276 +
  26.277 +        public int getRowCount() {
  26.278 +            return data.size();
  26.279 +        }
  26.280 +
  26.281 +        public int getColumnCount() {
  26.282 +            return sloupecky.length;
  26.283 +        }
  26.284 +
  26.285 +        public String getColumnName(int n) {
  26.286 +            return sloupecky[n];
  26.287 +        }
  26.288 +
  26.289 +        public Class<?> getColumnClass(int n) {
  26.290 +            return String.class;
  26.291 +        }
  26.292 +
  26.293 +        public boolean isCellEditable(int m, int n) {
  26.294 +            return true;
  26.295 +        }
  26.296 +
  26.297 +        public Object getValueAt(int m, int n) {
  26.298 +            if (n == 0) {
  26.299 +                return data.get(m).getPersonal();
  26.300 +            } else if (n == 1) {
  26.301 +                return data.get(m).getAddress();
  26.302 +            } else {
  26.303 +                return null;
  26.304 +            }
  26.305 +        }
  26.306 +
  26.307 +        public void setValueAt(Object value, int m, int n) {
  26.308 +            if (n == 0) {
  26.309 +                try {
  26.310 +                    data.get(m).setPersonal(String.valueOf(value.toString()));
  26.311 +                } catch (Exception ex) {
  26.312 +                    log.log(Level.SEVERE, "ModelTabulky.setValueAt(" + m + ", " + n + ")", ex);
  26.313 +                }
  26.314 +            } else if (n == 1) {
  26.315 +                data.get(m).setAddress(String.valueOf(value.toString()));
  26.316 +            }
  26.317 +        }
  26.318 +
  26.319 +        public void addTableModelListener(TableModelListener l) {
  26.320 +            posluchace.add(l);
  26.321 +        }
  26.322 +
  26.323 +        public void removeTableModelListener(TableModelListener l) {
  26.324 +            posluchace.remove(l);
  26.325 +        }
  26.326 +
  26.327 +        public void pridejRadek() {
  26.328 +            data.add(new InternetAddressKomu());
  26.329 +
  26.330 +            upozorniPosluchace();
  26.331 +        }
  26.332 +
  26.333 +        public void odeberRadek(int m) {
  26.334 +            data.remove(m);
  26.335 +            upozorniPosluchace();
  26.336 +        }
  26.337 +
  26.338 +        private void upozorniPosluchace() {
  26.339 +            for (TableModelListener p : posluchace) {
  26.340 +                p.tableChanged(new TableModelEvent(this));
  26.341 +            }
  26.342 +        }
  26.343 +    }
  26.344 +}
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/Pokus.java	Sun Nov 23 22:19:20 2008 +0100
    27.3 @@ -0,0 +1,43 @@
    27.4 +package cz.frantovo.superPostak;
    27.5 +
    27.6 +import java.util.Properties;
    27.7 +import javax.mail.Message;
    27.8 +import javax.mail.Session;
    27.9 +import javax.mail.Transport;
   27.10 +import javax.mail.internet.InternetAddress;
   27.11 +import javax.mail.internet.MimeMessage;
   27.12 +
   27.13 +/**
   27.14 + *
   27.15 + * @author fiki
   27.16 + */
   27.17 +public class Pokus {
   27.18 +    
   27.19 +    private static Session smtpSession;
   27.20 +    
   27.21 +    public static void main (String[] args) {
   27.22 +        Properties props = System.getProperties();
   27.23 +	props.put("mail.smtp.host", "frantovo.cz");
   27.24 +	//PopUpAuthenticator auth = new PopUpAuthenticator();
   27.25 +	smtpSession = Session.getInstance(props, null);
   27.26 +        
   27.27 +        try {
   27.28 +	    MimeMessage message = new MimeMessage(smtpSession);
   27.29 +	    message.setFrom(new InternetAddress("java@frantovo.cz", "SuperPošťák"));
   27.30 +	    message.addRecipient(Message.RecipientType.TO,
   27.31 +	    new InternetAddress("informace@frantovo.cz", "František Kučera"));
   27.32 +	    message.setSubject("Předmět zprávy");
   27.33 +	    message.setText("Ahoj, jak se máš? šřtžěýžééšž Java WebStart");
   27.34 +	    
   27.35 +
   27.36 +	    Transport.send(message);
   27.37 +	    
   27.38 +	} catch (Exception e) {
   27.39 +	    
   27.40 +	    e.printStackTrace();
   27.41 +	}
   27.42 +    
   27.43 +    
   27.44 +    }
   27.45 +
   27.46 +}
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.form	Sun Nov 23 22:19:20 2008 +0100
    28.3 @@ -0,0 +1,873 @@
    28.4 +<?xml version="1.0" encoding="UTF-8" ?>
    28.5 +
    28.6 +<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
    28.7 +  <NonVisualComponents>
    28.8 +    <Container class="org.jdesktop.swingx.JXPanel" name="panelDatabaze">
    28.9 +
   28.10 +      <Layout>
   28.11 +        <DimensionLayout dim="0">
   28.12 +          <Group type="103" groupAlignment="0" attributes="0">
   28.13 +              <Group type="102" attributes="0">
   28.14 +                  <EmptySpace max="-2" attributes="0"/>
   28.15 +                  <Group type="103" groupAlignment="0" attributes="0">
   28.16 +                      <Group type="102" alignment="0" attributes="0">
   28.17 +                          <Group type="103" groupAlignment="0" attributes="0">
   28.18 +                              <Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/>
   28.19 +                              <Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/>
   28.20 +                              <Component id="jLabel11" alignment="0" min="-2" max="-2" attributes="0"/>
   28.21 +                          </Group>
   28.22 +                          <EmptySpace max="-2" attributes="0"/>
   28.23 +                          <Group type="103" groupAlignment="0" attributes="0">
   28.24 +                              <Component id="vstupDatabaze" alignment="0" pref="257" max="32767" attributes="0"/>
   28.25 +                              <Component id="vstupDBjmeno" alignment="0" pref="257" max="32767" attributes="0"/>
   28.26 +                              <Group type="102" alignment="0" attributes="0">
   28.27 +                                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
   28.28 +                                  <Component id="vstupDBheslo" pref="257" max="32767" attributes="0"/>
   28.29 +                              </Group>
   28.30 +                          </Group>
   28.31 +                      </Group>
   28.32 +                      <Group type="102" alignment="1" attributes="0">
   28.33 +                          <Component id="vystupDBzprava" pref="155" max="32767" attributes="0"/>
   28.34 +                          <EmptySpace max="-2" attributes="0"/>
   28.35 +                          <Component id="vyzkousetPripojeniTlacitko" min="-2" max="-2" attributes="0"/>
   28.36 +                      </Group>
   28.37 +                  </Group>
   28.38 +                  <EmptySpace max="-2" attributes="0"/>
   28.39 +              </Group>
   28.40 +          </Group>
   28.41 +        </DimensionLayout>
   28.42 +        <DimensionLayout dim="1">
   28.43 +          <Group type="103" groupAlignment="0" attributes="0">
   28.44 +              <Group type="102" alignment="0" attributes="0">
   28.45 +                  <EmptySpace max="-2" attributes="0"/>
   28.46 +                  <Group type="103" groupAlignment="3" attributes="0">
   28.47 +                      <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
   28.48 +                      <Component id="vstupDatabaze" alignment="3" min="-2" max="-2" attributes="0"/>
   28.49 +                  </Group>
   28.50 +                  <EmptySpace max="-2" attributes="0"/>
   28.51 +                  <Group type="103" groupAlignment="3" attributes="0">
   28.52 +                      <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
   28.53 +                      <Component id="vstupDBjmeno" alignment="3" min="-2" max="-2" attributes="0"/>
   28.54 +                  </Group>
   28.55 +                  <EmptySpace max="-2" attributes="0"/>
   28.56 +                  <Group type="103" groupAlignment="3" attributes="0">
   28.57 +                      <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
   28.58 +                      <Component id="vstupDBheslo" alignment="3" min="-2" max="-2" attributes="0"/>
   28.59 +                  </Group>
   28.60 +                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
   28.61 +                  <Group type="103" groupAlignment="3" attributes="0">
   28.62 +                      <Component id="vyzkousetPripojeniTlacitko" alignment="3" min="-2" max="-2" attributes="0"/>
   28.63 +                      <Component id="vystupDBzprava" alignment="3" min="-2" max="-2" attributes="0"/>
   28.64 +                  </Group>
   28.65 +                  <EmptySpace pref="183" max="32767" attributes="0"/>
   28.66 +              </Group>
   28.67 +          </Group>
   28.68 +        </DimensionLayout>
   28.69 +      </Layout>
   28.70 +      <SubComponents>
   28.71 +        <Component class="javax.swing.JLabel" name="jLabel9">
   28.72 +          <Properties>
   28.73 +            <Property name="text" type="java.lang.String" value="Datab&#xe1;ze"/>
   28.74 +          </Properties>
   28.75 +        </Component>
   28.76 +        <Component class="javax.swing.JTextField" name="vstupDatabaze">
   28.77 +        </Component>
   28.78 +        <Component class="javax.swing.JLabel" name="jLabel10">
   28.79 +          <Properties>
   28.80 +            <Property name="text" type="java.lang.String" value="Jm&#xe9;no"/>
   28.81 +          </Properties>
   28.82 +        </Component>
   28.83 +        <Component class="javax.swing.JTextField" name="vstupDBjmeno">
   28.84 +        </Component>
   28.85 +        <Component class="javax.swing.JPasswordField" name="vstupDBheslo">
   28.86 +        </Component>
   28.87 +        <Component class="javax.swing.JLabel" name="jLabel11">
   28.88 +          <Properties>
   28.89 +            <Property name="text" type="java.lang.String" value="Heslo"/>
   28.90 +          </Properties>
   28.91 +        </Component>
   28.92 +        <Component class="javax.swing.JButton" name="vyzkousetPripojeniTlacitko">
   28.93 +          <Properties>
   28.94 +            <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
   28.95 +              <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/fork.png"/>
   28.96 +            </Property>
   28.97 +            <Property name="mnemonic" type="int" value="121"/>
   28.98 +            <Property name="text" type="java.lang.String" value="Vyzkou&#x161;et spojen&#xed;"/>
   28.99 +          </Properties>
  28.100 +          <Events>
  28.101 +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="vyzkousetPripojeniTlacitkoActionPerformed"/>
  28.102 +          </Events>
  28.103 +        </Component>
  28.104 +        <Component class="javax.swing.JLabel" name="vystupDBzprava">
  28.105 +          <Properties>
  28.106 +            <Property name="text" type="java.lang.String" value=" "/>
  28.107 +          </Properties>
  28.108 +        </Component>
  28.109 +      </SubComponents>
  28.110 +    </Container>
  28.111 +    <Container class="org.jdesktop.swingx.JXPanel" name="panelOdeslat">
  28.112 +
  28.113 +      <Layout>
  28.114 +        <DimensionLayout dim="0">
  28.115 +          <Group type="103" groupAlignment="0" attributes="0">
  28.116 +              <Group type="102" alignment="0" attributes="0">
  28.117 +                  <EmptySpace max="-2" attributes="0"/>
  28.118 +                  <Group type="103" groupAlignment="0" attributes="0">
  28.119 +                      <Component id="prijemciZkusebni" alignment="1" pref="535" max="32767" attributes="0"/>
  28.120 +                      <Component id="jSeparator2" alignment="0" pref="535" max="32767" attributes="0"/>
  28.121 +                      <Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
  28.122 +                      <Component id="jLabel14" alignment="0" min="-2" max="-2" attributes="0"/>
  28.123 +                  </Group>
  28.124 +                  <EmptySpace max="-2" attributes="0"/>
  28.125 +              </Group>
  28.126 +          </Group>
  28.127 +        </DimensionLayout>
  28.128 +        <DimensionLayout dim="1">
  28.129 +          <Group type="103" groupAlignment="0" attributes="0">
  28.130 +              <Group type="102" alignment="1" attributes="0">
  28.131 +                  <EmptySpace max="-2" attributes="0"/>
  28.132 +                  <Component id="jLabel14" min="-2" max="-2" attributes="0"/>
  28.133 +                  <EmptySpace max="-2" attributes="0"/>
  28.134 +                  <Component id="prijemciZkusebni" pref="153" max="32767" attributes="0"/>
  28.135 +                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
  28.136 +                  <Component id="jSeparator2" min="-2" max="-2" attributes="0"/>
  28.137 +                  <EmptySpace max="-2" attributes="0"/>
  28.138 +                  <Component id="jPanel1" min="-2" max="-2" attributes="0"/>
  28.139 +                  <EmptySpace max="-2" attributes="0"/>
  28.140 +              </Group>
  28.141 +          </Group>
  28.142 +        </DimensionLayout>
  28.143 +      </Layout>
  28.144 +      <SubComponents>
  28.145 +        <Container class="javax.swing.JPanel" name="jPanel1">
  28.146 +
  28.147 +          <Layout>
  28.148 +            <DimensionLayout dim="0">
  28.149 +              <Group type="103" groupAlignment="0" attributes="0">
  28.150 +                  <Group type="102" alignment="1" attributes="0">
  28.151 +                      <EmptySpace pref="106" max="32767" attributes="0"/>
  28.152 +                      <Component id="rozeslatZkusebniTlacitko" min="-2" max="-2" attributes="0"/>
  28.153 +                      <EmptySpace max="-2" attributes="0"/>
  28.154 +                      <Component id="rozeslatHromadnouZpravuTlacitko" min="-2" max="-2" attributes="0"/>
  28.155 +                      <EmptySpace max="-2" attributes="0"/>
  28.156 +                      <Component id="zobrazitVsechnyPrijemceTlacitko" min="-2" max="-2" attributes="0"/>
  28.157 +                      <EmptySpace max="-2" attributes="0"/>
  28.158 +                  </Group>
  28.159 +              </Group>
  28.160 +            </DimensionLayout>
  28.161 +            <DimensionLayout dim="1">
  28.162 +              <Group type="103" groupAlignment="0" attributes="0">
  28.163 +                  <Group type="102" alignment="0" attributes="0">
  28.164 +                      <EmptySpace max="-2" attributes="0"/>
  28.165 +                      <Group type="103" groupAlignment="3" attributes="0">
  28.166 +                          <Component id="rozeslatHromadnouZpravuTlacitko" alignment="3" min="-2" max="-2" attributes="0"/>
  28.167 +                          <Component id="zobrazitVsechnyPrijemceTlacitko" alignment="3" min="-2" max="-2" attributes="0"/>
  28.168 +                          <Component id="rozeslatZkusebniTlacitko" alignment="3" min="-2" max="-2" attributes="0"/>
  28.169 +                      </Group>
  28.170 +                      <EmptySpace max="32767" attributes="0"/>
  28.171 +                  </Group>
  28.172 +              </Group>
  28.173 +            </DimensionLayout>
  28.174 +          </Layout>
  28.175 +          <SubComponents>
  28.176 +            <Component class="javax.swing.JButton" name="rozeslatZkusebniTlacitko">
  28.177 +              <Properties>
  28.178 +                <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.179 +                  <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/apply.png"/>
  28.180 +                </Property>
  28.181 +                <Property name="mnemonic" type="int" value="117"/>
  28.182 +                <Property name="text" type="java.lang.String" value="Rozeslat zku&#x161;ebn&#xed;"/>
  28.183 +              </Properties>
  28.184 +              <Events>
  28.185 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rozeslatZkusebniTlacitkoActionPerformed"/>
  28.186 +              </Events>
  28.187 +            </Component>
  28.188 +            <Component class="javax.swing.JButton" name="rozeslatHromadnouZpravuTlacitko">
  28.189 +              <Properties>
  28.190 +                <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.191 +                  <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/adept_commit.png"/>
  28.192 +                </Property>
  28.193 +                <Property name="mnemonic" type="int" value="104"/>
  28.194 +                <Property name="text" type="java.lang.String" value="Rozeslat hromadnou zpr&#xe1;vu"/>
  28.195 +              </Properties>
  28.196 +              <Events>
  28.197 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rozeslatHromadnouZpravuTlacitkoActionPerformed"/>
  28.198 +              </Events>
  28.199 +            </Component>
  28.200 +            <Component class="javax.swing.JButton" name="zobrazitVsechnyPrijemceTlacitko">
  28.201 +              <Properties>
  28.202 +                <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.203 +                  <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/zobrazit_adresy.png"/>
  28.204 +                </Property>
  28.205 +                <Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;&#xa;Zobraz&#xed; seznam v&#x161;ech p&#x159;&#xed;jemc&#x16f;m, kter&#xfd;m bude odesl&#xe1;na zpr&#xe1;va.&lt;br/&gt;&#xa;(P&#x159;i velk&#xfd;ch po&#x10d;tech z&#xe1;znam&#x16f; m&#x16f;&#x17e;e b&#xfd;t tato operace n&#xe1;ro&#x10d;n&#xe1;.)&#xa;&lt;/html&gt;"/>
  28.206 +              </Properties>
  28.207 +              <Events>
  28.208 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="zobrazitVsechnyPrijemceTlacitkoActionPerformed"/>
  28.209 +              </Events>
  28.210 +            </Component>
  28.211 +          </SubComponents>
  28.212 +        </Container>
  28.213 +        <Component class="cz.frantovo.superPostak.PanelPrijemcu" name="prijemciZkusebni">
  28.214 +        </Component>
  28.215 +        <Component class="javax.swing.JSeparator" name="jSeparator2">
  28.216 +        </Component>
  28.217 +        <Component class="javax.swing.JLabel" name="jLabel14">
  28.218 +          <Properties>
  28.219 +            <Property name="text" type="java.lang.String" value="Zku&#x161;ebn&#xed; p&#x159;&#xed;jemci"/>
  28.220 +          </Properties>
  28.221 +        </Component>
  28.222 +      </SubComponents>
  28.223 +    </Container>
  28.224 +    <Container class="org.jdesktop.swingx.JXPanel" name="panelPrijemci">
  28.225 +
  28.226 +      <Layout>
  28.227 +        <DimensionLayout dim="0">
  28.228 +          <Group type="103" groupAlignment="0" attributes="0">
  28.229 +              <Group type="102" alignment="1" attributes="0">
  28.230 +                  <EmptySpace max="-2" attributes="0"/>
  28.231 +                  <Group type="103" groupAlignment="1" attributes="0">
  28.232 +                      <Component id="prijemciDodatecni" alignment="0" pref="344" max="32767" attributes="0"/>
  28.233 +                      <Component id="jSeparator1" alignment="0" pref="344" max="32767" attributes="0"/>
  28.234 +                      <Component id="jScrollPane3" alignment="0" pref="344" max="32767" attributes="0"/>
  28.235 +                      <Component id="jLabel13" alignment="0" min="-2" max="-2" attributes="0"/>
  28.236 +                      <Group type="102" alignment="1" attributes="0">
  28.237 +                          <Component id="vystupSQLZprava" pref="52" max="32767" attributes="0"/>
  28.238 +                          <EmptySpace min="-2" pref="127" max="-2" attributes="0"/>
  28.239 +                          <Component id="vyzkousetSQLTlacitko" min="-2" max="-2" attributes="0"/>
  28.240 +                          <EmptySpace max="-2" attributes="0"/>
  28.241 +                          <Component id="zobrazitSQLPrijemceTlacitko" min="-2" max="-2" attributes="0"/>
  28.242 +                      </Group>
  28.243 +                      <Component id="jLabel16" alignment="0" min="-2" max="-2" attributes="0"/>
  28.244 +                  </Group>
  28.245 +                  <EmptySpace max="-2" attributes="0"/>
  28.246 +              </Group>
  28.247 +          </Group>
  28.248 +        </DimensionLayout>
  28.249 +        <DimensionLayout dim="1">
  28.250 +          <Group type="103" groupAlignment="0" attributes="0">
  28.251 +              <Group type="102" alignment="0" attributes="0">
  28.252 +                  <EmptySpace max="-2" attributes="0"/>
  28.253 +                  <Component id="jLabel13" min="-2" max="-2" attributes="0"/>
  28.254 +                  <EmptySpace max="-2" attributes="0"/>
  28.255 +                  <Component id="jScrollPane3" min="-2" max="-2" attributes="0"/>
  28.256 +                  <EmptySpace max="-2" attributes="0"/>
  28.257 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.258 +                      <Component id="vystupSQLZprava" alignment="3" min="-2" pref="14" max="-2" attributes="0"/>
  28.259 +                      <Component id="zobrazitSQLPrijemceTlacitko" alignment="3" min="-2" max="-2" attributes="0"/>
  28.260 +                      <Component id="vyzkousetSQLTlacitko" alignment="3" min="-2" max="-2" attributes="0"/>
  28.261 +                  </Group>
  28.262 +                  <EmptySpace max="-2" attributes="0"/>
  28.263 +                  <Component id="jSeparator1" min="-2" pref="10" max="-2" attributes="0"/>
  28.264 +                  <EmptySpace max="-2" attributes="0"/>
  28.265 +                  <Component id="jLabel16" min="-2" max="-2" attributes="0"/>
  28.266 +                  <EmptySpace max="-2" attributes="0"/>
  28.267 +                  <Component id="prijemciDodatecni" pref="200" max="32767" attributes="0"/>
  28.268 +                  <EmptySpace max="-2" attributes="0"/>
  28.269 +              </Group>
  28.270 +          </Group>
  28.271 +        </DimensionLayout>
  28.272 +      </Layout>
  28.273 +      <SubComponents>
  28.274 +        <Component class="javax.swing.JLabel" name="jLabel13">
  28.275 +          <Properties>
  28.276 +            <Property name="text" type="java.lang.String" value="SQL dotaz"/>
  28.277 +          </Properties>
  28.278 +        </Component>
  28.279 +        <Container class="javax.swing.JScrollPane" name="jScrollPane3">
  28.280 +          <AuxValues>
  28.281 +            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
  28.282 +          </AuxValues>
  28.283 +
  28.284 +          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
  28.285 +          <SubComponents>
  28.286 +            <Component class="javax.swing.JTextArea" name="vstupSQL">
  28.287 +              <Properties>
  28.288 +                <Property name="columns" type="int" value="20"/>
  28.289 +                <Property name="rows" type="int" value="5"/>
  28.290 +              </Properties>
  28.291 +            </Component>
  28.292 +          </SubComponents>
  28.293 +        </Container>
  28.294 +        <Component class="javax.swing.JButton" name="vyzkousetSQLTlacitko">
  28.295 +          <Properties>
  28.296 +            <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.297 +              <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/fork.png"/>
  28.298 +            </Property>
  28.299 +            <Property name="mnemonic" type="int" value="121"/>
  28.300 +            <Property name="text" type="java.lang.String" value="Vyzkou&#x161;et"/>
  28.301 +          </Properties>
  28.302 +          <Events>
  28.303 +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="vyzkousetSQLTlacitkoActionPerformed"/>
  28.304 +          </Events>
  28.305 +        </Component>
  28.306 +        <Component class="javax.swing.JLabel" name="vystupSQLZprava">
  28.307 +          <Properties>
  28.308 +            <Property name="text" type="java.lang.String" value=" "/>
  28.309 +          </Properties>
  28.310 +        </Component>
  28.311 +        <Component class="cz.frantovo.superPostak.PanelPrijemcu" name="prijemciDodatecni">
  28.312 +          <Properties>
  28.313 +            <Property name="toolTipText" type="java.lang.String" value="Zde m&#x16f;&#x17e;ete dopnit dal&#x161;&#xed; p&#x159;ijemce."/>
  28.314 +          </Properties>
  28.315 +        </Component>
  28.316 +        <Component class="javax.swing.JSeparator" name="jSeparator1">
  28.317 +        </Component>
  28.318 +        <Component class="javax.swing.JLabel" name="jLabel16">
  28.319 +          <Properties>
  28.320 +            <Property name="text" type="java.lang.String" value="Dodate&#x10d;n&#xed; p&#x159;&#xed;jemci:"/>
  28.321 +          </Properties>
  28.322 +        </Component>
  28.323 +        <Component class="javax.swing.JButton" name="zobrazitSQLPrijemceTlacitko">
  28.324 +          <Properties>
  28.325 +            <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.326 +              <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/zobrazit_adresy.png"/>
  28.327 +            </Property>
  28.328 +            <Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;&#xa;Zobraz&#xed; seznam adres na&#x10d;ten&#xfd;ch z datab&#xe1;ze.&lt;br/&gt;&#xa;(P&#x159;i velk&#xfd;ch po&#x10d;tech z&#xe1;znam&#x16f; m&#x16f;&#x17e;e b&#xfd;t tato operace n&#xe1;ro&#x10d;n&#xe1;.)&#xa;&lt;/html&gt;"/>
  28.329 +          </Properties>
  28.330 +          <Events>
  28.331 +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="zobrazitSQLPrijemceTlacitkoActionPerformed"/>
  28.332 +          </Events>
  28.333 +        </Component>
  28.334 +      </SubComponents>
  28.335 +    </Container>
  28.336 +    <Container class="org.jdesktop.swingx.JXPanel" name="panelServer">
  28.337 +
  28.338 +      <Layout>
  28.339 +        <DimensionLayout dim="0">
  28.340 +          <Group type="103" groupAlignment="0" attributes="0">
  28.341 +              <Group type="102" alignment="1" attributes="0">
  28.342 +                  <EmptySpace max="-2" attributes="0"/>
  28.343 +                  <Group type="103" groupAlignment="1" attributes="0">
  28.344 +                      <Component id="napovedaSMTPscroll" alignment="0" pref="318" max="32767" attributes="0"/>
  28.345 +                      <Group type="102" alignment="1" attributes="0">
  28.346 +                          <Group type="103" groupAlignment="0" attributes="0">
  28.347 +                              <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/>
  28.348 +                              <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/>
  28.349 +                              <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
  28.350 +                              <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/>
  28.351 +                              <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/>
  28.352 +                          </Group>
  28.353 +                          <EmptySpace max="-2" attributes="0"/>
  28.354 +                          <Group type="103" groupAlignment="0" attributes="0">
  28.355 +                              <Component id="vstupSMTPserver" alignment="0" pref="230" max="32767" attributes="0"/>
  28.356 +                              <Component id="vstupSMTPport" alignment="1" pref="230" max="32767" attributes="0"/>
  28.357 +                              <Component id="vstupSMTPjmeno" alignment="0" pref="230" max="32767" attributes="0"/>
  28.358 +                              <Component id="vstupSMTPheslo" alignment="0" pref="230" max="32767" attributes="0"/>
  28.359 +                              <Component id="vstupSMTPlimitPrijemcu" alignment="0" pref="230" max="32767" attributes="0"/>
  28.360 +                          </Group>
  28.361 +                      </Group>
  28.362 +                  </Group>
  28.363 +                  <EmptySpace max="-2" attributes="0"/>
  28.364 +              </Group>
  28.365 +          </Group>
  28.366 +        </DimensionLayout>
  28.367 +        <DimensionLayout dim="1">
  28.368 +          <Group type="103" groupAlignment="0" attributes="0">
  28.369 +              <Group type="102" alignment="0" attributes="0">
  28.370 +                  <EmptySpace max="-2" attributes="0"/>
  28.371 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.372 +                      <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
  28.373 +                      <Component id="vstupSMTPserver" alignment="3" min="-2" max="-2" attributes="0"/>
  28.374 +                  </Group>
  28.375 +                  <EmptySpace max="-2" attributes="0"/>
  28.376 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.377 +                      <Component id="vstupSMTPport" alignment="3" min="-2" max="-2" attributes="0"/>
  28.378 +                      <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
  28.379 +                  </Group>
  28.380 +                  <EmptySpace max="-2" attributes="0"/>
  28.381 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.382 +                      <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
  28.383 +                      <Component id="vstupSMTPjmeno" alignment="3" min="-2" max="-2" attributes="0"/>
  28.384 +                  </Group>
  28.385 +                  <EmptySpace max="-2" attributes="0"/>
  28.386 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.387 +                      <Component id="vstupSMTPheslo" alignment="3" min="-2" max="-2" attributes="0"/>
  28.388 +                      <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
  28.389 +                  </Group>
  28.390 +                  <EmptySpace max="-2" attributes="0"/>
  28.391 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.392 +                      <Component id="vstupSMTPlimitPrijemcu" alignment="3" min="-2" max="-2" attributes="0"/>
  28.393 +                      <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
  28.394 +                  </Group>
  28.395 +                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
  28.396 +                  <Component id="napovedaSMTPscroll" pref="145" max="32767" attributes="0"/>
  28.397 +                  <EmptySpace max="-2" attributes="0"/>
  28.398 +              </Group>
  28.399 +          </Group>
  28.400 +        </DimensionLayout>
  28.401 +      </Layout>
  28.402 +      <SubComponents>
  28.403 +        <Component class="javax.swing.JLabel" name="jLabel4">
  28.404 +          <Properties>
  28.405 +            <Property name="text" type="java.lang.String" value="SMTP server"/>
  28.406 +          </Properties>
  28.407 +        </Component>
  28.408 +        <Component class="javax.swing.JLabel" name="jLabel5">
  28.409 +          <Properties>
  28.410 +            <Property name="text" type="java.lang.String" value="Port"/>
  28.411 +          </Properties>
  28.412 +        </Component>
  28.413 +        <Component class="javax.swing.JTextField" name="vstupSMTPserver">
  28.414 +          <Properties>
  28.415 +            <Property name="text" type="java.lang.String" value="localhost"/>
  28.416 +          </Properties>
  28.417 +        </Component>
  28.418 +        <Component class="javax.swing.JSpinner" name="vstupSMTPport">
  28.419 +          <Properties>
  28.420 +            <Property name="value" type="java.lang.Object" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
  28.421 +              <Connection code="25" type="code"/>
  28.422 +            </Property>
  28.423 +          </Properties>
  28.424 +        </Component>
  28.425 +        <Container class="javax.swing.JScrollPane" name="napovedaSMTPscroll">
  28.426 +          <AuxValues>
  28.427 +            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
  28.428 +          </AuxValues>
  28.429 +
  28.430 +          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
  28.431 +          <SubComponents>
  28.432 +            <Component class="javax.swing.JTextArea" name="napovedaSMTP">
  28.433 +              <Properties>
  28.434 +                <Property name="columns" type="int" value="20"/>
  28.435 +                <Property name="editable" type="boolean" value="false"/>
  28.436 +                <Property name="lineWrap" type="boolean" value="true"/>
  28.437 +                <Property name="rows" type="int" value="5"/>
  28.438 +                <Property name="text" type="java.lang.String" value="Tip: n&#x11b;kter&#xe9; SMTP servery maj&#xed; omezen&#xfd; seznam po&#x10d;&#xed;ta&#x10d;&#x16f;, ze kter&#xfd;ch p&#x159;ij&#xed;maj&#xed; po&#x161;tu"/>
  28.439 +                <Property name="wrapStyleWord" type="boolean" value="true"/>
  28.440 +              </Properties>
  28.441 +            </Component>
  28.442 +          </SubComponents>
  28.443 +        </Container>
  28.444 +        <Component class="javax.swing.JLabel" name="jLabel6">
  28.445 +          <Properties>
  28.446 +            <Property name="text" type="java.lang.String" value="Jm&#xe9;no"/>
  28.447 +          </Properties>
  28.448 +        </Component>
  28.449 +        <Component class="javax.swing.JTextField" name="vstupSMTPjmeno">
  28.450 +        </Component>
  28.451 +        <Component class="javax.swing.JPasswordField" name="vstupSMTPheslo">
  28.452 +        </Component>
  28.453 +        <Component class="javax.swing.JLabel" name="jLabel7">
  28.454 +          <Properties>
  28.455 +            <Property name="text" type="java.lang.String" value="Heslo"/>
  28.456 +          </Properties>
  28.457 +        </Component>
  28.458 +        <Component class="javax.swing.JSpinner" name="vstupSMTPlimitPrijemcu">
  28.459 +          <Properties>
  28.460 +            <Property name="value" type="java.lang.Object" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
  28.461 +              <Connection code="1000" type="code"/>
  28.462 +            </Property>
  28.463 +          </Properties>
  28.464 +        </Component>
  28.465 +        <Component class="javax.swing.JLabel" name="jLabel8">
  28.466 +          <Properties>
  28.467 +            <Property name="text" type="java.lang.String" value="Limit p&#x159;&#xed;jemc&#x16f;"/>
  28.468 +          </Properties>
  28.469 +        </Component>
  28.470 +      </SubComponents>
  28.471 +    </Container>
  28.472 +    <Container class="org.jdesktop.swingx.JXPanel" name="panelVychoziPrijemci">
  28.473 +
  28.474 +      <Layout>
  28.475 +        <DimensionLayout dim="0">
  28.476 +          <Group type="103" groupAlignment="0" attributes="0">
  28.477 +              <Group type="102" alignment="1" attributes="0">
  28.478 +                  <EmptySpace max="-2" attributes="0"/>
  28.479 +                  <Group type="103" groupAlignment="1" attributes="0">
  28.480 +                      <Component id="prijemciVychozi" alignment="0" pref="514" max="32767" attributes="0"/>
  28.481 +                      <Component id="jLabel12" alignment="0" pref="514" max="32767" attributes="0"/>
  28.482 +                  </Group>
  28.483 +                  <EmptySpace max="-2" attributes="0"/>
  28.484 +              </Group>
  28.485 +          </Group>
  28.486 +        </DimensionLayout>
  28.487 +        <DimensionLayout dim="1">
  28.488 +          <Group type="103" groupAlignment="0" attributes="0">
  28.489 +              <Group type="102" alignment="0" attributes="0">
  28.490 +                  <EmptySpace max="-2" attributes="0"/>
  28.491 +                  <Component id="jLabel12" min="-2" max="-2" attributes="0"/>
  28.492 +                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
  28.493 +                  <Component id="prijemciVychozi" pref="261" max="32767" attributes="0"/>
  28.494 +                  <EmptySpace max="-2" attributes="0"/>
  28.495 +              </Group>
  28.496 +          </Group>
  28.497 +        </DimensionLayout>
  28.498 +      </Layout>
  28.499 +      <SubComponents>
  28.500 +        <Component class="cz.frantovo.superPostak.PanelPrijemcu" name="prijemciVychozi">
  28.501 +        </Component>
  28.502 +        <Component class="javax.swing.JLabel" name="jLabel12">
  28.503 +          <Properties>
  28.504 +            <Property name="text" type="java.lang.String" value="T&#x11b;mto lidem p&#x159;ijde hromadn&#xfd; e-mail v&#x17e;dy (net&#xfd;k&#xe1; se zku&#x161;ebn&#xed;ho rozesl&#xe1;n&#xed; zpr&#xe1;vy)."/>
  28.505 +          </Properties>
  28.506 +        </Component>
  28.507 +      </SubComponents>
  28.508 +    </Container>
  28.509 +    <Container class="org.jdesktop.swingx.JXPanel" name="panelZprava">
  28.510 +
  28.511 +      <Layout>
  28.512 +        <DimensionLayout dim="0">
  28.513 +          <Group type="103" groupAlignment="0" attributes="0">
  28.514 +              <Group type="102" alignment="1" attributes="0">
  28.515 +                  <EmptySpace max="-2" attributes="0"/>
  28.516 +                  <Group type="103" groupAlignment="1" attributes="0">
  28.517 +                      <Component id="jScrollPane1" alignment="0" pref="438" max="32767" attributes="0"/>
  28.518 +                      <Group type="102" alignment="1" attributes="0">
  28.519 +                          <Group type="103" groupAlignment="1" attributes="0">
  28.520 +                              <Group type="102" attributes="0">
  28.521 +                                  <Group type="103" groupAlignment="0" attributes="0">
  28.522 +                                      <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
  28.523 +                                      <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
  28.524 +                                  </Group>
  28.525 +                                  <EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
  28.526 +                              </Group>
  28.527 +                              <Group type="102" alignment="1" attributes="0">
  28.528 +                                  <Component id="odpovedetKomuOdkaz" min="-2" max="-2" attributes="0"/>
  28.529 +                                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
  28.530 +                              </Group>
  28.531 +                          </Group>
  28.532 +                          <Group type="103" groupAlignment="0" attributes="0">
  28.533 +                              <Component id="vstupJmenoOdesilatele" alignment="0" pref="328" max="32767" attributes="0"/>
  28.534 +                              <Component id="vstupAdresaOdesilatele" alignment="0" pref="328" max="32767" attributes="0"/>
  28.535 +                              <Component id="vstupPredmet" alignment="0" pref="328" max="32767" attributes="0"/>
  28.536 +                          </Group>
  28.537 +                      </Group>
  28.538 +                      <Group type="102" alignment="0" attributes="0">
  28.539 +                          <Component id="jLabel15" min="-2" max="-2" attributes="0"/>
  28.540 +                          <EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
  28.541 +                          <Component id="vstupFormatHTML" pref="81" max="32767" attributes="0"/>
  28.542 +                          <EmptySpace min="-2" pref="247" max="-2" attributes="0"/>
  28.543 +                      </Group>
  28.544 +                  </Group>
  28.545 +                  <EmptySpace max="-2" attributes="0"/>
  28.546 +              </Group>
  28.547 +          </Group>
  28.548 +        </DimensionLayout>
  28.549 +        <DimensionLayout dim="1">
  28.550 +          <Group type="103" groupAlignment="0" attributes="0">
  28.551 +              <Group type="102" alignment="0" attributes="0">
  28.552 +                  <EmptySpace max="-2" attributes="0"/>
  28.553 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.554 +                      <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
  28.555 +                      <Component id="vstupPredmet" alignment="3" min="-2" max="-2" attributes="0"/>
  28.556 +                  </Group>
  28.557 +                  <EmptySpace max="-2" attributes="0"/>
  28.558 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.559 +                      <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
  28.560 +                      <Component id="vstupJmenoOdesilatele" alignment="3" min="-2" max="-2" attributes="0"/>
  28.561 +                  </Group>
  28.562 +                  <EmptySpace max="-2" attributes="0"/>
  28.563 +                  <Group type="103" groupAlignment="0" attributes="0">
  28.564 +                      <Component id="vstupAdresaOdesilatele" min="-2" max="-2" attributes="0"/>
  28.565 +                      <Component id="odpovedetKomuOdkaz" min="-2" max="-2" attributes="0"/>
  28.566 +                  </Group>
  28.567 +                  <EmptySpace max="-2" attributes="0"/>
  28.568 +                  <Component id="jScrollPane1" pref="184" max="32767" attributes="0"/>
  28.569 +                  <EmptySpace max="-2" attributes="0"/>
  28.570 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.571 +                      <Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/>
  28.572 +                      <Component id="vstupFormatHTML" alignment="3" min="-2" max="-2" attributes="0"/>
  28.573 +                  </Group>
  28.574 +                  <EmptySpace max="-2" attributes="0"/>
  28.575 +              </Group>
  28.576 +          </Group>
  28.577 +        </DimensionLayout>
  28.578 +      </Layout>
  28.579 +      <SubComponents>
  28.580 +        <Component class="javax.swing.JLabel" name="jLabel1">
  28.581 +          <Properties>
  28.582 +            <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
  28.583 +              <ComponentRef name="vstupPredmet"/>
  28.584 +            </Property>
  28.585 +            <Property name="text" type="java.lang.String" value="P&#x159;edm&#x11b;t"/>
  28.586 +          </Properties>
  28.587 +        </Component>
  28.588 +        <Component class="javax.swing.JTextField" name="vstupPredmet">
  28.589 +          <Events>
  28.590 +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="vstupPredmetActionPerformed"/>
  28.591 +          </Events>
  28.592 +        </Component>
  28.593 +        <Component class="javax.swing.JLabel" name="jLabel2">
  28.594 +          <Properties>
  28.595 +            <Property name="text" type="java.lang.String" value="Jm&#xe9;no odes&#xed;latele"/>
  28.596 +          </Properties>
  28.597 +        </Component>
  28.598 +        <Component class="javax.swing.JTextField" name="vstupJmenoOdesilatele">
  28.599 +        </Component>
  28.600 +        <Component class="javax.swing.JTextField" name="vstupAdresaOdesilatele">
  28.601 +        </Component>
  28.602 +        <Container class="javax.swing.JScrollPane" name="jScrollPane1">
  28.603 +          <AuxValues>
  28.604 +            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
  28.605 +          </AuxValues>
  28.606 +
  28.607 +          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
  28.608 +          <SubComponents>
  28.609 +            <Component class="javax.swing.JTextArea" name="vstupZprava">
  28.610 +              <Properties>
  28.611 +                <Property name="columns" type="int" value="20"/>
  28.612 +                <Property name="rows" type="int" value="5"/>
  28.613 +              </Properties>
  28.614 +            </Component>
  28.615 +          </SubComponents>
  28.616 +        </Container>
  28.617 +        <Component class="javax.swing.JLabel" name="jLabel15">
  28.618 +          <Properties>
  28.619 +            <Property name="text" type="java.lang.String" value="Form&#xe1;t zpr&#xe1;vy"/>
  28.620 +          </Properties>
  28.621 +        </Component>
  28.622 +        <Component class="javax.swing.JCheckBox" name="vstupFormatHTML">
  28.623 +          <Properties>
  28.624 +            <Property name="mnemonic" type="int" value="104"/>
  28.625 +            <Property name="text" type="java.lang.String" value="HTML"/>
  28.626 +            <Property name="toolTipText" type="java.lang.String" value="P&#x159;i neza&#x161;krtnut&#xed; se ode&#x161;le jako prost&#xfd; text"/>
  28.627 +          </Properties>
  28.628 +        </Component>
  28.629 +        <Component class="org.jdesktop.swingx.JXHyperlink" name="odpovedetKomuOdkaz">
  28.630 +          <Properties>
  28.631 +            <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
  28.632 +              <Color blue="33" green="33" id="windowText" palette="3" red="33" type="palette"/>
  28.633 +            </Property>
  28.634 +            <Property name="mnemonic" type="int" value="101"/>
  28.635 +            <Property name="text" type="java.lang.String" value="Adresa odes&#xed;latele"/>
  28.636 +            <Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;&lt;p&gt;Klikn&#x11b;te sem pro nastaven&#xed; adresy,&lt;/p&gt;&lt;p&gt;na kterou maj&#xed; chodit odpov&#x11b;di&lt;/p&gt;&lt;/html&gt;"/>
  28.637 +            <Property name="clickedColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
  28.638 +              <Color blue="33" green="33" id="windowText" palette="3" red="33" type="palette"/>
  28.639 +            </Property>
  28.640 +            <Property name="unclickedColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
  28.641 +              <Color blue="33" green="33" id="windowText" palette="3" red="33" type="palette"/>
  28.642 +            </Property>
  28.643 +          </Properties>
  28.644 +          <Events>
  28.645 +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="odpovedetKomuOdkazActionPerformed"/>
  28.646 +          </Events>
  28.647 +        </Component>
  28.648 +      </SubComponents>
  28.649 +    </Container>
  28.650 +    <Container class="javax.swing.JDialog" name="odpovedetKomuDialog">
  28.651 +      <Properties>
  28.652 +        <Property name="title" type="java.lang.String" value="Adresa pro odpov&#x11b;di"/>
  28.653 +        <Property name="modal" type="boolean" value="true"/>
  28.654 +      </Properties>
  28.655 +
  28.656 +      <Layout>
  28.657 +        <DimensionLayout dim="0">
  28.658 +          <Group type="103" groupAlignment="0" attributes="0">
  28.659 +              <Group type="102" attributes="0">
  28.660 +                  <EmptySpace max="-2" attributes="0"/>
  28.661 +                  <Group type="103" groupAlignment="0" attributes="0">
  28.662 +                      <Group type="102" alignment="0" attributes="0">
  28.663 +                          <Group type="103" groupAlignment="0" attributes="0">
  28.664 +                              <Component id="jLabel19" alignment="0" min="-2" max="-2" attributes="0"/>
  28.665 +                              <Component id="jLabel18" alignment="0" min="-2" max="-2" attributes="0"/>
  28.666 +                          </Group>
  28.667 +                          <EmptySpace max="-2" attributes="0"/>
  28.668 +                          <Group type="103" groupAlignment="1" attributes="0">
  28.669 +                              <Component id="odpovedetKomuAdresa" pref="332" max="32767" attributes="0"/>
  28.670 +                              <Component id="odpovedetKomuJmeno" alignment="0" pref="332" max="32767" attributes="0"/>
  28.671 +                          </Group>
  28.672 +                      </Group>
  28.673 +                      <Component id="jLabel17" alignment="0" pref="382" max="32767" attributes="0"/>
  28.674 +                      <Component id="odpovedetKomuHotovo" alignment="1" min="-2" max="-2" attributes="0"/>
  28.675 +                  </Group>
  28.676 +                  <EmptySpace max="-2" attributes="0"/>
  28.677 +              </Group>
  28.678 +          </Group>
  28.679 +        </DimensionLayout>
  28.680 +        <DimensionLayout dim="1">
  28.681 +          <Group type="103" groupAlignment="0" attributes="0">
  28.682 +              <Group type="102" alignment="0" attributes="0">
  28.683 +                  <EmptySpace max="-2" attributes="0"/>
  28.684 +                  <Group type="103" groupAlignment="3" attributes="0">
  28.685 +                      <Component id="jLabel18" alignment="3" min="-2" max="-2" attributes="0"/>
  28.686 +                      <Component id="odpovedetKomuJmeno" alignment="3" min="-2" max="-2" attributes="0"/>
  28.687 +                  </Group>
  28.688 +                  <EmptySpace max="-2" attributes="0"/>
  28.689 +                  <Group type="103" groupAlignment="1" attributes="0">
  28.690 +                      <Component id="jLabel19" min="-2" max="-2" attributes="0"/>
  28.691 +                      <Component id="odpovedetKomuAdresa" min="-2" max="-2" attributes="0"/>
  28.692 +                  </Group>
  28.693 +                  <EmptySpace max="-2" attributes="0"/>
  28.694 +                  <Component id="jLabel17" min="-2" max="-2" attributes="0"/>
  28.695 +                  <EmptySpace max="32767" attributes="0"/>
  28.696 +                  <Component id="odpovedetKomuHotovo" min="-2" max="-2" attributes="0"/>
  28.697 +                  <EmptySpace max="-2" attributes="0"/>
  28.698 +              </Group>
  28.699 +          </Group>
  28.700 +        </DimensionLayout>
  28.701 +      </Layout>
  28.702 +      <SubComponents>
  28.703 +        <Component class="javax.swing.JLabel" name="jLabel18">
  28.704 +          <Properties>
  28.705 +            <Property name="text" type="java.lang.String" value="Jm&#xe9;no"/>
  28.706 +          </Properties>
  28.707 +        </Component>
  28.708 +        <Component class="javax.swing.JLabel" name="jLabel19">
  28.709 +          <Properties>
  28.710 +            <Property name="text" type="java.lang.String" value="Adresa"/>
  28.711 +          </Properties>
  28.712 +        </Component>
  28.713 +        <Component class="javax.swing.JLabel" name="jLabel17">
  28.714 +          <Properties>
  28.715 +            <Property name="text" type="java.lang.String" value="&lt;html&gt;&#xa;&lt;p&gt;Pokud bude p&#x159;&#xed;jemce na hromadnou zpr&#xe1;vu odpov&#xed;dat,&lt;/p&gt;&#xa;&lt;p&gt;odpov&#x11b;&#x10f; p&#x159;ijde na tuto adresu.&lt;/p&gt;&#xa;&lt;p&gt;Pokud tyto &#xfa;daje nevypln&#xed;te, nebo zad&#xe1;te chybn&#xfd; e-mail,&lt;/p&gt;&#xa;&lt;p&gt;budou odpov&#x11b;di chodit odes&#xed;lateli.&lt;/p&gt;&#xa;&lt;/html&gt;"/>
  28.716 +          </Properties>
  28.717 +        </Component>
  28.718 +        <Component class="javax.swing.JTextField" name="odpovedetKomuJmeno">
  28.719 +        </Component>
  28.720 +        <Component class="javax.swing.JTextField" name="odpovedetKomuAdresa">
  28.721 +        </Component>
  28.722 +        <Component class="javax.swing.JButton" name="odpovedetKomuHotovo">
  28.723 +          <Properties>
  28.724 +            <Property name="text" type="java.lang.String" value="Hotovo"/>
  28.725 +          </Properties>
  28.726 +          <Events>
  28.727 +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="odpovedetKomuHotovoActionPerformed"/>
  28.728 +          </Events>
  28.729 +        </Component>
  28.730 +      </SubComponents>
  28.731 +    </Container>
  28.732 +  </NonVisualComponents>
  28.733 +  <Properties>
  28.734 +    <Property name="title" type="java.lang.String" value="SuperPo&#x161;&#x165;&#xe1;k"/>
  28.735 +  </Properties>
  28.736 +  <SyntheticProperties>
  28.737 +    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
  28.738 +  </SyntheticProperties>
  28.739 +  <Events>
  28.740 +    <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
  28.741 +  </Events>
  28.742 +  <AuxValues>
  28.743 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
  28.744 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  28.745 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
  28.746 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
  28.747 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
  28.748 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  28.749 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  28.750 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  28.751 +  </AuxValues>
  28.752 +
  28.753 +  <Layout>
  28.754 +    <DimensionLayout dim="0">
  28.755 +      <Group type="103" groupAlignment="0" attributes="0">
  28.756 +          <Group type="102" alignment="0" attributes="0">
  28.757 +              <Component id="taskPanel" min="-2" pref="196" max="-2" attributes="0"/>
  28.758 +              <EmptySpace max="-2" attributes="0"/>
  28.759 +              <Component id="panel" pref="342" max="32767" attributes="0"/>
  28.760 +          </Group>
  28.761 +          <Component id="jXHeader1" alignment="1" pref="544" max="32767" attributes="0"/>
  28.762 +      </Group>
  28.763 +    </DimensionLayout>
  28.764 +    <DimensionLayout dim="1">
  28.765 +      <Group type="103" groupAlignment="0" attributes="0">
  28.766 +          <Group type="102" attributes="0">
  28.767 +              <Component id="jXHeader1" min="-2" max="-2" attributes="0"/>
  28.768 +              <EmptySpace max="-2" attributes="0"/>
  28.769 +              <Group type="103" groupAlignment="1" attributes="0">
  28.770 +                  <Component id="taskPanel" pref="340" max="32767" attributes="0"/>
  28.771 +                  <Component id="panel" alignment="0" pref="340" max="32767" attributes="0"/>
  28.772 +              </Group>
  28.773 +          </Group>
  28.774 +      </Group>
  28.775 +    </DimensionLayout>
  28.776 +  </Layout>
  28.777 +  <SubComponents>
  28.778 +    <Component class="org.jdesktop.swingx.JXHeader" name="jXHeader1">
  28.779 +      <Properties>
  28.780 +        <Property name="description" type="java.lang.String" value="Program pro pos&#xed;l&#xe1;n&#xed; hromadn&#xfd;ch zpr&#xe1;v elektronickou po&#x161;tou.&#xa;Nezneu&#x17e;&#xed;vejte pro rozes&#xed;l&#xe1;n&#xed; spamu."/>
  28.781 +        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.782 +          <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/xfmail.png"/>
  28.783 +        </Property>
  28.784 +        <Property name="title" type="java.lang.String" value="SuperPo&#x161;&#x165;&#xe1;k"/>
  28.785 +      </Properties>
  28.786 +    </Component>
  28.787 +    <Container class="org.jdesktop.swingx.JXTaskPaneContainer" name="taskPanel">
  28.788 +      <Properties>
  28.789 +        <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
  28.790 +          <Color blue="ee" green="ee" id="Button.background" palette="3" red="ee" type="palette"/>
  28.791 +        </Property>
  28.792 +      </Properties>
  28.793 +      <SubComponents>
  28.794 +        <Container class="org.jdesktop.swingx.JXTaskPane" name="jXTaskPane1">
  28.795 +          <Properties>
  28.796 +            <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.797 +              <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/mail_generic.png"/>
  28.798 +            </Property>
  28.799 +            <Property name="title" type="java.lang.String" value="Hromadn&#xe1; zpr&#xe1;va"/>
  28.800 +          </Properties>
  28.801 +          <SubComponents>
  28.802 +            <Component class="org.jdesktop.swingx.JXHyperlink" name="lnText">
  28.803 +              <Properties>
  28.804 +                <Property name="mnemonic" type="int" value="122"/>
  28.805 +                <Property name="text" type="java.lang.String" value="Text zpr&#xe1;vy"/>
  28.806 +                <Property name="actionCommand" type="java.lang.String" value="Zpr&#xe1;va"/>
  28.807 +              </Properties>
  28.808 +              <Events>
  28.809 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="lnTextActionPerformed"/>
  28.810 +              </Events>
  28.811 +            </Component>
  28.812 +            <Component class="org.jdesktop.swingx.JXHyperlink" name="lnPrijemci">
  28.813 +              <Properties>
  28.814 +                <Property name="mnemonic" type="int" value="112"/>
  28.815 +                <Property name="text" type="java.lang.String" value="P&#x159;&#xed;jemci"/>
  28.816 +              </Properties>
  28.817 +              <Events>
  28.818 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="lnPrijemciActionPerformed"/>
  28.819 +              </Events>
  28.820 +            </Component>
  28.821 +            <Component class="org.jdesktop.swingx.JXHyperlink" name="lnOdeslat">
  28.822 +              <Properties>
  28.823 +                <Property name="mnemonic" type="int" value="111"/>
  28.824 +                <Property name="text" type="java.lang.String" value="Odeslat"/>
  28.825 +              </Properties>
  28.826 +              <Events>
  28.827 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="lnOdeslatActionPerformed"/>
  28.828 +              </Events>
  28.829 +            </Component>
  28.830 +          </SubComponents>
  28.831 +        </Container>
  28.832 +        <Container class="org.jdesktop.swingx.JXTaskPane" name="jXTaskPane2">
  28.833 +          <Properties>
  28.834 +            <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
  28.835 +              <Image iconType="3" name="/cz/frantovo/superPostak/obrazky/gear.png"/>
  28.836 +            </Property>
  28.837 +            <Property name="title" type="java.lang.String" value="Nastaven&#xed;"/>
  28.838 +          </Properties>
  28.839 +          <SubComponents>
  28.840 +            <Component class="org.jdesktop.swingx.JXHyperlink" name="lnServer">
  28.841 +              <Properties>
  28.842 +                <Property name="mnemonic" type="int" value="115"/>
  28.843 +                <Property name="text" type="java.lang.String" value="Po&#x161;tovn&#xed; server"/>
  28.844 +              </Properties>
  28.845 +              <Events>
  28.846 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="lnServerActionPerformed"/>
  28.847 +              </Events>
  28.848 +            </Component>
  28.849 +            <Component class="org.jdesktop.swingx.JXHyperlink" name="lnDatabaze">
  28.850 +              <Properties>
  28.851 +                <Property name="mnemonic" type="int" value="100"/>
  28.852 +                <Property name="text" type="java.lang.String" value="Datab&#xe1;ze"/>
  28.853 +              </Properties>
  28.854 +              <Events>
  28.855 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="lnDatabazeActionPerformed"/>
  28.856 +              </Events>
  28.857 +            </Component>
  28.858 +            <Component class="org.jdesktop.swingx.JXHyperlink" name="lnVychoziPrijemci">
  28.859 +              <Properties>
  28.860 +                <Property name="mnemonic" type="int" value="118"/>
  28.861 +                <Property name="text" type="java.lang.String" value="V&#xfd;choz&#xed; p&#x159;&#xed;jemci"/>
  28.862 +              </Properties>
  28.863 +              <Events>
  28.864 +                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="lnVychoziPrijemciActionPerformed"/>
  28.865 +              </Events>
  28.866 +            </Component>
  28.867 +          </SubComponents>
  28.868 +        </Container>
  28.869 +      </SubComponents>
  28.870 +    </Container>
  28.871 +    <Container class="org.jdesktop.swingx.JXPanel" name="panel">
  28.872 +
  28.873 +      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/>
  28.874 +    </Container>
  28.875 +  </SubComponents>
  28.876 +</Form>
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/SuperPostak.java	Sun Nov 23 22:19:20 2008 +0100
    29.3 @@ -0,0 +1,1241 @@
    29.4 +package cz.frantovo.superPostak;
    29.5 +
    29.6 +import cz.frantovo.postak.HromadnaZprava;
    29.7 +import cz.frantovo.postak.InternetAddressKomu;
    29.8 +import cz.frantovo.postak.Nastaveni;
    29.9 +import cz.frantovo.postak.Postak;
   29.10 +import java.awt.CardLayout;
   29.11 +import java.awt.Component;
   29.12 +import java.awt.Cursor;
   29.13 +import java.awt.Dialog.ModalityType;
   29.14 +import java.awt.KeyboardFocusManager;
   29.15 +import java.beans.XMLDecoder;
   29.16 +import java.beans.XMLEncoder;
   29.17 +import java.io.BufferedInputStream;
   29.18 +import java.io.BufferedOutputStream;
   29.19 +import java.io.File;
   29.20 +import java.io.FileInputStream;
   29.21 +import java.io.FileNotFoundException;
   29.22 +import java.io.FileOutputStream;
   29.23 +import java.io.IOException;
   29.24 +import java.io.UnsupportedEncodingException;
   29.25 +import java.sql.SQLException;
   29.26 +import java.util.ArrayList;
   29.27 +import java.util.Collection;
   29.28 +import java.util.logging.Level;
   29.29 +import java.util.logging.Logger;
   29.30 +import java.util.zip.GZIPInputStream;
   29.31 +import java.util.zip.GZIPOutputStream;
   29.32 +import javax.mail.MessagingException;
   29.33 +import javax.mail.internet.InternetAddress;
   29.34 +import javax.swing.JComponent;
   29.35 +import javax.swing.JDialog;
   29.36 +import javax.swing.JOptionPane;
   29.37 +import javax.swing.JTextArea;
   29.38 +import javax.swing.LookAndFeel;
   29.39 +import javax.swing.UIManager;
   29.40 +import javax.swing.UnsupportedLookAndFeelException;
   29.41 +import org.jdesktop.swingx.JXErrorPane;
   29.42 +import org.jdesktop.swingx.JXTaskPaneContainer;
   29.43 +import org.jdesktop.swingx.error.ErrorInfo;
   29.44 +import org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel;
   29.45 +
   29.46 +/**
   29.47 + *
   29.48 + * @author  fiki
   29.49 + */
   29.50 +public class SuperPostak extends javax.swing.JFrame {
   29.51 +
   29.52 +    /** Soubor, kde je uložené nastavení */
   29.53 +    private static final String NASTAVENI_SOUBOR = "Nastaveni.xml.gz";
   29.54 +    private static final String CERTIFIKATY_SOUBOR = "DuveryhodneCertifikaty.keystore";
   29.55 +    private static final String NASTAVENI_SLOZKA = ".SuperPostak";
   29.56 +    private static final String DOMACI_ADRESAR = System.getProperty("user.home");
   29.57 +    private static Logger log = Logger.getLogger(SuperPostak.class.getName());
   29.58 +    private Nastaveni nastaveni = new Nastaveni();
   29.59 +    private Postak postak = new Postak(nastaveni);
   29.60 +
   29.61 +    /**
   29.62 +     * Creates new form SuperPostak
   29.63 +     * @param ladit předvyplní testovací hodnoty - zprávu
   29.64 +     * @param exit při zavření okna ukončí program     
   29.65 +     */
   29.66 +    public SuperPostak(boolean ladit, boolean exit) {
   29.67 +        log.log(Level.WARNING, "Program byl spuštěn.");
   29.68 +        nactiOvladaceJDBC();
   29.69 +        vytvorSlozkuProgramu();
   29.70 +        initComponents();
   29.71 +
   29.72 +        nactiNastaveni();
   29.73 +        ulozNastaveni();
   29.74 +        nastaveni.setCestaKCertifikatum(getCestaKCertifikatum());
   29.75 +
   29.76 +        inicializujCardLayout();
   29.77 +        setLocationRelativeTo(null);
   29.78 +
   29.79 +        /** Vyřešíme problém TAB vs. Focus */
   29.80 +        vyresitTabFocusProblem(vstupSQL);
   29.81 +        vyresitTabFocusProblem(vstupZprava);
   29.82 +
   29.83 +        /** Ladicí hodnoty */
   29.84 +        if (ladit) {
   29.85 +            nastavLadiciHodnoty();
   29.86 +        }
   29.87 +        
   29.88 +        if (exit) {
   29.89 +            setDefaultCloseOperation(EXIT_ON_CLOSE);
   29.90 +        }
   29.91 +
   29.92 +
   29.93 +    }
   29.94 +
   29.95 +    private void inicializujCardLayout() {
   29.96 +        panelDatabaze.setName("panelDatabaze");
   29.97 +        panelOdeslat.setName("panelOdeslat");
   29.98 +        panelPrijemci.setName("panelPrijemci");
   29.99 +        panelServer.setName("panelServer");
  29.100 +        panelVychoziPrijemci.setName("panelVychoziPrijemci");
  29.101 +        panelZprava.setName("panelZprava");
  29.102 +
  29.103 +        panel.add(panelDatabaze, panelDatabaze.getName());
  29.104 +        panel.add(panelOdeslat, panelOdeslat.getName());
  29.105 +        panel.add(panelPrijemci, panelPrijemci.getName());
  29.106 +        panel.add(panelServer, panelServer.getName());
  29.107 +        panel.add(panelVychoziPrijemci, panelVychoziPrijemci.getName());
  29.108 +        panel.add(panelZprava, panelZprava.getName());
  29.109 +
  29.110 +        setPanel(panelZprava);
  29.111 +        pack();
  29.112 +    }
  29.113 +
  29.114 +    /**
  29.115 +     * Vyplní formuláře (odesílatel, předmět, zpráva, příjemci...) výchozími hodnotami,
  29.116 +     * aby se dal program testovat jedním kliknutím.
  29.117 +     */
  29.118 +    private void nastavLadiciHodnoty() {
  29.119 +        try {
  29.120 +            vstupAdresaOdesilatele.setText("SuperPostak@frantovo.cz");
  29.121 +            vstupJmenoOdesilatele.setText("SuperPošťák");
  29.122 +            vstupPredmet.setText("Zkušební zpráva od SuperPošťáka");
  29.123 +            vstupZprava.setText("Toto je obyčejná zkušební zpráva v češtině :-)");
  29.124 +            ArrayList<InternetAddressKomu> adresy = new ArrayList<InternetAddressKomu>();
  29.125 +            adresy.add(new InternetAddressKomu("SuperPostak@frantovo.cz", "SuperPošťák"));
  29.126 +            prijemciZkusebni.setAdresy(adresy);
  29.127 +        } catch (UnsupportedEncodingException e) {
  29.128 +            log.log(Level.SEVERE, null, e);
  29.129 +        }
  29.130 +    }
  29.131 +
  29.132 +    /**
  29.133 +     * Pokusíme se načíst ovladače pro různé DB a výsledek zapíšeme do logu.
  29.134 +     * Další ovladače je možné přidat pomocí manifestu v příslušných knihovnách.
  29.135 +     * viz http://www.sweb.cz/pichlik/archive/2006_08_06_archive.html#115502885631518161
  29.136 +     */
  29.137 +    private void nactiOvladaceJDBC() {
  29.138 +        nactiOvladacJDBC("org.postgresql.Driver", "PostgreSQL");
  29.139 +        nactiOvladacJDBC("com.mysql.jdbc.Driver", "MySQL");
  29.140 +        nactiOvladacJDBC("net.sourceforge.jtds.jdbc.Driver", "jTDS Sybase a MS SQL");
  29.141 +        nactiOvladacJDBC("com.sybase.jdbc2.jdbc.SybDriver", "Sybase.com");
  29.142 +    }
  29.143 +
  29.144 +    /**
  29.145 +     * @param trida ovladač databáze, který se má načíst
  29.146 +     * @param jmeno název databáze     
  29.147 +     */
  29.148 +    private void nactiOvladacJDBC(String trida, String jmeno) {
  29.149 +        try {
  29.150 +            Class.forName(trida);
  29.151 +            log.log(Level.INFO, "JDBC ovladač pro " + jmeno + " byl úspěšně načten.");
  29.152 +        } catch (ClassNotFoundException e) {
  29.153 +            log.log(Level.INFO, "JDBC ovladač pro " + jmeno + " se nepodařilo načíst.");
  29.154 +        }
  29.155 +    }
  29.156 +
  29.157 +    /** Vrací plnou cestu k souboru s nastavením */
  29.158 +    protected static String getCestaKCertifikatum() {
  29.159 +        return getCestaKeSlozceProgramu() + CERTIFIKATY_SOUBOR;
  29.160 +    }
  29.161 +
  29.162 +    /** Vrací plnou cestu k souboru s nastavením */
  29.163 +    protected static String getCestaKNastaveni() {
  29.164 +        return getCestaKeSlozceProgramu() + NASTAVENI_SOUBOR;
  29.165 +    }
  29.166 +
  29.167 +    /** Vrací plnou cestu ke složce programu (nastavení, certifikáty a logy) */
  29.168 +    protected static String getCestaKeSlozceProgramu() {
  29.169 +        return DOMACI_ADRESAR + File.separator + NASTAVENI_SLOZKA + File.separator;
  29.170 +    }
  29.171 +
  29.172 +    /** Načte nastavení ze souboru */
  29.173 +    private void nactiNastaveni() {
  29.174 +        try {
  29.175 +            XMLDecoder d = new XMLDecoder(new BufferedInputStream(new GZIPInputStream(new FileInputStream(getCestaKNastaveni()))));
  29.176 +            Object xmlObjekt = d.readObject();
  29.177 +            d.close();
  29.178 +
  29.179 +            if (xmlObjekt instanceof Nastaveni) {
  29.180 +                nastaveni = (Nastaveni) xmlObjekt;
  29.181 +            } else {
  29.182 +                nastaveni = new Nastaveni();
  29.183 +                log.log(Level.SEVERE, "Nepodařilo se načíst nastavení: není instancí");
  29.184 +            }
  29.185 +
  29.186 +            nactiNastaveniGUI();
  29.187 +
  29.188 +            log.log(Level.INFO, "Nastavení bylo načteno.");
  29.189 +        } catch (FileNotFoundException ex) {
  29.190 +            log.log(Level.SEVERE, "Nepodařilo se načíst nastavení: soubor nenalezen", ex);
  29.191 +        } catch (IOException ex) {
  29.192 +            log.log(Level.SEVERE, "Nastavení se nepodařilo načíst: I/O.", ex);
  29.193 +        }
  29.194 +    }
  29.195 +
  29.196 +    /** Vytvoří (pokud neexistuje) v domovském adresáři složku, kam se ukládá nastavení a případně logy */
  29.197 +    private static boolean vytvorSlozkuProgramu() {
  29.198 +        if (new File(getCestaKeSlozceProgramu()).mkdirs()) {
  29.199 +            log.log(Level.INFO, "Složka pro nastavení programu byla vytvořena: " + getCestaKeSlozceProgramu());
  29.200 +            return true;
  29.201 +        } else {
  29.202 +            return false;
  29.203 +        }
  29.204 +    }
  29.205 +
  29.206 +    /** Uloží nastavení do souboru */
  29.207 +    private void ulozNastaveni() {
  29.208 +        try {
  29.209 +            ulozNastaveniGUI();
  29.210 +
  29.211 +            vytvorSlozkuProgramu();
  29.212 +
  29.213 +            XMLEncoder e = new XMLEncoder(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(getCestaKNastaveni()))));
  29.214 +            e.writeObject(nastaveni);
  29.215 +            e.close();
  29.216 +            log.log(Level.INFO, "Nastavení bylo uloženo.");
  29.217 +        } catch (FileNotFoundException ex) {
  29.218 +            log.log(Level.SEVERE, "Nastavení se nepodařilo uložit: soubor nenalezen.", ex);
  29.219 +        } catch (IOException ex) {
  29.220 +            log.log(Level.SEVERE, "Nastavení se nepodařilo uložit: I/O.", ex);
  29.221 +        }
  29.222 +    }
  29.223 +
  29.224 +    /** Posbírá zadané hodnoty z GUI a uloží je do objektu nastaveni */
  29.225 +    private void ulozNastaveniGUI() {
  29.226 +        nastaveni.setDatabaze(vstupDatabaze.getText());
  29.227 +        nastaveni.setDbHeslo(vstupDBheslo.getPassword());
  29.228 +        nastaveni.setDbJmeno(vstupDBjmeno.getText());
  29.229 +        nastaveni.setLimitZprav((Integer) vstupSMTPlimitPrijemcu.getValue());
  29.230 +        nastaveni.setPostovniHeslo(vstupSMTPheslo.getPassword());
  29.231 +        nastaveni.setPostovniJmeno(vstupSMTPjmeno.getText());
  29.232 +        nastaveni.setPostovniPort((Integer) vstupSMTPport.getValue());
  29.233 +        nastaveni.setPostovniServer(vstupSMTPserver.getText());
  29.234 +        nastaveni.setVychoziPrijemci(prijemciVychozi.getAdresy());
  29.235 +    }
  29.236 +
  29.237 +    /** Aktualizuje GUI formuláře hodnotami z objektu nastaveni */
  29.238 +    private void nactiNastaveniGUI() {
  29.239 +        vstupDatabaze.setText(nastaveni.getDatabaze());
  29.240 +        if (nastaveni.getDbHeslo() != null) {
  29.241 +            vstupDBheslo.setText(String.valueOf(nastaveni.getDbHeslo()));
  29.242 +        }
  29.243 +        vstupDBjmeno.setText(nastaveni.getDbJmeno());
  29.244 +        vstupSMTPlimitPrijemcu.setValue(nastaveni.getLimitZprav());
  29.245 +        if (nastaveni.getPostovniHeslo() != null) {
  29.246 +            vstupSMTPheslo.setText(String.valueOf(nastaveni.getPostovniHeslo()));
  29.247 +        }
  29.248 +        vstupSMTPjmeno.setText(nastaveni.getPostovniJmeno());
  29.249 +        vstupSMTPport.setValue(nastaveni.getPostovniPort());
  29.250 +        vstupSMTPserver.setText(nastaveni.getPostovniServer());
  29.251 +        prijemciVychozi.setAdresy(nastaveni.getVychoziPrijemci());
  29.252 +    }
  29.253 +
  29.254 +    protected static void zobrazChybovyDialog(Component vlastnik, String strucnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
  29.255 +        zobrazChybovyDialog(vlastnik, "Chyba", strucnaZprava, null, vyjimka, zavaznost, logovat);
  29.256 +    }
  29.257 +
  29.258 +    protected static void zobrazInformacniDialog(Component vlastnik, String nadpis, String text, boolean loguj) {
  29.259 +        JOptionPane.showMessageDialog(vlastnik, text, nadpis, JOptionPane.INFORMATION_MESSAGE);
  29.260 +        if (loguj) {
  29.261 +            log.log(Level.INFO, nadpis + ": " + text);
  29.262 +        }
  29.263 +    }
  29.264 +
  29.265 +    protected static void zobrazChybovyDialog(Component vlastnik, String nadpis, String strucnaZprava, String podrobnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
  29.266 +        if (logovat) {
  29.267 +            log.log(zavaznost, strucnaZprava, vyjimka);
  29.268 +        }
  29.269 +
  29.270 +        JXErrorPane chybovyPanel = new JXErrorPane();
  29.271 +        ErrorInfo chybovaInformace = new ErrorInfo(nadpis, strucnaZprava, podrobnaZprava, null, vyjimka, zavaznost, null);
  29.272 +        chybovyPanel.setErrorInfo(chybovaInformace);
  29.273 +        JDialog dialog = JXErrorPane.createDialog(vlastnik, chybovyPanel);
  29.274 +        dialog.setVisible(true);
  29.275 +    }
  29.276 +
  29.277 +    private void zobrazChybovyDialog(String strucnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
  29.278 +        zobrazChybovyDialog(this, strucnaZprava, vyjimka, zavaznost, logovat);
  29.279 +    }
  29.280 +
  29.281 +    private void zobrazInformacniDialog(String nadpis, String text, boolean loguj) {
  29.282 +        zobrazInformacniDialog(this, nadpis, text, loguj);
  29.283 +    }
  29.284 +
  29.285 +    private void zobrazChybovyDialog(String nadpis, String strucnaZprava, String podrobnaZprava, Throwable vyjimka, Level zavaznost, boolean logovat) {
  29.286 +        zobrazChybovyDialog(this, nadpis, strucnaZprava, podrobnaZprava, vyjimka, zavaznost, logovat);
  29.287 +    }
  29.288 +
  29.289 +    /** This method is called from within the constructor to
  29.290 +     * initialize the form.
  29.291 +     * WARNING: Do NOT modify this code. The content of this method is
  29.292 +     * always regenerated by the Form Editor.
  29.293 +     */
  29.294 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  29.295 +    private void initComponents() {
  29.296 +
  29.297 +        panelDatabaze = new org.jdesktop.swingx.JXPanel();
  29.298 +        jLabel9 = new javax.swing.JLabel();
  29.299 +        vstupDatabaze = new javax.swing.JTextField();
  29.300 +        jLabel10 = new javax.swing.JLabel();
  29.301 +        vstupDBjmeno = new javax.swing.JTextField();
  29.302 +        vstupDBheslo = new javax.swing.JPasswordField();
  29.303 +        jLabel11 = new javax.swing.JLabel();
  29.304 +        vyzkousetPripojeniTlacitko = new javax.swing.JButton();
  29.305 +        vystupDBzprava = new javax.swing.JLabel();
  29.306 +        panelOdeslat = new org.jdesktop.swingx.JXPanel();
  29.307 +        jPanel1 = new javax.swing.JPanel();
  29.308 +        rozeslatZkusebniTlacitko = new javax.swing.JButton();
  29.309 +        rozeslatHromadnouZpravuTlacitko = new javax.swing.JButton();
  29.310 +        zobrazitVsechnyPrijemceTlacitko = new javax.swing.JButton();
  29.311 +        prijemciZkusebni = new cz.frantovo.superPostak.PanelPrijemcu();
  29.312 +        jSeparator2 = new javax.swing.JSeparator();
  29.313 +        jLabel14 = new javax.swing.JLabel();
  29.314 +        panelPrijemci = new org.jdesktop.swingx.JXPanel();
  29.315 +        jLabel13 = new javax.swing.JLabel();
  29.316 +        jScrollPane3 = new javax.swing.JScrollPane();
  29.317 +        vstupSQL = new javax.swing.JTextArea();
  29.318 +        vyzkousetSQLTlacitko = new javax.swing.JButton();
  29.319 +        vystupSQLZprava = new javax.swing.JLabel();
  29.320 +        prijemciDodatecni = new cz.frantovo.superPostak.PanelPrijemcu();
  29.321 +        jSeparator1 = new javax.swing.JSeparator();
  29.322 +        jLabel16 = new javax.swing.JLabel();
  29.323 +        zobrazitSQLPrijemceTlacitko = new javax.swing.JButton();
  29.324 +        panelServer = new org.jdesktop.swingx.JXPanel();
  29.325 +        jLabel4 = new javax.swing.JLabel();
  29.326 +        jLabel5 = new javax.swing.JLabel();
  29.327 +        vstupSMTPserver = new javax.swing.JTextField();
  29.328 +        vstupSMTPport = new javax.swing.JSpinner();
  29.329 +        napovedaSMTPscroll = new javax.swing.JScrollPane();
  29.330 +        napovedaSMTP = new javax.swing.JTextArea();
  29.331 +        jLabel6 = new javax.swing.JLabel();
  29.332 +        vstupSMTPjmeno = new javax.swing.JTextField();
  29.333 +        vstupSMTPheslo = new javax.swing.JPasswordField();
  29.334 +        jLabel7 = new javax.swing.JLabel();
  29.335 +        vstupSMTPlimitPrijemcu = new javax.swing.JSpinner();
  29.336 +        jLabel8 = new javax.swing.JLabel();
  29.337 +        panelVychoziPrijemci = new org.jdesktop.swingx.JXPanel();
  29.338 +        prijemciVychozi = new cz.frantovo.superPostak.PanelPrijemcu();
  29.339 +        jLabel12 = new javax.swing.JLabel();
  29.340 +        panelZprava = new org.jdesktop.swingx.JXPanel();
  29.341 +        jLabel1 = new javax.swing.JLabel();
  29.342 +        vstupPredmet = new javax.swing.JTextField();
  29.343 +        jLabel2 = new javax.swing.JLabel();
  29.344 +        vstupJmenoOdesilatele = new javax.swing.JTextField();
  29.345 +        vstupAdresaOdesilatele = new javax.swing.JTextField();
  29.346 +        jScrollPane1 = new javax.swing.JScrollPane();
  29.347 +        vstupZprava = new javax.swing.JTextArea();
  29.348 +        jLabel15 = new javax.swing.JLabel();
  29.349 +        vstupFormatHTML = new javax.swing.JCheckBox();
  29.350 +        odpovedetKomuOdkaz = new org.jdesktop.swingx.JXHyperlink();
  29.351 +        odpovedetKomuDialog = new javax.swing.JDialog();
  29.352 +        jLabel18 = new javax.swing.JLabel();
  29.353 +        jLabel19 = new javax.swing.JLabel();
  29.354 +        jLabel17 = new javax.swing.JLabel();
  29.355 +        odpovedetKomuJmeno = new javax.swing.JTextField();
  29.356 +        odpovedetKomuAdresa = new javax.swing.JTextField();
  29.357 +        odpovedetKomuHotovo = new javax.swing.JButton();
  29.358 +        jXHeader1 = new org.jdesktop.swingx.JXHeader();
  29.359 +        taskPanel = new org.jdesktop.swingx.JXTaskPaneContainer();
  29.360 +        jXTaskPane1 = new org.jdesktop.swingx.JXTaskPane();
  29.361 +        lnText = new org.jdesktop.swingx.JXHyperlink();
  29.362 +        lnPrijemci = new org.jdesktop.swingx.JXHyperlink();
  29.363 +        lnOdeslat = new org.jdesktop.swingx.JXHyperlink();
  29.364 +        jXTaskPane2 = new org.jdesktop.swingx.JXTaskPane();
  29.365 +        lnServer = new org.jdesktop.swingx.JXHyperlink();
  29.366 +        lnDatabaze = new org.jdesktop.swingx.JXHyperlink();
  29.367 +        lnVychoziPrijemci = new org.jdesktop.swingx.JXHyperlink();
  29.368 +        panel = new org.jdesktop.swingx.JXPanel();
  29.369 +
  29.370 +        jLabel9.setText("Databáze");
  29.371 +
  29.372 +        jLabel10.setText("Jméno");
  29.373 +
  29.374 +        jLabel11.setText("Heslo");
  29.375 +
  29.376 +        vyzkousetPripojeniTlacitko.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/fork.png"))); // NOI18N
  29.377 +        vyzkousetPripojeniTlacitko.setMnemonic('y');
  29.378 +        vyzkousetPripojeniTlacitko.setText("Vyzkoušet spojení");
  29.379 +        vyzkousetPripojeniTlacitko.addActionListener(new java.awt.event.ActionListener() {
  29.380 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.381 +                vyzkousetPripojeniTlacitkoActionPerformed(evt);
  29.382 +            }
  29.383 +        });
  29.384 +
  29.385 +        vystupDBzprava.setText(" ");
  29.386 +
  29.387 +        javax.swing.GroupLayout panelDatabazeLayout = new javax.swing.GroupLayout(panelDatabaze);
  29.388 +        panelDatabaze.setLayout(panelDatabazeLayout);
  29.389 +        panelDatabazeLayout.setHorizontalGroup(
  29.390 +            panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.391 +            .addGroup(panelDatabazeLayout.createSequentialGroup()
  29.392 +                .addContainerGap()
  29.393 +                .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.394 +                    .addGroup(panelDatabazeLayout.createSequentialGroup()
  29.395 +                        .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.396 +                            .addComponent(jLabel9)
  29.397 +                            .addComponent(jLabel10)
  29.398 +                            .addComponent(jLabel11))
  29.399 +                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.400 +                        .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.401 +                            .addComponent(vstupDatabaze, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
  29.402 +                            .addComponent(vstupDBjmeno, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
  29.403 +                            .addGroup(panelDatabazeLayout.createSequentialGroup()
  29.404 +                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  29.405 +                                .addComponent(vstupDBheslo, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE))))
  29.406 +                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDatabazeLayout.createSequentialGroup()
  29.407 +                        .addComponent(vystupDBzprava, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)
  29.408 +                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.409 +                        .addComponent(vyzkousetPripojeniTlacitko)))
  29.410 +                .addContainerGap())
  29.411 +        );
  29.412 +        panelDatabazeLayout.setVerticalGroup(
  29.413 +            panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.414 +            .addGroup(panelDatabazeLayout.createSequentialGroup()
  29.415 +                .addContainerGap()
  29.416 +                .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.417 +                    .addComponent(jLabel9)
  29.418 +                    .addComponent(vstupDatabaze, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.419 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.420 +                .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.421 +                    .addComponent(jLabel10)
  29.422 +                    .addComponent(vstupDBjmeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.423 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.424 +                .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.425 +                    .addComponent(jLabel11)
  29.426 +                    .addComponent(vstupDBheslo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.427 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  29.428 +                .addGroup(panelDatabazeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.429 +                    .addComponent(vyzkousetPripojeniTlacitko)
  29.430 +                    .addComponent(vystupDBzprava))
  29.431 +                .addContainerGap(183, Short.MAX_VALUE))
  29.432 +        );
  29.433 +
  29.434 +        rozeslatZkusebniTlacitko.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/apply.png"))); // NOI18N
  29.435 +        rozeslatZkusebniTlacitko.setMnemonic('u');
  29.436 +        rozeslatZkusebniTlacitko.setText("Rozeslat zkušební");
  29.437 +        rozeslatZkusebniTlacitko.addActionListener(new java.awt.event.ActionListener() {
  29.438 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.439 +                rozeslatZkusebniTlacitkoActionPerformed(evt);
  29.440 +            }
  29.441 +        });
  29.442 +
  29.443 +        rozeslatHromadnouZpravuTlacitko.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/adept_commit.png"))); // NOI18N
  29.444 +        rozeslatHromadnouZpravuTlacitko.setMnemonic('h');
  29.445 +        rozeslatHromadnouZpravuTlacitko.setText("Rozeslat hromadnou zprávu");
  29.446 +        rozeslatHromadnouZpravuTlacitko.addActionListener(new java.awt.event.ActionListener() {
  29.447 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.448 +                rozeslatHromadnouZpravuTlacitkoActionPerformed(evt);
  29.449 +            }
  29.450 +        });
  29.451 +
  29.452 +        zobrazitVsechnyPrijemceTlacitko.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/zobrazit_adresy.png"))); // NOI18N
  29.453 +        zobrazitVsechnyPrijemceTlacitko.setToolTipText("<html>\nZobrazí seznam všech příjemcům, kterým bude odeslána zpráva.<br/>\n(Při velkých počtech záznamů může být tato operace náročná.)\n</html>");
  29.454 +        zobrazitVsechnyPrijemceTlacitko.addActionListener(new java.awt.event.ActionListener() {
  29.455 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.456 +                zobrazitVsechnyPrijemceTlacitkoActionPerformed(evt);
  29.457 +            }
  29.458 +        });
  29.459 +
  29.460 +        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  29.461 +        jPanel1.setLayout(jPanel1Layout);
  29.462 +        jPanel1Layout.setHorizontalGroup(
  29.463 +            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.464 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
  29.465 +                .addContainerGap(106, Short.MAX_VALUE)
  29.466 +                .addComponent(rozeslatZkusebniTlacitko)
  29.467 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.468 +                .addComponent(rozeslatHromadnouZpravuTlacitko)
  29.469 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.470 +                .addComponent(zobrazitVsechnyPrijemceTlacitko)
  29.471 +                .addContainerGap())
  29.472 +        );
  29.473 +        jPanel1Layout.setVerticalGroup(
  29.474 +            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.475 +            .addGroup(jPanel1Layout.createSequentialGroup()
  29.476 +                .addContainerGap()
  29.477 +                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.478 +                    .addComponent(rozeslatHromadnouZpravuTlacitko)
  29.479 +                    .addComponent(zobrazitVsechnyPrijemceTlacitko)
  29.480 +                    .addComponent(rozeslatZkusebniTlacitko))
  29.481 +                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  29.482 +        );
  29.483 +
  29.484 +        jLabel14.setText("Zkušební příjemci");
  29.485 +
  29.486 +        javax.swing.GroupLayout panelOdeslatLayout = new javax.swing.GroupLayout(panelOdeslat);
  29.487 +        panelOdeslat.setLayout(panelOdeslatLayout);
  29.488 +        panelOdeslatLayout.setHorizontalGroup(
  29.489 +            panelOdeslatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.490 +            .addGroup(panelOdeslatLayout.createSequentialGroup()
  29.491 +                .addContainerGap()
  29.492 +                .addGroup(panelOdeslatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.493 +                    .addComponent(prijemciZkusebni, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE)
  29.494 +                    .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE)
  29.495 +                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  29.496 +                    .addComponent(jLabel14))
  29.497 +                .addContainerGap())
  29.498 +        );
  29.499 +        panelOdeslatLayout.setVerticalGroup(
  29.500 +            panelOdeslatLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.501 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelOdeslatLayout.createSequentialGroup()
  29.502 +                .addContainerGap()
  29.503 +                .addComponent(jLabel14)
  29.504 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.505 +                .addComponent(prijemciZkusebni, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
  29.506 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  29.507 +                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.508 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.509 +                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.510 +                .addContainerGap())
  29.511 +        );
  29.512 +
  29.513 +        jLabel13.setText("SQL dotaz");
  29.514 +
  29.515 +        vstupSQL.setColumns(20);
  29.516 +        vstupSQL.setRows(5);
  29.517 +        jScrollPane3.setViewportView(vstupSQL);
  29.518 +
  29.519 +        vyzkousetSQLTlacitko.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/fork.png"))); // NOI18N
  29.520 +        vyzkousetSQLTlacitko.setMnemonic('y');
  29.521 +        vyzkousetSQLTlacitko.setText("Vyzkoušet");
  29.522 +        vyzkousetSQLTlacitko.addActionListener(new java.awt.event.ActionListener() {
  29.523 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.524 +                vyzkousetSQLTlacitkoActionPerformed(evt);
  29.525 +            }
  29.526 +        });
  29.527 +
  29.528 +        vystupSQLZprava.setText(" ");
  29.529 +
  29.530 +        prijemciDodatecni.setToolTipText("Zde můžete dopnit další přijemce.");
  29.531 +
  29.532 +        jLabel16.setText("Dodateční příjemci:");
  29.533 +
  29.534 +        zobrazitSQLPrijemceTlacitko.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/zobrazit_adresy.png"))); // NOI18N
  29.535 +        zobrazitSQLPrijemceTlacitko.setToolTipText("<html>\nZobrazí seznam adres načtených z databáze.<br/>\n(Při velkých počtech záznamů může být tato operace náročná.)\n</html>");
  29.536 +        zobrazitSQLPrijemceTlacitko.addActionListener(new java.awt.event.ActionListener() {
  29.537 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.538 +                zobrazitSQLPrijemceTlacitkoActionPerformed(evt);
  29.539 +            }
  29.540 +        });
  29.541 +
  29.542 +        javax.swing.GroupLayout panelPrijemciLayout = new javax.swing.GroupLayout(panelPrijemci);
  29.543 +        panelPrijemci.setLayout(panelPrijemciLayout);
  29.544 +        panelPrijemciLayout.setHorizontalGroup(
  29.545 +            panelPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.546 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPrijemciLayout.createSequentialGroup()
  29.547 +                .addContainerGap()
  29.548 +                .addGroup(panelPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.549 +                    .addComponent(prijemciDodatecni, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE)
  29.550 +                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE)
  29.551 +                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE)
  29.552 +                    .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING)
  29.553 +                    .addGroup(panelPrijemciLayout.createSequentialGroup()
  29.554 +                        .addComponent(vystupSQLZprava, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
  29.555 +                        .addGap(127, 127, 127)
  29.556 +                        .addComponent(vyzkousetSQLTlacitko)
  29.557 +                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.558 +                        .addComponent(zobrazitSQLPrijemceTlacitko))
  29.559 +                    .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.LEADING))
  29.560 +                .addContainerGap())
  29.561 +        );
  29.562 +        panelPrijemciLayout.setVerticalGroup(
  29.563 +            panelPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.564 +            .addGroup(panelPrijemciLayout.createSequentialGroup()
  29.565 +                .addContainerGap()
  29.566 +                .addComponent(jLabel13)
  29.567 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.568 +                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.569 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.570 +                .addGroup(panelPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.571 +                    .addComponent(vystupSQLZprava, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.572 +                    .addComponent(zobrazitSQLPrijemceTlacitko)
  29.573 +                    .addComponent(vyzkousetSQLTlacitko))
  29.574 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.575 +                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.576 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.577 +                .addComponent(jLabel16)
  29.578 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.579 +                .addComponent(prijemciDodatecni, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
  29.580 +                .addContainerGap())
  29.581 +        );
  29.582 +
  29.583 +        jLabel4.setText("SMTP server");
  29.584 +
  29.585 +        jLabel5.setText("Port");
  29.586 +
  29.587 +        vstupSMTPserver.setText("localhost");
  29.588 +
  29.589 +        vstupSMTPport.setValue(25);
  29.590 +
  29.591 +        napovedaSMTP.setColumns(20);
  29.592 +        napovedaSMTP.setEditable(false);
  29.593 +        napovedaSMTP.setLineWrap(true);
  29.594 +        napovedaSMTP.setRows(5);
  29.595 +        napovedaSMTP.setText("Tip: některé SMTP servery mají omezený seznam počítačů, ze kterých přijímají poštu");
  29.596 +        napovedaSMTP.setWrapStyleWord(true);
  29.597 +        napovedaSMTPscroll.setViewportView(napovedaSMTP);
  29.598 +
  29.599 +        jLabel6.setText("Jméno");
  29.600 +
  29.601 +        jLabel7.setText("Heslo");
  29.602 +
  29.603 +        vstupSMTPlimitPrijemcu.setValue(1000);
  29.604 +
  29.605 +        jLabel8.setText("Limit příjemců");
  29.606 +
  29.607 +        javax.swing.GroupLayout panelServerLayout = new javax.swing.GroupLayout(panelServer);
  29.608 +        panelServer.setLayout(panelServerLayout);
  29.609 +        panelServerLayout.setHorizontalGroup(
  29.610 +            panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.611 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelServerLayout.createSequentialGroup()
  29.612 +                .addContainerGap()
  29.613 +                .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.614 +                    .addComponent(napovedaSMTPscroll, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
  29.615 +                    .addGroup(panelServerLayout.createSequentialGroup()
  29.616 +                        .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.617 +                            .addComponent(jLabel4)
  29.618 +                            .addComponent(jLabel6)
  29.619 +                            .addComponent(jLabel5)
  29.620 +                            .addComponent(jLabel7)
  29.621 +                            .addComponent(jLabel8))
  29.622 +                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.623 +                        .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.624 +                            .addComponent(vstupSMTPserver, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
  29.625 +                            .addComponent(vstupSMTPport, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
  29.626 +                            .addComponent(vstupSMTPjmeno, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
  29.627 +                            .addComponent(vstupSMTPheslo, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
  29.628 +                            .addComponent(vstupSMTPlimitPrijemcu, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE))))
  29.629 +                .addContainerGap())
  29.630 +        );
  29.631 +        panelServerLayout.setVerticalGroup(
  29.632 +            panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.633 +            .addGroup(panelServerLayout.createSequentialGroup()
  29.634 +                .addContainerGap()
  29.635 +                .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.636 +                    .addComponent(jLabel4)
  29.637 +                    .addComponent(vstupSMTPserver, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.638 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.639 +                .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.640 +                    .addComponent(vstupSMTPport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.641 +                    .addComponent(jLabel5))
  29.642 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.643 +                .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.644 +                    .addComponent(jLabel6)
  29.645 +                    .addComponent(vstupSMTPjmeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.646 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.647 +                .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.648 +                    .addComponent(vstupSMTPheslo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.649 +                    .addComponent(jLabel7))
  29.650 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.651 +                .addGroup(panelServerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.652 +                    .addComponent(vstupSMTPlimitPrijemcu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.653 +                    .addComponent(jLabel8))
  29.654 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  29.655 +                .addComponent(napovedaSMTPscroll, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)
  29.656 +                .addContainerGap())
  29.657 +        );
  29.658 +
  29.659 +        jLabel12.setText("Těmto lidem přijde hromadný e-mail vždy (netýká se zkušebního rozeslání zprávy).");
  29.660 +
  29.661 +        javax.swing.GroupLayout panelVychoziPrijemciLayout = new javax.swing.GroupLayout(panelVychoziPrijemci);
  29.662 +        panelVychoziPrijemci.setLayout(panelVychoziPrijemciLayout);
  29.663 +        panelVychoziPrijemciLayout.setHorizontalGroup(
  29.664 +            panelVychoziPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.665 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelVychoziPrijemciLayout.createSequentialGroup()
  29.666 +                .addContainerGap()
  29.667 +                .addGroup(panelVychoziPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.668 +                    .addComponent(prijemciVychozi, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE)
  29.669 +                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE))
  29.670 +                .addContainerGap())
  29.671 +        );
  29.672 +        panelVychoziPrijemciLayout.setVerticalGroup(
  29.673 +            panelVychoziPrijemciLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.674 +            .addGroup(panelVychoziPrijemciLayout.createSequentialGroup()
  29.675 +                .addContainerGap()
  29.676 +                .addComponent(jLabel12)
  29.677 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  29.678 +                .addComponent(prijemciVychozi, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)
  29.679 +                .addContainerGap())
  29.680 +        );
  29.681 +
  29.682 +        jLabel1.setLabelFor(vstupPredmet);
  29.683 +        jLabel1.setText("Předmět");
  29.684 +
  29.685 +        vstupPredmet.addActionListener(new java.awt.event.ActionListener() {
  29.686 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.687 +                vstupPredmetActionPerformed(evt);
  29.688 +            }
  29.689 +        });
  29.690 +
  29.691 +        jLabel2.setText("Jméno odesílatele");
  29.692 +
  29.693 +        vstupZprava.setColumns(20);
  29.694 +        vstupZprava.setRows(5);
  29.695 +        jScrollPane1.setViewportView(vstupZprava);
  29.696 +
  29.697 +        jLabel15.setText("Formát zprávy");
  29.698 +
  29.699 +        vstupFormatHTML.setMnemonic('h');
  29.700 +        vstupFormatHTML.setText("HTML");
  29.701 +        vstupFormatHTML.setToolTipText("Při nezaškrtnutí se odešle jako prostý text");
  29.702 +
  29.703 +        odpovedetKomuOdkaz.setForeground(javax.swing.UIManager.getDefaults().getColor("windowText"));
  29.704 +        odpovedetKomuOdkaz.setMnemonic('e');
  29.705 +        odpovedetKomuOdkaz.setText("Adresa odesílatele");
  29.706 +        odpovedetKomuOdkaz.setToolTipText("<html><p>Klikněte sem pro nastavení adresy,</p><p>na kterou mají chodit odpovědi</p></html>");
  29.707 +        odpovedetKomuOdkaz.setClickedColor(javax.swing.UIManager.getDefaults().getColor("windowText"));
  29.708 +        odpovedetKomuOdkaz.setUnclickedColor(javax.swing.UIManager.getDefaults().getColor("windowText"));
  29.709 +        odpovedetKomuOdkaz.addActionListener(new java.awt.event.ActionListener() {
  29.710 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.711 +                odpovedetKomuOdkazActionPerformed(evt);
  29.712 +            }
  29.713 +        });
  29.714 +
  29.715 +        javax.swing.GroupLayout panelZpravaLayout = new javax.swing.GroupLayout(panelZprava);
  29.716 +        panelZprava.setLayout(panelZpravaLayout);
  29.717 +        panelZpravaLayout.setHorizontalGroup(
  29.718 +            panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.719 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelZpravaLayout.createSequentialGroup()
  29.720 +                .addContainerGap()
  29.721 +                .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.722 +                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE)
  29.723 +                    .addGroup(panelZpravaLayout.createSequentialGroup()
  29.724 +                        .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.725 +                            .addGroup(panelZpravaLayout.createSequentialGroup()
  29.726 +                                .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.727 +                                    .addComponent(jLabel2)
  29.728 +                                    .addComponent(jLabel1))
  29.729 +                                .addGap(17, 17, 17))
  29.730 +                            .addGroup(panelZpravaLayout.createSequentialGroup()
  29.731 +                                .addComponent(odpovedetKomuOdkaz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.732 +                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
  29.733 +                        .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.734 +                            .addComponent(vstupJmenoOdesilatele, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
  29.735 +                            .addComponent(vstupAdresaOdesilatele, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
  29.736 +                            .addComponent(vstupPredmet, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)))
  29.737 +                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelZpravaLayout.createSequentialGroup()
  29.738 +                        .addComponent(jLabel15)
  29.739 +                        .addGap(33, 33, 33)
  29.740 +                        .addComponent(vstupFormatHTML, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
  29.741 +                        .addGap(247, 247, 247)))
  29.742 +                .addContainerGap())
  29.743 +        );
  29.744 +        panelZpravaLayout.setVerticalGroup(
  29.745 +            panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.746 +            .addGroup(panelZpravaLayout.createSequentialGroup()
  29.747 +                .addContainerGap()
  29.748 +                .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.749 +                    .addComponent(jLabel1)
  29.750 +                    .addComponent(vstupPredmet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.751 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.752 +                .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.753 +                    .addComponent(jLabel2)
  29.754 +                    .addComponent(vstupJmenoOdesilatele, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.755 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.756 +                .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.757 +                    .addComponent(vstupAdresaOdesilatele, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.758 +                    .addComponent(odpovedetKomuOdkaz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.759 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.760 +                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)
  29.761 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.762 +                .addGroup(panelZpravaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.763 +                    .addComponent(jLabel15)
  29.764 +                    .addComponent(vstupFormatHTML))
  29.765 +                .addContainerGap())
  29.766 +        );
  29.767 +
  29.768 +        odpovedetKomuDialog.setTitle("Adresa pro odpovědi");
  29.769 +        odpovedetKomuDialog.setModal(true);
  29.770 +
  29.771 +        jLabel18.setText("Jméno");
  29.772 +
  29.773 +        jLabel19.setText("Adresa");
  29.774 +
  29.775 +        jLabel17.setText("<html>\n<p>Pokud bude příjemce na hromadnou zprávu odpovídat,</p>\n<p>odpověď přijde na tuto adresu.</p>\n<p>Pokud tyto údaje nevyplníte, nebo zadáte chybný e-mail,</p>\n<p>budou odpovědi chodit odesílateli.</p>\n</html>");
  29.776 +
  29.777 +        odpovedetKomuHotovo.setText("Hotovo");
  29.778 +        odpovedetKomuHotovo.addActionListener(new java.awt.event.ActionListener() {
  29.779 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.780 +                odpovedetKomuHotovoActionPerformed(evt);
  29.781 +            }
  29.782 +        });
  29.783 +
  29.784 +        javax.swing.GroupLayout odpovedetKomuDialogLayout = new javax.swing.GroupLayout(odpovedetKomuDialog.getContentPane());
  29.785 +        odpovedetKomuDialog.getContentPane().setLayout(odpovedetKomuDialogLayout);
  29.786 +        odpovedetKomuDialogLayout.setHorizontalGroup(
  29.787 +            odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.788 +            .addGroup(odpovedetKomuDialogLayout.createSequentialGroup()
  29.789 +                .addContainerGap()
  29.790 +                .addGroup(odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.791 +                    .addGroup(odpovedetKomuDialogLayout.createSequentialGroup()
  29.792 +                        .addGroup(odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.793 +                            .addComponent(jLabel19)
  29.794 +                            .addComponent(jLabel18))
  29.795 +                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.796 +                        .addGroup(odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.797 +                            .addComponent(odpovedetKomuAdresa, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)
  29.798 +                            .addComponent(odpovedetKomuJmeno, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)))
  29.799 +                    .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)
  29.800 +                    .addComponent(odpovedetKomuHotovo, javax.swing.GroupLayout.Alignment.TRAILING))
  29.801 +                .addContainerGap())
  29.802 +        );
  29.803 +        odpovedetKomuDialogLayout.setVerticalGroup(
  29.804 +            odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.805 +            .addGroup(odpovedetKomuDialogLayout.createSequentialGroup()
  29.806 +                .addContainerGap()
  29.807 +                .addGroup(odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  29.808 +                    .addComponent(jLabel18)
  29.809 +                    .addComponent(odpovedetKomuJmeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.810 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.811 +                .addGroup(odpovedetKomuDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.812 +                    .addComponent(jLabel19)
  29.813 +                    .addComponent(odpovedetKomuAdresa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  29.814 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.815 +                .addComponent(jLabel17)
  29.816 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  29.817 +                .addComponent(odpovedetKomuHotovo)
  29.818 +                .addContainerGap())
  29.819 +        );
  29.820 +
  29.821 +        setTitle("SuperPošťák");
  29.822 +        addWindowListener(new java.awt.event.WindowAdapter() {
  29.823 +            public void windowClosing(java.awt.event.WindowEvent evt) {
  29.824 +                formWindowClosing(evt);
  29.825 +            }
  29.826 +        });
  29.827 +
  29.828 +        jXHeader1.setDescription("Program pro posílání hromadných zpráv elektronickou poštou.\nNezneužívejte pro rozesílání spamu.");
  29.829 +        jXHeader1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/xfmail.png"))); // NOI18N
  29.830 +        jXHeader1.setTitle("SuperPošťák");
  29.831 +
  29.832 +        taskPanel.setBackground(javax.swing.UIManager.getDefaults().getColor("Button.background"));
  29.833 +
  29.834 +        jXTaskPane1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/mail_generic.png"))); // NOI18N
  29.835 +        jXTaskPane1.setTitle("Hromadná zpráva");
  29.836 +
  29.837 +        lnText.setMnemonic('z');
  29.838 +        lnText.setText("Text zprávy");
  29.839 +        lnText.setActionCommand("Zpráva");
  29.840 +        lnText.addActionListener(new java.awt.event.ActionListener() {
  29.841 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.842 +                lnTextActionPerformed(evt);
  29.843 +            }
  29.844 +        });
  29.845 +        jXTaskPane1.getContentPane().add(lnText);
  29.846 +
  29.847 +        lnPrijemci.setMnemonic('p');
  29.848 +        lnPrijemci.setText("Příjemci");
  29.849 +        lnPrijemci.addActionListener(new java.awt.event.ActionListener() {
  29.850 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.851 +                lnPrijemciActionPerformed(evt);
  29.852 +            }
  29.853 +        });
  29.854 +        jXTaskPane1.getContentPane().add(lnPrijemci);
  29.855 +
  29.856 +        lnOdeslat.setMnemonic('o');
  29.857 +        lnOdeslat.setText("Odeslat");
  29.858 +        lnOdeslat.addActionListener(new java.awt.event.ActionListener() {
  29.859 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.860 +                lnOdeslatActionPerformed(evt);
  29.861 +            }
  29.862 +        });
  29.863 +        jXTaskPane1.getContentPane().add(lnOdeslat);
  29.864 +
  29.865 +        taskPanel.add(jXTaskPane1);
  29.866 +
  29.867 +        jXTaskPane2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cz/frantovo/superPostak/obrazky/gear.png"))); // NOI18N
  29.868 +        jXTaskPane2.setTitle("Nastavení");
  29.869 +
  29.870 +        lnServer.setMnemonic('s');
  29.871 +        lnServer.setText("Poštovní server");
  29.872 +        lnServer.addActionListener(new java.awt.event.ActionListener() {
  29.873 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.874 +                lnServerActionPerformed(evt);
  29.875 +            }
  29.876 +        });
  29.877 +        jXTaskPane2.getContentPane().add(lnServer);
  29.878 +
  29.879 +        lnDatabaze.setMnemonic('d');
  29.880 +        lnDatabaze.setText("Databáze");
  29.881 +        lnDatabaze.addActionListener(new java.awt.event.ActionListener() {
  29.882 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.883 +                lnDatabazeActionPerformed(evt);
  29.884 +            }
  29.885 +        });
  29.886 +        jXTaskPane2.getContentPane().add(lnDatabaze);
  29.887 +
  29.888 +        lnVychoziPrijemci.setMnemonic('v');
  29.889 +        lnVychoziPrijemci.setText("Výchozí příjemci");
  29.890 +        lnVychoziPrijemci.addActionListener(new java.awt.event.ActionListener() {
  29.891 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  29.892 +                lnVychoziPrijemciActionPerformed(evt);
  29.893 +            }
  29.894 +        });
  29.895 +        jXTaskPane2.getContentPane().add(lnVychoziPrijemci);
  29.896 +
  29.897 +        taskPanel.add(jXTaskPane2);
  29.898 +
  29.899 +        panel.setLayout(new java.awt.CardLayout());
  29.900 +
  29.901 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  29.902 +        getContentPane().setLayout(layout);
  29.903 +        layout.setHorizontalGroup(
  29.904 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.905 +            .addGroup(layout.createSequentialGroup()
  29.906 +                .addComponent(taskPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.907 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.908 +                .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE))
  29.909 +            .addComponent(jXHeader1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE)
  29.910 +        );
  29.911 +        layout.setVerticalGroup(
  29.912 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  29.913 +            .addGroup(layout.createSequentialGroup()
  29.914 +                .addComponent(jXHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  29.915 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  29.916 +                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  29.917 +                    .addComponent(taskPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE)
  29.918 +                    .addComponent(panel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE)))
  29.919 +        );
  29.920 +
  29.921 +        pack();
  29.922 +    }// </editor-fold>//GEN-END:initComponents
  29.923 +    private void vstupPredmetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vstupPredmetActionPerformed
  29.924 +        
  29.925 +}//GEN-LAST:event_vstupPredmetActionPerformed
  29.926 +
  29.927 +    private void lnTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnTextActionPerformed
  29.928 +        setPanel(panelZprava);
  29.929 +    }//GEN-LAST:event_lnTextActionPerformed
  29.930 +
  29.931 +    private void lnPrijemciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnPrijemciActionPerformed
  29.932 +        setPanel(panelPrijemci);
  29.933 +    }//GEN-LAST:event_lnPrijemciActionPerformed
  29.934 +
  29.935 +    private void lnOdeslatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnOdeslatActionPerformed
  29.936 +        setPanel(panelOdeslat);
  29.937 +    }//GEN-LAST:event_lnOdeslatActionPerformed
  29.938 +
  29.939 +    private void lnServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnServerActionPerformed
  29.940 +        setPanel(panelServer);
  29.941 +    }//GEN-LAST:event_lnServerActionPerformed
  29.942 +
  29.943 +    private void lnDatabazeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnDatabazeActionPerformed
  29.944 +        setPanel(panelDatabaze);
  29.945 +    }//GEN-LAST:event_lnDatabazeActionPerformed
  29.946 +
  29.947 +    private void lnVychoziPrijemciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lnVychoziPrijemciActionPerformed
  29.948 +        setPanel(panelVychoziPrijemci);
  29.949 +    }//GEN-LAST:event_lnVychoziPrijemciActionPerformed
  29.950 +
  29.951 +    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
  29.952 +        ulozNastaveni();
  29.953 +        log.log(Level.WARNING, "Ukončuji program.");
  29.954 +    }//GEN-LAST:event_formWindowClosing
  29.955 +
  29.956 +    /**
  29.957 +     * Sestaví zprávu na základě GUI vstupů. Všechno kromě příjemců,
  29.958 +     * ti se přidají až dodatečně, podle toho,
  29.959 +     * jestli jde o zkušební nebo skutečné rozesílání.
  29.960 +     */
  29.961 +    private HromadnaZprava getZprava() throws UnsupportedEncodingException {
  29.962 +        HromadnaZprava zprava = new HromadnaZprava();
  29.963 +        zprava.setOdesilatel(new InternetAddress(vstupAdresaOdesilatele.getText(), vstupJmenoOdesilatele.getText()));
  29.964 +        zprava.setPredmet(vstupPredmet.getText());
  29.965 +        zprava.setText(vstupZprava.getText());
  29.966 +        zprava.setFormatHTML(vstupFormatHTML.isSelected());
  29.967 +
  29.968 +        if (Postak.zkontrolujAdresu(odpovedetKomuAdresa.getText())) {
  29.969 +            InternetAddress komu = new InternetAddress();
  29.970 +            komu.setPersonal(odpovedetKomuJmeno.getText());
  29.971 +            komu.setAddress(odpovedetKomuAdresa.getText());
  29.972 +            zprava.setOdpovedetKomu(komu);
  29.973 +        }
  29.974 +
  29.975 +        return zprava;
  29.976 +    }
  29.977 +
  29.978 +    /** Všichni příjemci, kterým bude odeslána ostrá zpráva. */
  29.979 +    private ArrayList<InternetAddressKomu> getPrijemciVsichni() throws SQLException, UnsupportedEncodingException {
  29.980 +        ArrayList<InternetAddressKomu> vsichni = new ArrayList<InternetAddressKomu>();
  29.981 +        Collection<InternetAddressKomu> adresyVychozi = nastaveni.getVychoziPrijemci();
  29.982 +        Collection<InternetAddressKomu> adresySQL = getPrijemciSQL();
  29.983 +        Collection<InternetAddressKomu> adresyDodatecne = prijemciDodatecni.getAdresy();
  29.984 +
  29.985 +        if (adresyVychozi != null) {
  29.986 +            vsichni.addAll(adresyVychozi);
  29.987 +        }
  29.988 +        if (adresySQL != null) {
  29.989 +            vsichni.addAll(adresySQL);
  29.990 +        }
  29.991 +        if (adresyDodatecne != null) {
  29.992 +            vsichni.addAll(adresyDodatecne);
  29.993 +        }
  29.994 +        return vsichni;
  29.995 +    }
  29.996 +
  29.997 +    private void rozeslatHromadnouZpravuTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rozeslatHromadnouZpravuTlacitkoActionPerformed
  29.998 +        try {
  29.999 +            ulozNastaveniGUI();
 29.1000 +            HromadnaZprava zprava = getZprava();
 29.1001 +            zprava.setPrijemci(getPrijemciVsichni());
 29.1002 +
 29.1003 +            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);
 29.1004 +            if (volba == JOptionPane.YES_OPTION) {
 29.1005 +                odesli(zprava);
 29.1006 +                Postak.vypisPrijemce(zprava.getPrijemci());
 29.1007 +                zobrazInformacniDialog("Odesláno", "Zpráva byla odeslána.\nPočet příjemců: " + zprava.getPrijemci().size(), true);
 29.1008 +            }
 29.1009 +        } catch (Exception e) {
 29.1010 +            zobrazChybovyDialog("Zprávu se nepodařilo odeslat", e, Level.SEVERE, true);
 29.1011 +        }
 29.1012 +}//GEN-LAST:event_rozeslatHromadnouZpravuTlacitkoActionPerformed
 29.1013 +
 29.1014 +    private void rozeslatZkusebniTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rozeslatZkusebniTlacitkoActionPerformed
 29.1015 +        try {
 29.1016 +            ulozNastaveniGUI();
 29.1017 +            HromadnaZprava zprava = getZprava();
 29.1018 +            zprava.setPrijemci(prijemciZkusebni.getAdresy());
 29.1019 +
 29.1020 +            odesli(zprava);
 29.1021 +
 29.1022 +            zobrazInformacniDialog("Odesláno", "Zkušební zpráva byla odeslána.\nPočet adresátů: " + zprava.getPrijemci().size(), true);
 29.1023 +        } catch (Exception e) {
 29.1024 +            zobrazChybovyDialog("Zkušební zprávu se nepodařilo odeslat", e, Level.SEVERE, true);
 29.1025 +        }        
 29.1026 +    }//GEN-LAST:event_rozeslatZkusebniTlacitkoActionPerformed
 29.1027 +
 29.1028 +    private void vyzkousetPripojeniTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vyzkousetPripojeniTlacitkoActionPerformed
 29.1029 +        try {
 29.1030 +            getSpojeni();//GEN-LAST:event_vyzkousetPripojeniTlacitkoActionPerformed
 29.1031 +            zobrazInformacniDialog("Připojeno k DB", "Připojení k DB proběhlo úspěšně", false);
 29.1032 +        } catch (SQLException e) {
 29.1033 +            zobrazChybovyDialog("Spojení s DB", "Připojení k databázi selhalo", null, e, Level.SEVERE, true);
 29.1034 +        }
 29.1035 +    }
 29.1036 +
 29.1037 +    private void vyzkousetSQLTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vyzkousetSQLTlacitkoActionPerformed
 29.1038 +        try {
 29.1039 +            Collection<InternetAddressKomu> adresy = getPrijemciSQL();//GEN-LAST:event_vyzkousetSQLTlacitkoActionPerformed
 29.1040 +            if (adresy == null) {
 29.1041 +                zobrazInformacniDialog("SQL dotaz", "Dotaz do databáze neproběhl.\nSQL dotaz je prázdný.", false);
 29.1042 +            } else {
 29.1043 +                zobrazInformacniDialog("SQL dotaz", "Dotaz do databáze byl úspěšný.\nPočet získaných záznamů: " + adresy.size(), false);
 29.1044 +            }
 29.1045 +        } catch (Exception e) {
 29.1046 +            zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
 29.1047 +        }
 29.1048 +    }
 29.1049 +
 29.1050 +    private void zobrazitSQLPrijemceTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zobrazitSQLPrijemceTlacitkoActionPerformed
 29.1051 +        try {
 29.1052 +            Collection<InternetAddressKomu> adresy = getPrijemciSQL();
 29.1053 +
 29.1054 +            ZobrazovacAdres zobrazovac = new ZobrazovacAdres(this, false);
 29.1055 +            zobrazovac.setAdresy(adresy);
 29.1056 +            zobrazovac.setLocationRelativeTo(this);
 29.1057 +            zobrazovac.setVisible(true);
 29.1058 +
 29.1059 +        } catch (Exception e) {
 29.1060 +            zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
 29.1061 +        }
 29.1062 +    }//GEN-LAST:event_zobrazitSQLPrijemceTlacitkoActionPerformed
 29.1063 +
 29.1064 +    private void zobrazitVsechnyPrijemceTlacitkoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zobrazitVsechnyPrijemceTlacitkoActionPerformed
 29.1065 +        try {
 29.1066 +            Collection<InternetAddressKomu> adresy = getPrijemciVsichni();
 29.1067 +
 29.1068 +            ZobrazovacAdres zobrazovac = new ZobrazovacAdres(this, false);
 29.1069 +            zobrazovac.setAdresy(adresy);
 29.1070 +            zobrazovac.setLocationRelativeTo(this);
 29.1071 +            zobrazovac.setVisible(true);
 29.1072 +
 29.1073 +        } catch (Exception e) {
 29.1074 +            zobrazChybovyDialog("SQL dotaz", "Provedení SQL příkazu selhalo selhalo", null, e, Level.SEVERE, true);
 29.1075 +        }
 29.1076 +    }//GEN-LAST:event_zobrazitVsechnyPrijemceTlacitkoActionPerformed
 29.1077 +
 29.1078 +    private void odpovedetKomuOdkazActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odpovedetKomuOdkazActionPerformed
 29.1079 +        odpovedetKomuDialog.pack();
 29.1080 +        odpovedetKomuDialog.setLocationRelativeTo(this);
 29.1081 +        odpovedetKomuDialog.setModalityType(ModalityType.APPLICATION_MODAL);
 29.1082 +        odpovedetKomuDialog.getRootPane().setDefaultButton(odpovedetKomuHotovo);
 29.1083 +        odpovedetKomuDialog.setVisible(true);
 29.1084 +}//GEN-LAST:event_odpovedetKomuOdkazActionPerformed
 29.1085 +
 29.1086 +    private void odpovedetKomuHotovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_odpovedetKomuHotovoActionPerformed
 29.1087 +        odpovedetKomuDialog.setVisible(false);
 29.1088 +}//GEN-LAST:event_odpovedetKomuHotovoActionPerformed
 29.1089 +
 29.1090 +    /** Provede uživatelem zadaný SQL dotaz a vrátí získané příjemce */
 29.1091 +    private Collection<InternetAddressKomu> getPrijemciSQL() throws SQLException, UnsupportedEncodingException {
 29.1092 +        if ("".equals(vstupSQL.getText())) {
 29.1093 +            return null;
 29.1094 +        } else {
 29.1095 +            return getSpojeni().getAdresy(vstupSQL.getText());
 29.1096 +        }
 29.1097 +    }
 29.1098 +
 29.1099 +    private DataSQL getSpojeni() throws SQLException {
 29.1100 +        return Data.getSpojeniSQL(vstupDatabaze.getText(), vstupDBjmeno.getText(), vstupDBheslo.getPassword());
 29.1101 +    }
 29.1102 +
 29.1103 +    /** Obalovací třída, která v průběhu odesílání zobrazuje kurzor s hodinami. */
 29.1104 +    private void odesli(HromadnaZprava zprava) throws MessagingException {
 29.1105 +        setCursor(new Cursor(Cursor.WAIT_CURSOR));
 29.1106 +        try {
 29.1107 +            postak.setNastaveni(nastaveni);
 29.1108 +            postak.odesli(zprava);
 29.1109 +
 29.1110 +        } catch (MessagingException e) {
 29.1111 +            throw e;
 29.1112 +        } finally {
 29.1113 +            setCursor(Cursor.getDefaultCursor());
 29.1114 +        }
 29.1115 +    }
 29.1116 +
 29.1117 +    private void setPanel(JComponent komponenta) {
 29.1118 +
 29.1119 +        if (panel.getLayout() instanceof CardLayout) {
 29.1120 +            CardLayout l = (CardLayout) panel.getLayout();
 29.1121 +            l.show(panel, komponenta.getName());
 29.1122 +        } else {
 29.1123 +            log.log(Level.WARNING, "Neplatí: panel.getLayout() instanceof CardLayout");
 29.1124 +        }
 29.1125 +
 29.1126 +    }
 29.1127 +
 29.1128 +    /** Změní chování tabulátoru v textovém poli - aby se pomocí TABu dalo skočit na další komponentu */
 29.1129 +    private void vyresitTabFocusProblem(JTextArea textArea) {
 29.1130 +        textArea.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
 29.1131 +        textArea.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null);
 29.1132 +    }
 29.1133 +
 29.1134 +    public JXTaskPaneContainer getTaskPanel() {
 29.1135 +        return taskPanel;
 29.1136 +    }
 29.1137 +
 29.1138 +    /**
 29.1139 +     * @param args the command line arguments
 29.1140 +     */
 29.1141 +    public static void main(String args[]) {
 29.1142 +        final boolean ladit = (args != null && args.length > 0 && args[0].equals("ladit"));
 29.1143 +
 29.1144 +        /**try {
 29.1145 +            //LookAndFeel laf = UIManager.getLookAndFeel();
 29.1146 +
 29.1147 +            //laf = new SubstanceLookAndFeel();
 29.1148 +            //laf = new SubstanceBusinessLookAndFeel();
 29.1149 +            //laf = new SubstanceBusinessBlueSteelLookAndFeel();
 29.1150 +            //laf = new SubstanceBusinessBlackSteelLookAndFeel();
 29.1151 +
 29.1152 +            UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel");
 29.1153 +        } catch (ClassNotFoundException ex) {
 29.1154 +            log.log(Level.SEVERE, null, ex);
 29.1155 +        } catch (InstantiationException ex) {
 29.1156 +            log.log(Level.SEVERE, null, ex);
 29.1157 +        } catch (IllegalAccessException ex) {
 29.1158 +            log.log(Level.SEVERE, null, ex);
 29.1159 +        } catch (UnsupportedLookAndFeelException ex) {
 29.1160 +            log.log(Level.SEVERE, null, ex);
 29.1161 +        } */
 29.1162 +
 29.1163 +        java.awt.EventQueue.invokeLater(new Runnable() {
 29.1164 +
 29.1165 +            public void run() {
 29.1166 +                new SuperPostak(ladit, true).setVisible(true);
 29.1167 +            }
 29.1168 +            });
 29.1169 +    }
 29.1170 +    // Variables declaration - do not modify//GEN-BEGIN:variables
 29.1171 +    private javax.swing.JLabel jLabel1;
 29.1172 +    private javax.swing.JLabel jLabel10;
 29.1173 +    private javax.swing.JLabel jLabel11;
 29.1174 +    private javax.swing.JLabel jLabel12;
 29.1175 +    private javax.swing.JLabel jLabel13;
 29.1176 +    private javax.swing.JLabel jLabel14;
 29.1177 +    private javax.swing.JLabel jLabel15;
 29.1178 +    private javax.swing.JLabel jLabel16;
 29.1179 +    private javax.swing.JLabel jLabel17;
 29.1180 +    private javax.swing.JLabel jLabel18;
 29.1181 +    private javax.swing.JLabel jLabel19;
 29.1182 +    private javax.swing.JLabel jLabel2;
 29.1183 +    private javax.swing.JLabel jLabel4;
 29.1184 +    private javax.swing.JLabel jLabel5;
 29.1185 +    private javax.swing.JLabel jLabel6;
 29.1186 +    private javax.swing.JLabel jLabel7;
 29.1187 +    private javax.swing.JLabel jLabel8;
 29.1188 +    private javax.swing.JLabel jLabel9;
 29.1189 +    private javax.swing.JPanel jPanel1;
 29.1190 +    private javax.swing.JScrollPane jScrollPane1;
 29.1191 +    private javax.swing.JScrollPane jScrollPane3;
 29.1192 +    private javax.swing.JSeparator jSeparator1;
 29.1193 +    private javax.swing.JSeparator jSeparator2;
 29.1194 +    private org.jdesktop.swingx.JXHeader jXHeader1;
 29.1195 +    private org.jdesktop.swingx.JXTaskPane jXTaskPane1;
 29.1196 +    private org.jdesktop.swingx.JXTaskPane jXTaskPane2;
 29.1197 +    private org.jdesktop.swingx.JXHyperlink lnDatabaze;
 29.1198 +    private org.jdesktop.swingx.JXHyperlink lnOdeslat;
 29.1199 +    private org.jdesktop.swingx.JXHyperlink lnPrijemci;
 29.1200 +    private org.jdesktop.swingx.JXHyperlink lnServer;
 29.1201 +    private org.jdesktop.swingx.JXHyperlink lnText;
 29.1202 +    private org.jdesktop.swingx.JXHyperlink lnVychoziPrijemci;
 29.1203 +    private javax.swing.JTextArea napovedaSMTP;
 29.1204 +    private javax.swing.JScrollPane napovedaSMTPscroll;
 29.1205 +    private javax.swing.JTextField odpovedetKomuAdresa;
 29.1206 +    private javax.swing.JDialog odpovedetKomuDialog;
 29.1207 +    private javax.swing.JButton odpovedetKomuHotovo;
 29.1208 +    private javax.swing.JTextField odpovedetKomuJmeno;
 29.1209 +    private org.jdesktop.swingx.JXHyperlink odpovedetKomuOdkaz;
 29.1210 +    private org.jdesktop.swingx.JXPanel panel;
 29.1211 +    private org.jdesktop.swingx.JXPanel panelDatabaze;
 29.1212 +    private org.jdesktop.swingx.JXPanel panelOdeslat;
 29.1213 +    private org.jdesktop.swingx.JXPanel panelPrijemci;
 29.1214 +    private org.jdesktop.swingx.JXPanel panelServer;
 29.1215 +    private org.jdesktop.swingx.JXPanel panelVychoziPrijemci;
 29.1216 +    private org.jdesktop.swingx.JXPanel panelZprava;
 29.1217 +    private cz.frantovo.superPostak.PanelPrijemcu prijemciDodatecni;
 29.1218 +    private cz.frantovo.superPostak.PanelPrijemcu prijemciVychozi;
 29.1219 +    private cz.frantovo.superPostak.PanelPrijemcu prijemciZkusebni;
 29.1220 +    private javax.swing.JButton rozeslatHromadnouZpravuTlacitko;
 29.1221 +    private javax.swing.JButton rozeslatZkusebniTlacitko;
 29.1222 +    private org.jdesktop.swingx.JXTaskPaneContainer taskPanel;
 29.1223 +    private javax.swing.JTextField vstupAdresaOdesilatele;
 29.1224 +    private javax.swing.JPasswordField vstupDBheslo;
 29.1225 +    private javax.swing.JTextField vstupDBjmeno;
 29.1226 +    private javax.swing.JTextField vstupDatabaze;
 29.1227 +    private javax.swing.JCheckBox vstupFormatHTML;
 29.1228 +    private javax.swing.JTextField vstupJmenoOdesilatele;
 29.1229 +    private javax.swing.JTextField vstupPredmet;
 29.1230 +    private javax.swing.JPasswordField vstupSMTPheslo;
 29.1231 +    private javax.swing.JTextField vstupSMTPjmeno;
 29.1232 +    private javax.swing.JSpinner vstupSMTPlimitPrijemcu;
 29.1233 +    private javax.swing.JSpinner vstupSMTPport;
 29.1234 +    private javax.swing.JTextField vstupSMTPserver;
 29.1235 +    private javax.swing.JTextArea vstupSQL;
 29.1236 +    private javax.swing.JTextArea vstupZprava;
 29.1237 +    private javax.swing.JLabel vystupDBzprava;
 29.1238 +    private javax.swing.JLabel vystupSQLZprava;
 29.1239 +    private javax.swing.JButton vyzkousetPripojeniTlacitko;
 29.1240 +    private javax.swing.JButton vyzkousetSQLTlacitko;
 29.1241 +    private javax.swing.JButton zobrazitSQLPrijemceTlacitko;
 29.1242 +    private javax.swing.JButton zobrazitVsechnyPrijemceTlacitko;
 29.1243 +    // End of variables declaration//GEN-END:variables
 29.1244 +}
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/TODO.txt	Sun Nov 23 22:19:20 2008 +0100
    30.3 @@ -0,0 +1,30 @@
    30.4 +    Přidat dotaz - odsouhlasení před odesláním
    30.5 +    Export adres
    30.6 +    Import adres
    30.7 +    Zobrazení adres
    30.8 +    Editovatelnost seznamů (zapnuto/vypnuto)
    30.9 +    SQL připojení
   30.10 +    SQL načítání
   30.11 +    Odesílací třída
   30.12 +    HTML zprávy
   30.13 +    SMTP přihlašování
   30.14 +    SMTP SSL
   30.15 +    Dělení na dávky
   30.16 +Obojetný formát zpráv: html + text
   30.17 +
   30.18 +
   30.19 +    Kontrola vstupu: adresy se zavináčem, délky...
   30.20 +Inteligentní interpret chybových hlášek
   30.21 +
   30.22 +Nápověda u nastavení serveru
   30.23 +"O aplikaci"
   30.24 +Možnost neukládání hesla k DB, případně šifrování
   30.25 +Dokumentace - DocBook - JavaHelp
   30.26 +    
   30.27 +
   30.28 +Odebírání více příjemců současně (multiselekt v tabulce)
   30.29 +automatické doplňování dříve napsaných textů (jména, adresy)
   30.30 +Řádek s logy - místo dialogů
   30.31 +Zvýrazňování SQL syntaxe
   30.32 +
   30.33 +Refaktoring JFTable
   30.34 \ No newline at end of file
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/ZobrazovacAdres.form	Sun Nov 23 22:19:20 2008 +0100
    31.3 @@ -0,0 +1,38 @@
    31.4 +<?xml version="1.0" encoding="UTF-8" ?>
    31.5 +
    31.6 +<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
    31.7 +  <Properties>
    31.8 +    <Property name="defaultCloseOperation" type="int" value="2"/>
    31.9 +    <Property name="title" type="java.lang.String" value="Seznam adres"/>
   31.10 +  </Properties>
   31.11 +  <SyntheticProperties>
   31.12 +    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
   31.13 +  </SyntheticProperties>
   31.14 +  <AuxValues>
   31.15 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   31.16 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
   31.17 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
   31.18 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
   31.19 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
   31.20 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   31.21 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   31.22 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   31.23 +  </AuxValues>
   31.24 +
   31.25 +  <Layout>
   31.26 +    <DimensionLayout dim="0">
   31.27 +      <Group type="103" groupAlignment="0" attributes="0">
   31.28 +          <Component id="panelAdres" alignment="0" pref="422" max="32767" attributes="0"/>
   31.29 +      </Group>
   31.30 +    </DimensionLayout>
   31.31 +    <DimensionLayout dim="1">
   31.32 +      <Group type="103" groupAlignment="0" attributes="0">
   31.33 +          <Component id="panelAdres" alignment="0" pref="315" max="32767" attributes="0"/>
   31.34 +      </Group>
   31.35 +    </DimensionLayout>
   31.36 +  </Layout>
   31.37 +  <SubComponents>
   31.38 +    <Component class="cz.frantovo.superPostak.PanelPrijemcu" name="panelAdres">
   31.39 +    </Component>
   31.40 +  </SubComponents>
   31.41 +</Form>
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/java/SuperPostak/src/cz/frantovo/superPostak/ZobrazovacAdres.java	Sun Nov 23 22:19:20 2008 +0100
    32.3 @@ -0,0 +1,77 @@
    32.4 +/*
    32.5 + * ZobrazovacAdres.java
    32.6 + *
    32.7 + * Created on 18. únor 2008, 0:13
    32.8 + */
    32.9 +
   32.10 +package cz.frantovo.superPostak;
   32.11 +
   32.12 +import cz.frantovo.postak.InternetAddressKomu;
   32.13 +import java.util.Collection;
   32.14 +
   32.15 +/**
   32.16 + *
   32.17 + * @author  fiki
   32.18 + */
   32.19 +public class ZobrazovacAdres extends javax.swing.JDialog {
   32.20 +    
   32.21 +    /** Creates new form ZobrazovacAdres */
   32.22 +    public ZobrazovacAdres(java.awt.Frame parent, boolean modal) {
   32.23 +        super(parent, modal);
   32.24 +        initComponents();
   32.25 +        panelAdres.setEditovatelny(false);        
   32.26 +    }
   32.27 +    
   32.28 +    public void setAdresy(Collection<InternetAddressKomu> adresy) {
   32.29 +        panelAdres.setAdresy(adresy);
   32.30 +    }    
   32.31 +    
   32.32 +    /** This method is called from within the constructor to
   32.33 +     * initialize the form.
   32.34 +     * WARNING: Do NOT modify this code. The content of this method is
   32.35 +     * always regenerated by the Form Editor.
   32.36 +     */
   32.37 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
   32.38 +    private void initComponents() {
   32.39 +
   32.40 +        panelAdres = new cz.frantovo.superPostak.PanelPrijemcu();
   32.41 +
   32.42 +        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
   32.43 +        setTitle("Seznam adres");
   32.44 +
   32.45 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
   32.46 +        getContentPane().setLayout(layout);
   32.47 +        layout.setHorizontalGroup(
   32.48 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   32.49 +            .addComponent(panelAdres, javax.swing.GroupLayout.DEFAULT_SIZE, 422, Short.MAX_VALUE)
   32.50 +        );
   32.51 +        layout.setVerticalGroup(
   32.52 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
   32.53 +            .addComponent(panelAdres, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)
   32.54 +        );
   32.55 +
   32.56 +        pack();
   32.57 +    }// </editor-fold>//GEN-END:initComponents
   32.58 +    
   32.59 +    /**
   32.60 +     * @param args the command line arguments
   32.61 +     */
   32.62 +    public static void main(String args[]) {
   32.63 +        java.awt.EventQueue.invokeLater(new Runnable() {
   32.64 +            public void run() {
   32.65 +                ZobrazovacAdres dialog = new ZobrazovacAdres(new javax.swing.JFrame(), true);
   32.66 +                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
   32.67 +                    public void windowClosing(java.awt.event.WindowEvent e) {
   32.68 +                        System.exit(0);
   32.69 +                    }
   32.70 +                });
   32.71 +                dialog.setVisible(true);
   32.72 +            }
   32.73 +        });
   32.74 +    }
   32.75 +    
   32.76 +    // Variables declaration - do not modify//GEN-BEGIN:variables
   32.77 +    private cz.frantovo.superPostak.PanelPrijemcu panelAdres;
   32.78 +    // End of variables declaration//GEN-END:variables
   32.79 +    
   32.80 +}
    33.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/adept_commit.png has changed
    34.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/apply.png has changed
    35.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/editdelete.png has changed
    36.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/fork.png has changed
    37.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/gear.png has changed
    38.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/mail_generic.png has changed
    39.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/otevrit.png has changed
    40.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/ulozit.png has changed
    41.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/vlozit.png has changed
    42.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/xfmail.png has changed
    43.1 Binary file java/SuperPostak/src/cz/frantovo/superPostak/obrazky/zobrazit_adresy.png has changed
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/java/SuperPostak/test/cz/frantovo/superPostak/PostakTest.java	Sun Nov 23 22:19:20 2008 +0100
    44.3 @@ -0,0 +1,31 @@
    44.4 +package cz.frantovo.superPostak;
    44.5 +
    44.6 +import cz.frantovo.postak.Postak;
    44.7 +import org.junit.Test;
    44.8 +import static org.junit.Assert.*;
    44.9 +
   44.10 +/**
   44.11 + * @author fiki
   44.12 + */
   44.13 +public class PostakTest {
   44.14 +
   44.15 +    @Test
   44.16 +    public void zkontrolujAdresu() {
   44.17 +        System.out.println("zkontrolujAdresu");
   44.18 +
   44.19 +        String[] adresyDobre = {"abcd@example.com", "aa.bb@seznam.cz", "nbusr123@example.name", "VeLkA@pIsMeNa.COM"};
   44.20 +        String[] adresySpatne = {"adresaATexampleDOTcom", "nějaká adresa", "adresa @seznam.cz"};
   44.21 +
   44.22 +        for (String adresa : adresyDobre) {
   44.23 +            System.out.println("Kontroluji: " + adresa);
   44.24 +            assertEquals(true, Postak.zkontrolujAdresu(adresa));
   44.25 +        }
   44.26 +        
   44.27 +        System.out.println();
   44.28 +
   44.29 +        for (String adresa : adresySpatne) {
   44.30 +            System.out.println("Kontroluji: " + adresa);
   44.31 +            assertEquals(false, Postak.zkontrolujAdresu(adresa));
   44.32 +        }
   44.33 +    }
   44.34 +}