1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/build.xml Mon Jul 06 16:25:29 2009 +0300
1.3 @@ -0,0 +1,74 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!-- You may freely edit this file. See commented blocks below for -->
1.6 +<!-- some examples of how to customize the build. -->
1.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
1.8 +<!-- By default, only the Clean and Build commands use this build script. -->
1.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
1.10 +<!-- the Compile on Save feature is turned off for the project. -->
1.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
1.12 +<!-- in the project's Project Properties dialog box.-->
1.13 +<project name="j2cirip" default="default" basedir=".">
1.14 + <description>Builds, tests, and runs the project j2cirip.</description>
1.15 + <import file="nbproject/build-impl.xml"/>
1.16 + <!--
1.17 +
1.18 + There exist several targets which are by default empty and which can be
1.19 + used for execution of your tasks. These targets are usually executed
1.20 + before and after some main targets. They are:
1.21 +
1.22 + -pre-init: called before initialization of project properties
1.23 + -post-init: called after initialization of project properties
1.24 + -pre-compile: called before javac compilation
1.25 + -post-compile: called after javac compilation
1.26 + -pre-compile-single: called before javac compilation of single file
1.27 + -post-compile-single: called after javac compilation of single file
1.28 + -pre-compile-test: called before javac compilation of JUnit tests
1.29 + -post-compile-test: called after javac compilation of JUnit tests
1.30 + -pre-compile-test-single: called before javac compilation of single JUnit test
1.31 + -post-compile-test-single: called after javac compilation of single JUunit test
1.32 + -pre-jar: called before JAR building
1.33 + -post-jar: called after JAR building
1.34 + -post-clean: called after cleaning build products
1.35 +
1.36 + (Targets beginning with '-' are not intended to be called on their own.)
1.37 +
1.38 + Example of inserting an obfuscator after compilation could look like this:
1.39 +
1.40 + <target name="-post-compile">
1.41 + <obfuscate>
1.42 + <fileset dir="${build.classes.dir}"/>
1.43 + </obfuscate>
1.44 + </target>
1.45 +
1.46 + For list of available properties check the imported
1.47 + nbproject/build-impl.xml file.
1.48 +
1.49 +
1.50 + Another way to customize the build is by overriding existing main targets.
1.51 + The targets of interest are:
1.52 +
1.53 + -init-macrodef-javac: defines macro for javac compilation
1.54 + -init-macrodef-junit: defines macro for junit execution
1.55 + -init-macrodef-debug: defines macro for class debugging
1.56 + -init-macrodef-java: defines macro for class execution
1.57 + -do-jar-with-manifest: JAR building (if you are using a manifest)
1.58 + -do-jar-without-manifest: JAR building (if you are not using a manifest)
1.59 + run: execution of project
1.60 + -javadoc-build: Javadoc generation
1.61 + test-report: JUnit report generation
1.62 +
1.63 + An example of overriding the target for project execution could look like this:
1.64 +
1.65 + <target name="run" depends="j2cirip-impl.jar">
1.66 + <exec dir="bin" executable="launcher.exe">
1.67 + <arg file="${dist.jar}"/>
1.68 + </exec>
1.69 + </target>
1.70 +
1.71 + Notice that the overridden target depends on the jar target and not only on
1.72 + the compile target as the regular run target does. Again, for a list of available
1.73 + properties which you can use, check the target you are overriding in the
1.74 + nbproject/build-impl.xml file.
1.75 +
1.76 + -->
1.77 +</project>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/config/Config.properties Mon Jul 06 16:25:29 2009 +0300
2.3 @@ -0,0 +1,8 @@
2.4 +#Last action
2.5 +#Sun Jul 05 14:31:30 EEST 2009
2.6 +showDebug=false
2.7 +aspect=Java
2.8 +ciripUser=
2.9 +ciripPassw=
2.10 +lang=en_US
2.11 +MPcmd=.\\MPlayer\\mplayer.exe
3.1 Binary file lib/appframework-1.0.3.jar has changed
4.1 Binary file lib/substance.jar has changed
5.1 Binary file lib/swing-worker-1.1.jar has changed
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/manifest.mf Mon Jul 06 16:25:29 2009 +0300
6.3 @@ -0,0 +1,3 @@
6.4 +Manifest-Version: 1.0
6.5 +X-COMMENT: Main-Class will be added automatically by build
6.6 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/nbproject/build-impl.xml Mon Jul 06 16:25:29 2009 +0300
7.3 @@ -0,0 +1,700 @@
7.4 +<?xml version="1.0" encoding="UTF-8"?>
7.5 +<!--
7.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
7.7 +*** EDIT ../build.xml INSTEAD ***
7.8 +
7.9 +For the purpose of easier reading the script
7.10 +is divided into following sections:
7.11 +
7.12 + - initialization
7.13 + - compilation
7.14 + - jar
7.15 + - execution
7.16 + - debugging
7.17 + - javadoc
7.18 + - junit compilation
7.19 + - junit execution
7.20 + - junit debugging
7.21 + - applet
7.22 + - cleanup
7.23 +
7.24 + -->
7.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="j2cirip-impl">
7.26 + <fail message="Please build using Ant 1.7.1 or higher.">
7.27 + <condition>
7.28 + <not>
7.29 + <antversion atleast="1.7.1"/>
7.30 + </not>
7.31 + </condition>
7.32 + </fail>
7.33 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
7.34 + <!--
7.35 + ======================
7.36 + INITIALIZATION SECTION
7.37 + ======================
7.38 + -->
7.39 + <target name="-pre-init">
7.40 + <!-- Empty placeholder for easier customization. -->
7.41 + <!-- You can override this target in the ../build.xml file. -->
7.42 + </target>
7.43 + <target depends="-pre-init" name="-init-private">
7.44 + <property file="nbproject/private/config.properties"/>
7.45 + <property file="nbproject/private/configs/${config}.properties"/>
7.46 + <property file="nbproject/private/private.properties"/>
7.47 + </target>
7.48 + <target depends="-pre-init,-init-private" name="-init-user">
7.49 + <property file="${user.properties.file}"/>
7.50 + <!-- The two properties below are usually overridden -->
7.51 + <!-- by the active platform. Just a fallback. -->
7.52 + <property name="default.javac.source" value="1.4"/>
7.53 + <property name="default.javac.target" value="1.4"/>
7.54 + </target>
7.55 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
7.56 + <property file="nbproject/configs/${config}.properties"/>
7.57 + <property file="nbproject/project.properties"/>
7.58 + </target>
7.59 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
7.60 + <available file="${manifest.file}" property="manifest.available"/>
7.61 + <condition property="manifest.available+main.class">
7.62 + <and>
7.63 + <isset property="manifest.available"/>
7.64 + <isset property="main.class"/>
7.65 + <not>
7.66 + <equals arg1="${main.class}" arg2="" trim="true"/>
7.67 + </not>
7.68 + </and>
7.69 + </condition>
7.70 + <condition property="manifest.available+main.class+mkdist.available">
7.71 + <and>
7.72 + <istrue value="${manifest.available+main.class}"/>
7.73 + <isset property="libs.CopyLibs.classpath"/>
7.74 + </and>
7.75 + </condition>
7.76 + <condition property="have.tests">
7.77 + <or>
7.78 + <available file="${test.src.dir}"/>
7.79 + </or>
7.80 + </condition>
7.81 + <condition property="have.sources">
7.82 + <or>
7.83 + <available file="${src.dir}"/>
7.84 + </or>
7.85 + </condition>
7.86 + <condition property="netbeans.home+have.tests">
7.87 + <and>
7.88 + <isset property="netbeans.home"/>
7.89 + <isset property="have.tests"/>
7.90 + </and>
7.91 + </condition>
7.92 + <condition property="no.javadoc.preview">
7.93 + <and>
7.94 + <isset property="javadoc.preview"/>
7.95 + <isfalse value="${javadoc.preview}"/>
7.96 + </and>
7.97 + </condition>
7.98 + <property name="run.jvmargs" value=""/>
7.99 + <property name="javac.compilerargs" value=""/>
7.100 + <property name="work.dir" value="${basedir}"/>
7.101 + <condition property="no.deps">
7.102 + <and>
7.103 + <istrue value="${no.dependencies}"/>
7.104 + </and>
7.105 + </condition>
7.106 + <property name="javac.debug" value="true"/>
7.107 + <property name="javadoc.preview" value="true"/>
7.108 + <property name="application.args" value=""/>
7.109 + <property name="source.encoding" value="${file.encoding}"/>
7.110 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
7.111 + <and>
7.112 + <isset property="javadoc.encoding"/>
7.113 + <not>
7.114 + <equals arg1="${javadoc.encoding}" arg2=""/>
7.115 + </not>
7.116 + </and>
7.117 + </condition>
7.118 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
7.119 + <property name="includes" value="**"/>
7.120 + <property name="excludes" value=""/>
7.121 + <property name="do.depend" value="false"/>
7.122 + <condition property="do.depend.true">
7.123 + <istrue value="${do.depend}"/>
7.124 + </condition>
7.125 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
7.126 + <and>
7.127 + <isset property="jaxws.endorsed.dir"/>
7.128 + <available file="nbproject/jaxws-build.xml"/>
7.129 + </and>
7.130 + </condition>
7.131 + </target>
7.132 + <target name="-post-init">
7.133 + <!-- Empty placeholder for easier customization. -->
7.134 + <!-- You can override this target in the ../build.xml file. -->
7.135 + </target>
7.136 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
7.137 + <fail unless="src.dir">Must set src.dir</fail>
7.138 + <fail unless="test.src.dir">Must set test.src.dir</fail>
7.139 + <fail unless="build.dir">Must set build.dir</fail>
7.140 + <fail unless="dist.dir">Must set dist.dir</fail>
7.141 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
7.142 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
7.143 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
7.144 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
7.145 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
7.146 + <fail unless="dist.jar">Must set dist.jar</fail>
7.147 + </target>
7.148 + <target name="-init-macrodef-property">
7.149 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
7.150 + <attribute name="name"/>
7.151 + <attribute name="value"/>
7.152 + <sequential>
7.153 + <property name="@{name}" value="${@{value}}"/>
7.154 + </sequential>
7.155 + </macrodef>
7.156 + </target>
7.157 + <target name="-init-macrodef-javac">
7.158 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
7.159 + <attribute default="${src.dir}" name="srcdir"/>
7.160 + <attribute default="${build.classes.dir}" name="destdir"/>
7.161 + <attribute default="${javac.classpath}" name="classpath"/>
7.162 + <attribute default="${includes}" name="includes"/>
7.163 + <attribute default="${excludes}" name="excludes"/>
7.164 + <attribute default="${javac.debug}" name="debug"/>
7.165 + <attribute default="${empty.dir}" name="sourcepath"/>
7.166 + <attribute default="${empty.dir}" name="gensrcdir"/>
7.167 + <element name="customize" optional="true"/>
7.168 + <sequential>
7.169 + <property location="${build.dir}/empty" name="empty.dir"/>
7.170 + <mkdir dir="${empty.dir}"/>
7.171 + <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}">
7.172 + <src>
7.173 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
7.174 + <include name="*"/>
7.175 + </dirset>
7.176 + </src>
7.177 + <classpath>
7.178 + <path path="@{classpath}"/>
7.179 + </classpath>
7.180 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
7.181 + <customize/>
7.182 + </javac>
7.183 + </sequential>
7.184 + </macrodef>
7.185 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
7.186 + <attribute default="${src.dir}" name="srcdir"/>
7.187 + <attribute default="${build.classes.dir}" name="destdir"/>
7.188 + <attribute default="${javac.classpath}" name="classpath"/>
7.189 + <sequential>
7.190 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
7.191 + <classpath>
7.192 + <path path="@{classpath}"/>
7.193 + </classpath>
7.194 + </depend>
7.195 + </sequential>
7.196 + </macrodef>
7.197 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
7.198 + <attribute default="${build.classes.dir}" name="destdir"/>
7.199 + <sequential>
7.200 + <fail unless="javac.includes">Must set javac.includes</fail>
7.201 + <pathconvert pathsep="," property="javac.includes.binary">
7.202 + <path>
7.203 + <filelist dir="@{destdir}" files="${javac.includes}"/>
7.204 + </path>
7.205 + <globmapper from="*.java" to="*.class"/>
7.206 + </pathconvert>
7.207 + <delete>
7.208 + <files includes="${javac.includes.binary}"/>
7.209 + </delete>
7.210 + </sequential>
7.211 + </macrodef>
7.212 + </target>
7.213 + <target name="-init-macrodef-junit">
7.214 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
7.215 + <attribute default="${includes}" name="includes"/>
7.216 + <attribute default="${excludes}" name="excludes"/>
7.217 + <attribute default="**" name="testincludes"/>
7.218 + <sequential>
7.219 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
7.220 + <batchtest todir="${build.test.results.dir}">
7.221 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
7.222 + <filename name="@{testincludes}"/>
7.223 + </fileset>
7.224 + </batchtest>
7.225 + <classpath>
7.226 + <path path="${run.test.classpath}"/>
7.227 + </classpath>
7.228 + <syspropertyset>
7.229 + <propertyref prefix="test-sys-prop."/>
7.230 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
7.231 + </syspropertyset>
7.232 + <formatter type="brief" usefile="false"/>
7.233 + <formatter type="xml"/>
7.234 + <jvmarg line="${run.jvmargs}"/>
7.235 + </junit>
7.236 + </sequential>
7.237 + </macrodef>
7.238 + </target>
7.239 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
7.240 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
7.241 + <attribute default="${main.class}" name="name"/>
7.242 + <attribute default="${debug.classpath}" name="classpath"/>
7.243 + <attribute default="" name="stopclassname"/>
7.244 + <sequential>
7.245 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
7.246 + <classpath>
7.247 + <path path="@{classpath}"/>
7.248 + </classpath>
7.249 + </nbjpdastart>
7.250 + </sequential>
7.251 + </macrodef>
7.252 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
7.253 + <attribute default="${build.classes.dir}" name="dir"/>
7.254 + <sequential>
7.255 + <nbjpdareload>
7.256 + <fileset dir="@{dir}" includes="${fix.classes}">
7.257 + <include name="${fix.includes}*.class"/>
7.258 + </fileset>
7.259 + </nbjpdareload>
7.260 + </sequential>
7.261 + </macrodef>
7.262 + </target>
7.263 + <target name="-init-debug-args">
7.264 + <property name="version-output" value="java version "${ant.java.version}"/>
7.265 + <condition property="have-jdk-older-than-1.4">
7.266 + <or>
7.267 + <contains string="${version-output}" substring="java version "1.0"/>
7.268 + <contains string="${version-output}" substring="java version "1.1"/>
7.269 + <contains string="${version-output}" substring="java version "1.2"/>
7.270 + <contains string="${version-output}" substring="java version "1.3"/>
7.271 + </or>
7.272 + </condition>
7.273 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
7.274 + <istrue value="${have-jdk-older-than-1.4}"/>
7.275 + </condition>
7.276 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
7.277 + <os family="windows"/>
7.278 + </condition>
7.279 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
7.280 + <isset property="debug.transport"/>
7.281 + </condition>
7.282 + </target>
7.283 + <target depends="-init-debug-args" name="-init-macrodef-debug">
7.284 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
7.285 + <attribute default="${main.class}" name="classname"/>
7.286 + <attribute default="${debug.classpath}" name="classpath"/>
7.287 + <element name="customize" optional="true"/>
7.288 + <sequential>
7.289 + <java classname="@{classname}" dir="${work.dir}" fork="true">
7.290 + <jvmarg line="${debug-args-line}"/>
7.291 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
7.292 + <jvmarg value="-Dfile.encoding=${source.encoding}"/>
7.293 + <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
7.294 + <jvmarg line="${run.jvmargs}"/>
7.295 + <classpath>
7.296 + <path path="@{classpath}"/>
7.297 + </classpath>
7.298 + <syspropertyset>
7.299 + <propertyref prefix="run-sys-prop."/>
7.300 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
7.301 + </syspropertyset>
7.302 + <customize/>
7.303 + </java>
7.304 + </sequential>
7.305 + </macrodef>
7.306 + </target>
7.307 + <target name="-init-macrodef-java">
7.308 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
7.309 + <attribute default="${main.class}" name="classname"/>
7.310 + <attribute default="${run.classpath}" name="classpath"/>
7.311 + <element name="customize" optional="true"/>
7.312 + <sequential>
7.313 + <java classname="@{classname}" dir="${work.dir}" fork="true">
7.314 + <jvmarg value="-Dfile.encoding=${source.encoding}"/>
7.315 + <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
7.316 + <jvmarg line="${run.jvmargs}"/>
7.317 + <classpath>
7.318 + <path path="@{classpath}"/>
7.319 + </classpath>
7.320 + <syspropertyset>
7.321 + <propertyref prefix="run-sys-prop."/>
7.322 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
7.323 + </syspropertyset>
7.324 + <customize/>
7.325 + </java>
7.326 + </sequential>
7.327 + </macrodef>
7.328 + </target>
7.329 + <target name="-init-presetdef-jar">
7.330 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
7.331 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
7.332 + <j2seproject1:fileset dir="${build.classes.dir}"/>
7.333 + </jar>
7.334 + </presetdef>
7.335 + </target>
7.336 + <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"/>
7.337 + <!--
7.338 + ===================
7.339 + COMPILATION SECTION
7.340 + ===================
7.341 + -->
7.342 + <target depends="init" name="deps-jar" unless="no.deps"/>
7.343 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
7.344 + <target depends="init" name="-check-automatic-build">
7.345 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
7.346 + </target>
7.347 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
7.348 + <antcall target="clean"/>
7.349 + </target>
7.350 + <target depends="init,deps-jar" name="-pre-pre-compile">
7.351 + <mkdir dir="${build.classes.dir}"/>
7.352 + </target>
7.353 + <target name="-pre-compile">
7.354 + <!-- Empty placeholder for easier customization. -->
7.355 + <!-- You can override this target in the ../build.xml file. -->
7.356 + </target>
7.357 + <target if="do.depend.true" name="-compile-depend">
7.358 + <pathconvert property="build.generated.subdirs">
7.359 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
7.360 + <include name="*"/>
7.361 + </dirset>
7.362 + </pathconvert>
7.363 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
7.364 + </target>
7.365 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
7.366 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
7.367 + <copy todir="${build.classes.dir}">
7.368 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
7.369 + </copy>
7.370 + </target>
7.371 + <target name="-post-compile">
7.372 + <!-- Empty placeholder for easier customization. -->
7.373 + <!-- You can override this target in the ../build.xml file. -->
7.374 + </target>
7.375 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
7.376 + <target name="-pre-compile-single">
7.377 + <!-- Empty placeholder for easier customization. -->
7.378 + <!-- You can override this target in the ../build.xml file. -->
7.379 + </target>
7.380 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
7.381 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
7.382 + <j2seproject3:force-recompile/>
7.383 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
7.384 + </target>
7.385 + <target name="-post-compile-single">
7.386 + <!-- Empty placeholder for easier customization. -->
7.387 + <!-- You can override this target in the ../build.xml file. -->
7.388 + </target>
7.389 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
7.390 + <!--
7.391 + ====================
7.392 + JAR BUILDING SECTION
7.393 + ====================
7.394 + -->
7.395 + <target depends="init" name="-pre-pre-jar">
7.396 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
7.397 + <mkdir dir="${dist.jar.dir}"/>
7.398 + </target>
7.399 + <target name="-pre-jar">
7.400 + <!-- Empty placeholder for easier customization. -->
7.401 + <!-- You can override this target in the ../build.xml file. -->
7.402 + </target>
7.403 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
7.404 + <j2seproject1:jar/>
7.405 + </target>
7.406 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
7.407 + <j2seproject1:jar manifest="${manifest.file}"/>
7.408 + </target>
7.409 + <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">
7.410 + <j2seproject1:jar manifest="${manifest.file}">
7.411 + <j2seproject1:manifest>
7.412 + <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
7.413 + </j2seproject1:manifest>
7.414 + </j2seproject1:jar>
7.415 + <echo>To run this application from the command line without Ant, try:</echo>
7.416 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
7.417 + <property location="${dist.jar}" name="dist.jar.resolved"/>
7.418 + <pathconvert property="run.classpath.with.dist.jar">
7.419 + <path path="${run.classpath}"/>
7.420 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
7.421 + </pathconvert>
7.422 + <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
7.423 + </target>
7.424 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
7.425 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
7.426 + <pathconvert property="run.classpath.without.build.classes.dir">
7.427 + <path path="${run.classpath}"/>
7.428 + <map from="${build.classes.dir.resolved}" to=""/>
7.429 + </pathconvert>
7.430 + <pathconvert pathsep=" " property="jar.classpath">
7.431 + <path path="${run.classpath.without.build.classes.dir}"/>
7.432 + <chainedmapper>
7.433 + <flattenmapper/>
7.434 + <globmapper from="*" to="lib/*"/>
7.435 + </chainedmapper>
7.436 + </pathconvert>
7.437 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
7.438 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
7.439 + <fileset dir="${build.classes.dir}"/>
7.440 + <manifest>
7.441 + <attribute name="Main-Class" value="${main.class}"/>
7.442 + <attribute name="Class-Path" value="${jar.classpath}"/>
7.443 + </manifest>
7.444 + </copylibs>
7.445 + <echo>To run this application from the command line without Ant, try:</echo>
7.446 + <property location="${dist.jar}" name="dist.jar.resolved"/>
7.447 + <echo>java -jar "${dist.jar.resolved}"</echo>
7.448 + </target>
7.449 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
7.450 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
7.451 + <pathconvert property="run.classpath.without.build.classes.dir">
7.452 + <path path="${run.classpath}"/>
7.453 + <map from="${build.classes.dir.resolved}" to=""/>
7.454 + </pathconvert>
7.455 + <pathconvert pathsep=" " property="jar.classpath">
7.456 + <path path="${run.classpath.without.build.classes.dir}"/>
7.457 + <chainedmapper>
7.458 + <flattenmapper/>
7.459 + <globmapper from="*" to="lib/*"/>
7.460 + </chainedmapper>
7.461 + </pathconvert>
7.462 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
7.463 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
7.464 + <fileset dir="${build.classes.dir}"/>
7.465 + </copylibs>
7.466 + </target>
7.467 + <target name="-post-jar">
7.468 + <!-- Empty placeholder for easier customization. -->
7.469 + <!-- You can override this target in the ../build.xml file. -->
7.470 + </target>
7.471 + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
7.472 + <!--
7.473 + =================
7.474 + EXECUTION SECTION
7.475 + =================
7.476 + -->
7.477 + <target depends="init,compile" description="Run a main class." name="run">
7.478 + <j2seproject1:java>
7.479 + <customize>
7.480 + <arg line="${application.args}"/>
7.481 + </customize>
7.482 + </j2seproject1:java>
7.483 + </target>
7.484 + <target name="-do-not-recompile">
7.485 + <property name="javac.includes.binary" value=""/>
7.486 + </target>
7.487 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
7.488 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
7.489 + <j2seproject1:java classname="${run.class}"/>
7.490 + </target>
7.491 + <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
7.492 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
7.493 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
7.494 + </target>
7.495 + <!--
7.496 + =================
7.497 + DEBUGGING SECTION
7.498 + =================
7.499 + -->
7.500 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
7.501 + <j2seproject1:nbjpdastart name="${debug.class}"/>
7.502 + </target>
7.503 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
7.504 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
7.505 + </target>
7.506 + <target depends="init,compile" name="-debug-start-debuggee">
7.507 + <j2seproject3:debug>
7.508 + <customize>
7.509 + <arg line="${application.args}"/>
7.510 + </customize>
7.511 + </j2seproject3:debug>
7.512 + </target>
7.513 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
7.514 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
7.515 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
7.516 + </target>
7.517 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
7.518 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
7.519 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
7.520 + <j2seproject3:debug classname="${debug.class}"/>
7.521 + </target>
7.522 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
7.523 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
7.524 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
7.525 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
7.526 + </target>
7.527 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
7.528 + <target depends="init" name="-pre-debug-fix">
7.529 + <fail unless="fix.includes">Must set fix.includes</fail>
7.530 + <property name="javac.includes" value="${fix.includes}.java"/>
7.531 + </target>
7.532 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
7.533 + <j2seproject1:nbjpdareload/>
7.534 + </target>
7.535 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
7.536 + <!--
7.537 + ===============
7.538 + JAVADOC SECTION
7.539 + ===============
7.540 + -->
7.541 + <target depends="init" name="-javadoc-build">
7.542 + <mkdir dir="${dist.javadoc.dir}"/>
7.543 + <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}">
7.544 + <classpath>
7.545 + <path path="${javac.classpath}"/>
7.546 + </classpath>
7.547 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
7.548 + <filename name="**/*.java"/>
7.549 + </fileset>
7.550 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
7.551 + <include name="**/*.java"/>
7.552 + </fileset>
7.553 + </javadoc>
7.554 + </target>
7.555 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
7.556 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
7.557 + </target>
7.558 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
7.559 + <!--
7.560 + =========================
7.561 + JUNIT COMPILATION SECTION
7.562 + =========================
7.563 + -->
7.564 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
7.565 + <mkdir dir="${build.test.classes.dir}"/>
7.566 + </target>
7.567 + <target name="-pre-compile-test">
7.568 + <!-- Empty placeholder for easier customization. -->
7.569 + <!-- You can override this target in the ../build.xml file. -->
7.570 + </target>
7.571 + <target if="do.depend.true" name="-compile-test-depend">
7.572 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
7.573 + </target>
7.574 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
7.575 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
7.576 + <copy todir="${build.test.classes.dir}">
7.577 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
7.578 + </copy>
7.579 + </target>
7.580 + <target name="-post-compile-test">
7.581 + <!-- Empty placeholder for easier customization. -->
7.582 + <!-- You can override this target in the ../build.xml file. -->
7.583 + </target>
7.584 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
7.585 + <target name="-pre-compile-test-single">
7.586 + <!-- Empty placeholder for easier customization. -->
7.587 + <!-- You can override this target in the ../build.xml file. -->
7.588 + </target>
7.589 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
7.590 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
7.591 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
7.592 + <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}"/>
7.593 + <copy todir="${build.test.classes.dir}">
7.594 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
7.595 + </copy>
7.596 + </target>
7.597 + <target name="-post-compile-test-single">
7.598 + <!-- Empty placeholder for easier customization. -->
7.599 + <!-- You can override this target in the ../build.xml file. -->
7.600 + </target>
7.601 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
7.602 + <!--
7.603 + =======================
7.604 + JUNIT EXECUTION SECTION
7.605 + =======================
7.606 + -->
7.607 + <target depends="init" if="have.tests" name="-pre-test-run">
7.608 + <mkdir dir="${build.test.results.dir}"/>
7.609 + </target>
7.610 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
7.611 + <j2seproject3:junit testincludes="**/*Test.java"/>
7.612 + </target>
7.613 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
7.614 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
7.615 + </target>
7.616 + <target depends="init" if="have.tests" name="test-report"/>
7.617 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
7.618 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
7.619 + <target depends="init" if="have.tests" name="-pre-test-run-single">
7.620 + <mkdir dir="${build.test.results.dir}"/>
7.621 + </target>
7.622 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
7.623 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
7.624 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
7.625 + </target>
7.626 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
7.627 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
7.628 + </target>
7.629 + <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"/>
7.630 + <!--
7.631 + =======================
7.632 + JUNIT DEBUGGING SECTION
7.633 + =======================
7.634 + -->
7.635 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
7.636 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
7.637 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
7.638 + <delete file="${test.report.file}"/>
7.639 + <mkdir dir="${build.test.results.dir}"/>
7.640 + <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}">
7.641 + <customize>
7.642 + <syspropertyset>
7.643 + <propertyref prefix="test-sys-prop."/>
7.644 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
7.645 + </syspropertyset>
7.646 + <arg value="${test.class}"/>
7.647 + <arg value="showoutput=true"/>
7.648 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
7.649 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
7.650 + </customize>
7.651 + </j2seproject3:debug>
7.652 + </target>
7.653 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
7.654 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
7.655 + </target>
7.656 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
7.657 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
7.658 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
7.659 + </target>
7.660 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
7.661 + <!--
7.662 + =========================
7.663 + APPLET EXECUTION SECTION
7.664 + =========================
7.665 + -->
7.666 + <target depends="init,compile-single" name="run-applet">
7.667 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
7.668 + <j2seproject1:java classname="sun.applet.AppletViewer">
7.669 + <customize>
7.670 + <arg value="${applet.url}"/>
7.671 + </customize>
7.672 + </j2seproject1:java>
7.673 + </target>
7.674 + <!--
7.675 + =========================
7.676 + APPLET DEBUGGING SECTION
7.677 + =========================
7.678 + -->
7.679 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
7.680 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
7.681 + <j2seproject3:debug classname="sun.applet.AppletViewer">
7.682 + <customize>
7.683 + <arg value="${applet.url}"/>
7.684 + </customize>
7.685 + </j2seproject3:debug>
7.686 + </target>
7.687 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
7.688 + <!--
7.689 + ===============
7.690 + CLEANUP SECTION
7.691 + ===============
7.692 + -->
7.693 + <target depends="init" name="deps-clean" unless="no.deps"/>
7.694 + <target depends="init" name="-do-clean">
7.695 + <delete dir="${build.dir}"/>
7.696 + <delete dir="${dist.dir}"/>
7.697 + </target>
7.698 + <target name="-post-clean">
7.699 + <!-- Empty placeholder for easier customization. -->
7.700 + <!-- You can override this target in the ../build.xml file. -->
7.701 + </target>
7.702 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
7.703 +</project>
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/nbproject/genfiles.properties Mon Jul 06 16:25:29 2009 +0300
8.3 @@ -0,0 +1,8 @@
8.4 +build.xml.data.CRC32=9cb40999
8.5 +build.xml.script.CRC32=7c58cf4c
8.6 +build.xml.stylesheet.CRC32=958a1d3e@1.26.1.45
8.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
8.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
8.9 +nbproject/build-impl.xml.data.CRC32=9cb40999
8.10 +nbproject/build-impl.xml.script.CRC32=9a10667c
8.11 +nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.1.45
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/nbproject/project.properties Mon Jul 06 16:25:29 2009 +0300
9.3 @@ -0,0 +1,72 @@
9.4 +application.desc=A simple java desktop application for cirip.ro
9.5 +application.homepage=http://www.xirincs.info
9.6 +application.title=J2Cirip
9.7 +application.vendor=Costel @ Xirincs.Ro
9.8 +build.classes.dir=${build.dir}/classes
9.9 +build.classes.excludes=**/*.java,**/*.form
9.10 +# This directory is removed when the project is cleaned:
9.11 +build.dir=build
9.12 +build.generated.dir=${build.dir}/generated
9.13 +build.generated.sources.dir=${build.dir}/generated-sources
9.14 +# Only compile against the classpath explicitly listed here:
9.15 +build.sysclasspath=ignore
9.16 +build.test.classes.dir=${build.dir}/test/classes
9.17 +build.test.results.dir=${build.dir}/test/results
9.18 +debug.classpath=\
9.19 + ${run.classpath}
9.20 +debug.test.classpath=\
9.21 + ${run.test.classpath}
9.22 +# This directory is removed when the project is cleaned:
9.23 +dist.dir=dist
9.24 +dist.jar=${dist.dir}/j2cirip.jar
9.25 +dist.javadoc.dir=${dist.dir}/javadoc
9.26 +excludes=
9.27 +includes=**
9.28 +jar.compress=false
9.29 +javac.classpath=\
9.30 + ${libs.swing-app-framework.classpath}:\
9.31 + ${libs.Substance.classpath}
9.32 +# Space-separated list of extra javac options
9.33 +javac.compilerargs=
9.34 +javac.deprecation=false
9.35 +javac.source=1.6
9.36 +javac.target=1.6
9.37 +javac.test.classpath=\
9.38 + ${javac.classpath}:\
9.39 + ${build.classes.dir}:\
9.40 + ${libs.junit.classpath}:\
9.41 + ${libs.junit_4.classpath}
9.42 +javadoc.additionalparam=
9.43 +javadoc.author=false
9.44 +javadoc.encoding=${source.encoding}
9.45 +javadoc.noindex=false
9.46 +javadoc.nonavbar=false
9.47 +javadoc.notree=false
9.48 +javadoc.private=false
9.49 +javadoc.splitindex=true
9.50 +javadoc.use=true
9.51 +javadoc.version=false
9.52 +javadoc.windowtitle=
9.53 +jnlp.codebase.type=local
9.54 +jnlp.codebase.url=file:/D:/java/standalone/j2cirip/dist/
9.55 +jnlp.descriptor=application
9.56 +jnlp.enabled=false
9.57 +jnlp.offline-allowed=false
9.58 +jnlp.signed=false
9.59 +main.class=ro.xirincs.j2cirip.App
9.60 +manifest.file=manifest.mf
9.61 +meta.inf.dir=${src.dir}/META-INF
9.62 +platform.active=default_platform
9.63 +run.classpath=\
9.64 + ${javac.classpath}:\
9.65 + ${build.classes.dir}
9.66 +# Space-separated list of JVM arguments used when running the project
9.67 +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
9.68 +# or test-sys-prop.name=value to set system properties for unit tests):
9.69 +run.jvmargs=
9.70 +run.test.classpath=\
9.71 + ${javac.test.classpath}:\
9.72 + ${build.test.classes.dir}
9.73 +source.encoding=UTF-8
9.74 +src.dir=src
9.75 +test.src.dir=test
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/nbproject/project.xml Mon Jul 06 16:25:29 2009 +0300
10.3 @@ -0,0 +1,19 @@
10.4 +<?xml version="1.0" encoding="UTF-8"?>
10.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
10.6 + <type>org.netbeans.modules.java.j2seproject</type>
10.7 + <configuration>
10.8 + <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
10.9 + <name>j2cirip</name>
10.10 + <minimum-ant-version>1.6.5</minimum-ant-version>
10.11 + <source-roots>
10.12 + <root id="src.dir"/>
10.13 + </source-roots>
10.14 + <test-roots>
10.15 + <root id="test.src.dir"/>
10.16 + </test-roots>
10.17 + </data>
10.18 + <swingapp xmlns="http://www.netbeans.org/ns/form-swingapp/1">
10.19 + <application-class name="ro.xirincs.j2cirip.App"/>
10.20 + </swingapp>
10.21 + </configuration>
10.22 +</project>
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/src/META-INF/services/org.jdesktop.application.Application Mon Jul 06 16:25:29 2009 +0300
11.3 @@ -0,0 +1,1 @@
11.4 +j2cirip.App
11.5 \ No newline at end of file
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/src/ro/xirincs/j2cirip/AboutBox.form Mon Jul 06 16:25:29 2009 +0300
12.3 @@ -0,0 +1,264 @@
12.4 +<?xml version="1.0" encoding="UTF-8" ?>
12.5 +
12.6 +<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
12.7 + <Properties>
12.8 + <Property name="defaultCloseOperation" type="int" value="2"/>
12.9 + <Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.10 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutTitle" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
12.11 + </Property>
12.12 + <Property name="modal" type="boolean" value="true"/>
12.13 + <Property name="name" type="java.lang.String" value="aboutBox" noResource="true"/>
12.14 + <Property name="resizable" type="boolean" value="false"/>
12.15 + </Properties>
12.16 + <SyntheticProperties>
12.17 + <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
12.18 + </SyntheticProperties>
12.19 + <AuxValues>
12.20 + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
12.21 + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
12.22 + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
12.23 + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
12.24 + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
12.25 + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
12.26 + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
12.27 + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
12.28 + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
12.29 + </AuxValues>
12.30 +
12.31 + <Layout>
12.32 + <DimensionLayout dim="0">
12.33 + <Group type="103" groupAlignment="0" attributes="0">
12.34 + <Group type="102" alignment="0" attributes="0">
12.35 + <EmptySpace min="-2" max="-2" attributes="0"/>
12.36 + <Group type="103" groupAlignment="0" attributes="0">
12.37 + <Component id="jLayeredPane1" alignment="0" pref="474" max="32767" attributes="0"/>
12.38 + <Component id="appDescLabel" alignment="0" pref="474" max="32767" attributes="0"/>
12.39 + </Group>
12.40 + <EmptySpace min="-2" max="-2" attributes="0"/>
12.41 + </Group>
12.42 + </Group>
12.43 + </DimensionLayout>
12.44 + <DimensionLayout dim="1">
12.45 + <Group type="103" groupAlignment="0" attributes="0">
12.46 + <Group type="102" alignment="0" attributes="0">
12.47 + <EmptySpace min="-2" max="-2" attributes="0"/>
12.48 + <Component id="jLayeredPane1" pref="296" max="32767" attributes="0"/>
12.49 + <EmptySpace min="-2" max="-2" attributes="0"/>
12.50 + <Component id="appDescLabel" min="-2" max="-2" attributes="0"/>
12.51 + <EmptySpace min="-2" max="-2" attributes="0"/>
12.52 + </Group>
12.53 + </Group>
12.54 + </DimensionLayout>
12.55 + </Layout>
12.56 + <SubComponents>
12.57 + <Component class="javax.swing.JLabel" name="appDescLabel">
12.58 + <Properties>
12.59 + <Property name="name" type="java.lang.String" value="appDescLabel" noResource="true"/>
12.60 + </Properties>
12.61 + <AuxValues>
12.62 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.63 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.64 + </AuxValues>
12.65 + </Component>
12.66 + <Container class="javax.swing.JLayeredPane" name="jLayeredPane1">
12.67 + <Properties>
12.68 + <Property name="name" type="java.lang.String" value="jLayeredPane1" noResource="true"/>
12.69 + </Properties>
12.70 +
12.71 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout"/>
12.72 + <SubComponents>
12.73 + <Component class="javax.swing.JButton" name="closeButton">
12.74 + <Properties>
12.75 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
12.76 + <action class="ro.xirincs.j2cirip.AboutBox" id="closeAboutBox" methodName="closeAboutBox"/>
12.77 + </Property>
12.78 + <Property name="font" type="java.awt.Font" resourceKey="closeButton.font"/>
12.79 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.80 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonClose" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
12.81 + </Property>
12.82 + <Property name="name" type="java.lang.String" value="closeButton" noResource="true"/>
12.83 + </Properties>
12.84 + <Constraints>
12.85 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.86 + <JLayeredPaneConstraints x="380" y="260" width="80" height="-1" layer="0" position="-1"/>
12.87 + </Constraint>
12.88 + </Constraints>
12.89 + </Component>
12.90 + <Component class="javax.swing.JLabel" name="versionLabel">
12.91 + <Properties>
12.92 + <Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
12.93 + <FontInfo relative="true">
12.94 + <Font bold="true" component="versionLabel" property="font" relativeSize="true" size="0"/>
12.95 + </FontInfo>
12.96 + </Property>
12.97 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.98 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutVersionLabel" replaceFormat="bundle.getString("{key}")"/>
12.99 + </Property>
12.100 + <Property name="name" type="java.lang.String" value="versionLabel" noResource="true"/>
12.101 + </Properties>
12.102 + <AuxValues>
12.103 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.104 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.105 + </AuxValues>
12.106 + <Constraints>
12.107 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.108 + <JLayeredPaneConstraints x="20" y="70" width="90" height="-1" layer="0" position="-1"/>
12.109 + </Constraint>
12.110 + </Constraints>
12.111 + </Component>
12.112 + <Component class="javax.swing.JLabel" name="appVersionLabel">
12.113 + <Properties>
12.114 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.115 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutVersion" replaceFormat="bundle.getString("{key}")"/>
12.116 + </Property>
12.117 + <Property name="name" type="java.lang.String" value="appVersionLabel" noResource="true"/>
12.118 + </Properties>
12.119 + <AuxValues>
12.120 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.121 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.122 + </AuxValues>
12.123 + <Constraints>
12.124 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.125 + <JLayeredPaneConstraints x="120" y="70" width="110" height="-1" layer="0" position="-1"/>
12.126 + </Constraint>
12.127 + </Constraints>
12.128 + </Component>
12.129 + <Component class="javax.swing.JLabel" name="vendorLabel">
12.130 + <Properties>
12.131 + <Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
12.132 + <FontInfo relative="true">
12.133 + <Font bold="true" component="vendorLabel" property="font" relativeSize="true" size="0"/>
12.134 + </FontInfo>
12.135 + </Property>
12.136 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.137 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutAutorLabel" replaceFormat="bundle.getString("{key}")"/>
12.138 + </Property>
12.139 + <Property name="name" type="java.lang.String" value="vendorLabel" noResource="true"/>
12.140 + </Properties>
12.141 + <AuxValues>
12.142 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.143 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.144 + </AuxValues>
12.145 + <Constraints>
12.146 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.147 + <JLayeredPaneConstraints x="20" y="100" width="90" height="-1" layer="0" position="-1"/>
12.148 + </Constraint>
12.149 + </Constraints>
12.150 + </Component>
12.151 + <Component class="javax.swing.JLabel" name="appVendorLabel">
12.152 + <Properties>
12.153 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.154 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutAutor" replaceFormat="bundle.getString("{key}")"/>
12.155 + </Property>
12.156 + <Property name="name" type="java.lang.String" value="appVendorLabel" noResource="true"/>
12.157 + </Properties>
12.158 + <AuxValues>
12.159 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.160 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.161 + </AuxValues>
12.162 + <Constraints>
12.163 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.164 + <JLayeredPaneConstraints x="120" y="100" width="120" height="20" layer="0" position="-1"/>
12.165 + </Constraint>
12.166 + </Constraints>
12.167 + </Component>
12.168 + <Component class="javax.swing.JLabel" name="LabelBlog">
12.169 + <Properties>
12.170 + <Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
12.171 + <FontInfo relative="true">
12.172 + <Font bold="true" component="LabelBlog" property="font" relativeSize="true" size="0"/>
12.173 + </FontInfo>
12.174 + </Property>
12.175 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.176 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutHomePageBlog" replaceFormat="bundle.getString("{key}")"/>
12.177 + </Property>
12.178 + <Property name="name" type="java.lang.String" value="LabelBlog" noResource="true"/>
12.179 + </Properties>
12.180 + <AuxValues>
12.181 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.182 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.183 + </AuxValues>
12.184 + <Constraints>
12.185 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.186 + <JLayeredPaneConstraints x="20" y="160" width="90" height="-1" layer="0" position="-1"/>
12.187 + </Constraint>
12.188 + </Constraints>
12.189 + </Component>
12.190 + <Component class="javax.swing.JLabel" name="homepageLabel">
12.191 + <Properties>
12.192 + <Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
12.193 + <FontInfo relative="true">
12.194 + <Font bold="true" component="homepageLabel" property="font" relativeSize="true" size="0"/>
12.195 + </FontInfo>
12.196 + </Property>
12.197 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.198 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutHomePage" replaceFormat="bundle.getString("{key}")"/>
12.199 + </Property>
12.200 + <Property name="name" type="java.lang.String" value="homepageLabel" noResource="true"/>
12.201 + </Properties>
12.202 + <AuxValues>
12.203 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.204 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.205 + </AuxValues>
12.206 + <Constraints>
12.207 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.208 + <JLayeredPaneConstraints x="20" y="130" width="80" height="20" layer="0" position="-1"/>
12.209 + </Constraint>
12.210 + </Constraints>
12.211 + </Component>
12.212 + <Component class="javax.swing.JLabel" name="appTitleLabel">
12.213 + <Properties>
12.214 + <Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
12.215 + <FontInfo relative="true">
12.216 + <Font bold="true" component="appTitleLabel" property="font" relativeSize="true" size="4"/>
12.217 + </FontInfo>
12.218 + </Property>
12.219 + <Property name="text" type="java.lang.String" resourceKey="Application.title"/>
12.220 + <Property name="name" type="java.lang.String" value="appTitleLabel" noResource="true"/>
12.221 + </Properties>
12.222 + <AuxValues>
12.223 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
12.224 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
12.225 + </AuxValues>
12.226 + <Constraints>
12.227 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.228 + <JLayeredPaneConstraints x="20" y="10" width="-1" height="-1" layer="0" position="-1"/>
12.229 + </Constraint>
12.230 + </Constraints>
12.231 + </Component>
12.232 + <Component class="javax.swing.JLabel" name="LabelBlogUrl">
12.233 + <Properties>
12.234 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.235 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutBlogLabelUrl" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
12.236 + </Property>
12.237 + <Property name="name" type="java.lang.String" value="LabelBlogUrl" noResource="true"/>
12.238 + </Properties>
12.239 + <Events>
12.240 + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="LabelBlogUrlMouseClicked"/>
12.241 + </Events>
12.242 + <Constraints>
12.243 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.244 + <JLayeredPaneConstraints x="120" y="160" width="340" height="-1" layer="0" position="-1"/>
12.245 + </Constraint>
12.246 + </Constraints>
12.247 + </Component>
12.248 + <Component class="javax.swing.JLabel" name="appHomepageLabel">
12.249 + <Properties>
12.250 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
12.251 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutHomePageLabelUrl" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
12.252 + </Property>
12.253 + <Property name="name" type="java.lang.String" value="appHomepageLabel" noResource="true"/>
12.254 + </Properties>
12.255 + <Events>
12.256 + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="appHomepageLabelMouseClicked"/>
12.257 + </Events>
12.258 + <Constraints>
12.259 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
12.260 + <JLayeredPaneConstraints x="120" y="130" width="320" height="-1" layer="0" position="-1"/>
12.261 + </Constraint>
12.262 + </Constraints>
12.263 + </Component>
12.264 + </SubComponents>
12.265 + </Container>
12.266 + </SubComponents>
12.267 +</Form>
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/src/ro/xirincs/j2cirip/AboutBox.java Mon Jul 06 16:25:29 2009 +0300
13.3 @@ -0,0 +1,199 @@
13.4 +/**####################################################################
13.5 + *# #
13.6 + *# j2Cirip v. 1.0 beta 1 #
13.7 + *# Created by Costel @ Xirincs.Info #
13.8 + *# #
13.9 + *# https://sourceforge.net/projects/j2cirip/ #
13.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
13.11 + *# #
13.12 + *####################################################################*/
13.13 +/**
13.14 + * AboutBox.java
13.15 + */
13.16 +package ro.xirincs.j2cirip;
13.17 +
13.18 +import java.awt.Desktop;
13.19 +import java.io.File;
13.20 +import java.io.FileInputStream;
13.21 +import java.io.IOException;
13.22 +import java.net.URI;
13.23 +import java.util.Properties;
13.24 +import java.util.ResourceBundle;
13.25 +import java.util.logging.Level;
13.26 +import java.util.logging.Logger;
13.27 +import org.jdesktop.application.Action;
13.28 +
13.29 +public class AboutBox extends javax.swing.JDialog {
13.30 +
13.31 + private static final long serialVersionUID = 1L;
13.32 +
13.33 + public AboutBox(java.awt.Frame parent) {
13.34 + super(parent);
13.35 +
13.36 + initComponents();
13.37 +
13.38 + try {
13.39 + props.load(new FileInputStream(propFile));
13.40 + } catch (IOException ex) {
13.41 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
13.42 + }
13.43 +
13.44 + getRootPane().setDefaultButton(closeButton);
13.45 +
13.46 + }
13.47 +
13.48 + @Action
13.49 + public void closeAboutBox() {
13.50 + dispose();
13.51 + }
13.52 +
13.53 + /** This method is called from within the constructor to
13.54 + * initialize the form.
13.55 + * WARNING: Do NOT modify this code. The content of this method is
13.56 + * always regenerated by the Form Editor.
13.57 + */
13.58 + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
13.59 + private void initComponents() {
13.60 +
13.61 + javax.swing.JLabel appDescLabel = new javax.swing.JLabel();
13.62 + jLayeredPane1 = new javax.swing.JLayeredPane();
13.63 + closeButton = new javax.swing.JButton();
13.64 + javax.swing.JLabel versionLabel = new javax.swing.JLabel();
13.65 + javax.swing.JLabel appVersionLabel = new javax.swing.JLabel();
13.66 + javax.swing.JLabel vendorLabel = new javax.swing.JLabel();
13.67 + javax.swing.JLabel appVendorLabel = new javax.swing.JLabel();
13.68 + javax.swing.JLabel LabelBlog = new javax.swing.JLabel();
13.69 + javax.swing.JLabel homepageLabel = new javax.swing.JLabel();
13.70 + javax.swing.JLabel appTitleLabel = new javax.swing.JLabel();
13.71 + LabelBlogUrl = new javax.swing.JLabel();
13.72 + appHomepageLabel = new javax.swing.JLabel();
13.73 +
13.74 + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
13.75 + java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("ro/xirincs/j2cirip/resources/Bundle"); // NOI18N
13.76 + setTitle(bundle.getString("aboutTitle")); // NOI18N
13.77 + setModal(true);
13.78 + setName("aboutBox"); // NOI18N
13.79 + setResizable(false);
13.80 +
13.81 + appDescLabel.setName("appDescLabel"); // NOI18N
13.82 +
13.83 + jLayeredPane1.setName("jLayeredPane1"); // NOI18N
13.84 +
13.85 + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ro.xirincs.j2cirip.App.class).getContext().getActionMap(AboutBox.class, this);
13.86 + closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
13.87 + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ro.xirincs.j2cirip.App.class).getContext().getResourceMap(AboutBox.class);
13.88 + closeButton.setFont(resourceMap.getFont("closeButton.font")); // NOI18N
13.89 + closeButton.setText(bundle.getString("buttonClose")); // NOI18N
13.90 + closeButton.setName("closeButton"); // NOI18N
13.91 + closeButton.setBounds(380, 260, 80, 23);
13.92 + jLayeredPane1.add(closeButton, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.93 +
13.94 + versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD));
13.95 + versionLabel.setText(bundle.getString("aboutVersionLabel")); // NOI18N
13.96 + versionLabel.setName("versionLabel"); // NOI18N
13.97 + versionLabel.setBounds(20, 70, 90, 14);
13.98 + jLayeredPane1.add(versionLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.99 +
13.100 + appVersionLabel.setText(bundle.getString("aboutVersion")); // NOI18N
13.101 + appVersionLabel.setName("appVersionLabel"); // NOI18N
13.102 + appVersionLabel.setBounds(120, 70, 110, 14);
13.103 + jLayeredPane1.add(appVersionLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.104 +
13.105 + vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD));
13.106 + vendorLabel.setText(bundle.getString("aboutAutorLabel")); // NOI18N
13.107 + vendorLabel.setName("vendorLabel"); // NOI18N
13.108 + vendorLabel.setBounds(20, 100, 90, 14);
13.109 + jLayeredPane1.add(vendorLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.110 +
13.111 + appVendorLabel.setText(bundle.getString("aboutAutor")); // NOI18N
13.112 + appVendorLabel.setName("appVendorLabel"); // NOI18N
13.113 + appVendorLabel.setBounds(120, 100, 120, 20);
13.114 + jLayeredPane1.add(appVendorLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.115 +
13.116 + LabelBlog.setFont(LabelBlog.getFont().deriveFont(LabelBlog.getFont().getStyle() | java.awt.Font.BOLD));
13.117 + LabelBlog.setText(bundle.getString("aboutHomePageBlog")); // NOI18N
13.118 + LabelBlog.setName("LabelBlog"); // NOI18N
13.119 + LabelBlog.setBounds(20, 160, 90, 14);
13.120 + jLayeredPane1.add(LabelBlog, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.121 +
13.122 + homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD));
13.123 + homepageLabel.setText(bundle.getString("aboutHomePage")); // NOI18N
13.124 + homepageLabel.setName("homepageLabel"); // NOI18N
13.125 + homepageLabel.setBounds(20, 130, 80, 20);
13.126 + jLayeredPane1.add(homepageLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.127 +
13.128 + appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4));
13.129 + appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N
13.130 + appTitleLabel.setName("appTitleLabel"); // NOI18N
13.131 + appTitleLabel.setBounds(20, 10, 54, 19);
13.132 + jLayeredPane1.add(appTitleLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.133 +
13.134 + LabelBlogUrl.setText(bundle.getString("aboutBlogLabelUrl")); // NOI18N
13.135 + LabelBlogUrl.setName("LabelBlogUrl"); // NOI18N
13.136 + LabelBlogUrl.addMouseListener(new java.awt.event.MouseAdapter() {
13.137 + public void mouseClicked(java.awt.event.MouseEvent evt) {
13.138 + LabelBlogUrlMouseClicked(evt);
13.139 + }
13.140 + });
13.141 + LabelBlogUrl.setBounds(120, 160, 340, 14);
13.142 + jLayeredPane1.add(LabelBlogUrl, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.143 +
13.144 + appHomepageLabel.setText(bundle.getString("aboutHomePageLabelUrl")); // NOI18N
13.145 + appHomepageLabel.setName("appHomepageLabel"); // NOI18N
13.146 + appHomepageLabel.addMouseListener(new java.awt.event.MouseAdapter() {
13.147 + public void mouseClicked(java.awt.event.MouseEvent evt) {
13.148 + appHomepageLabelMouseClicked(evt);
13.149 + }
13.150 + });
13.151 + appHomepageLabel.setBounds(120, 130, 320, 14);
13.152 + jLayeredPane1.add(appHomepageLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
13.153 +
13.154 + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
13.155 + getContentPane().setLayout(layout);
13.156 + layout.setHorizontalGroup(
13.157 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
13.158 + .addGroup(layout.createSequentialGroup()
13.159 + .addContainerGap()
13.160 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
13.161 + .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)
13.162 + .addComponent(appDescLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE))
13.163 + .addContainerGap())
13.164 + );
13.165 + layout.setVerticalGroup(
13.166 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
13.167 + .addGroup(layout.createSequentialGroup()
13.168 + .addContainerGap()
13.169 + .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
13.170 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
13.171 + .addComponent(appDescLabel)
13.172 + .addContainerGap())
13.173 + );
13.174 +
13.175 + pack();
13.176 + }// </editor-fold>//GEN-END:initComponents
13.177 +
13.178 + private void appHomepageLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_appHomepageLabelMouseClicked
13.179 + try {
13.180 + Desktop.getDesktop().browse(new URI(bundle.getString("aboutHomePageUrl")));
13.181 + } catch (Exception ex) {
13.182 + Logger.getLogger(AboutBox.class.getName()).log(Level.SEVERE, null, ex);
13.183 + }
13.184 + }//GEN-LAST:event_appHomepageLabelMouseClicked
13.185 +
13.186 + private void LabelBlogUrlMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_LabelBlogUrlMouseClicked
13.187 + try {
13.188 + Desktop.getDesktop().browse(new URI(bundle.getString("aboutBlogUrl")));
13.189 + } catch (Exception ex) {
13.190 + Logger.getLogger(AboutBox.class.getName()).log(Level.SEVERE, null, ex);
13.191 + }
13.192 + }//GEN-LAST:event_LabelBlogUrlMouseClicked
13.193 + // Variables declaration - do not modify//GEN-BEGIN:variables
13.194 + private javax.swing.JLabel LabelBlogUrl;
13.195 + private javax.swing.JLabel appHomepageLabel;
13.196 + private javax.swing.JButton closeButton;
13.197 + private javax.swing.JLayeredPane jLayeredPane1;
13.198 + // End of variables declaration//GEN-END:variables
13.199 + private ResourceBundle bundle = ResourceBundle.getBundle("ro/xirincs/j2cirip/resources/Bundle");
13.200 + private File propFile = new File("./config/Config.properties");
13.201 + private Properties props = new Properties();
13.202 +}
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/src/ro/xirincs/j2cirip/App.java Mon Jul 06 16:25:29 2009 +0300
14.3 @@ -0,0 +1,167 @@
14.4 +/**####################################################################
14.5 + *# #
14.6 + *# j2Cirip v. 1.0 beta 1 #
14.7 + *# Created by Costel @ Xirincs.Info #
14.8 + *# #
14.9 + *# https://sourceforge.net/projects/j2cirip/ #
14.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
14.11 + *# #
14.12 + *####################################################################*/
14.13 +/**
14.14 + * App.java
14.15 + */
14.16 +package ro.xirincs.j2cirip;
14.17 +
14.18 +import java.awt.EventQueue;
14.19 +import java.io.File;
14.20 +import java.io.FileInputStream;
14.21 +import java.io.IOException;
14.22 +import java.util.Locale;
14.23 +import java.util.Properties;
14.24 +import java.util.logging.Level;
14.25 +import java.util.logging.Logger;
14.26 +import javax.swing.UIManager;
14.27 +import javax.swing.plaf.metal.DefaultMetalTheme;
14.28 +import javax.swing.plaf.metal.MetalLookAndFeel;
14.29 +import javax.swing.plaf.metal.OceanTheme;
14.30 +import org.jdesktop.application.Application;
14.31 +import org.jdesktop.application.SingleFrameApplication;
14.32 +
14.33 +/**
14.34 + * The main class of the application.
14.35 + */
14.36 +public class App extends SingleFrameApplication {
14.37 +
14.38 + public View getVw() {
14.39 + return vw;
14.40 + }
14.41 +
14.42 + public void setVw(View vw) {
14.43 + this.vw = vw;
14.44 + }
14.45 +
14.46 + /**
14.47 + * At startup create and show the main frame of the application.
14.48 + */
14.49 + @Override
14.50 + protected void startup() {
14.51 +
14.52 + Runnable runner = new Runnable() {
14.53 +
14.54 + @Override
14.55 + public void run() {
14.56 + try {
14.57 + props.load(new FileInputStream(propFile));
14.58 + Locale.setDefault(new Locale(props.getProperty("lang")));
14.59 +
14.60 + //setare look & feel
14.61 + if (props.getProperty("aspect").contentEquals("System")) {
14.62 + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
14.63 + } else if (props.getProperty("aspect").contentEquals("Nimbus")) {
14.64 + UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
14.65 + } else if (props.getProperty("aspect").contentEquals("Motif")) {
14.66 + UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
14.67 + } else if (props.getProperty("aspect").contentEquals("SubstanceAutumn")) {
14.68 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceAutumnLookAndFeel");
14.69 + } else if (props.getProperty("aspect").contentEquals("SubstanceBusiness")) {
14.70 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessLookAndFeel");
14.71 + } else if (props.getProperty("aspect").contentEquals("SubstanceBusinessBlueSteel")) {
14.72 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel");
14.73 + } else if (props.getProperty("aspect").contentEquals("SubstanceBusinessBlackSteel")) {
14.74 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel");
14.75 + } else if (props.getProperty("aspect").contentEquals("SubstanceChallengerDeep")) {
14.76 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceChallengerDeepLookAndFeel");
14.77 + } else if (props.getProperty("aspect").contentEquals("SubstanceCremeCoffee")) {
14.78 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceCremeCoffeeLookAndFeel");
14.79 + } else if (props.getProperty("aspect").contentEquals("SubstanceCreme")) {
14.80 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceCremeLookAndFeel");
14.81 + } else if (props.getProperty("aspect").contentEquals("SubstanceDustCoffee")) {
14.82 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceDustCoffeeLookAndFeel");
14.83 + } else if (props.getProperty("aspect").contentEquals("SubstanceDust")) {
14.84 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceDustLookAndFeel");
14.85 + } else if (props.getProperty("aspect").contentEquals("SubstanceEmeraldDusk")) {
14.86 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceEmeraldDuskLookAndFeel");
14.87 + } else if (props.getProperty("aspect").contentEquals("SubstanceMagma")) {
14.88 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMagmaLookAndFeel");
14.89 + } else if (props.getProperty("aspect").contentEquals("SubstanceMistAqua")) {
14.90 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMistAquaLookAndFeel");
14.91 + } else if (props.getProperty("aspect").contentEquals("SubstanceMistSilver")) {
14.92 + UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMistSilverLookAndFeel");
14.93 + } else if (props.getProperty("aspect").contentEquals("Windows")) {
14.94 + UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
14.95 + } else if (props.getProperty("aspect").contentEquals("WindowsClassic")) {
14.96 + UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");
14.97 + } else if (props.getProperty("aspect").contentEquals("GTK")) {
14.98 + UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
14.99 + } else if (props.getProperty("aspect").contentEquals("Ocean")) {
14.100 + UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
14.101 + MetalLookAndFeel.setCurrentTheme(new OceanTheme());
14.102 + } else {
14.103 + UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
14.104 + MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
14.105 +
14.106 + // an alternative way to set the Metal L&F
14.107 + // lookAndFeel = "javax.swing.plaf.metal.MetalLookAndFeel";
14.108 + }
14.109 + } catch (Exception ex) {
14.110 + Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
14.111 + }
14.112 +
14.113 + //initializare si afisare MainPanel
14.114 + vw = new View(App.getApplication());
14.115 + show(vw);
14.116 +
14.117 + }
14.118 + };
14.119 + EventQueue.invokeLater(runner);
14.120 +
14.121 +
14.122 + }
14.123 +
14.124 + @Override
14.125 + protected void end() {
14.126 + vw.closePlayer();
14.127 + super.end();
14.128 + }
14.129 +
14.130 + //@Override
14.131 + //protected void shutdown() {
14.132 + // vw.closePlayer();
14.133 + //}
14.134 + protected void restart() {
14.135 +
14.136 + try {
14.137 + Runtime.getRuntime().exec("java -jar j2cirip.jar");
14.138 + end();
14.139 + } catch (IOException ex) {
14.140 + Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
14.141 + }
14.142 + }
14.143 +
14.144 + /**
14.145 + * This method is to initialize the specified window by injecting resources.
14.146 + * Windows shown in our application come fully initialized from the GUI
14.147 + * builder, so this additional configuration is not needed.
14.148 + */
14.149 + @Override
14.150 + protected void configureWindow(java.awt.Window root) {
14.151 + }
14.152 +
14.153 + /**
14.154 + * A convenient static getter for the application instance.
14.155 + * @return the instance of App
14.156 + */
14.157 + public static App getApplication() {
14.158 + return Application.getInstance(App.class);
14.159 + }
14.160 +
14.161 + /**
14.162 + * Main method launching the application.
14.163 + */
14.164 + public static void main(final String[] args) {
14.165 + launch(App.class, args);
14.166 + }
14.167 + private View vw;
14.168 + private File propFile = new File("./config/Config.properties");
14.169 + private Properties props = new Properties();
14.170 +}
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/src/ro/xirincs/j2cirip/ConfigBox.form Mon Jul 06 16:25:29 2009 +0300
15.3 @@ -0,0 +1,310 @@
15.4 +<?xml version="1.0" encoding="UTF-8" ?>
15.5 +
15.6 +<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
15.7 + <Properties>
15.8 + <Property name="defaultCloseOperation" type="int" value="2"/>
15.9 + <Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.10 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="configTitle" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.11 + </Property>
15.12 + <Property name="name" type="java.lang.String" value="Form" noResource="true"/>
15.13 + </Properties>
15.14 + <SyntheticProperties>
15.15 + <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
15.16 + </SyntheticProperties>
15.17 + <AuxValues>
15.18 + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
15.19 + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
15.20 + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
15.21 + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
15.22 + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
15.23 + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
15.24 + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
15.25 + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
15.26 + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
15.27 + </AuxValues>
15.28 +
15.29 + <Layout>
15.30 + <DimensionLayout dim="0">
15.31 + <Group type="103" groupAlignment="0" attributes="0">
15.32 + <Group type="102" alignment="0" attributes="0">
15.33 + <EmptySpace max="-2" attributes="0"/>
15.34 + <Component id="jLayeredPane1" pref="495" max="32767" attributes="0"/>
15.35 + <EmptySpace max="-2" attributes="0"/>
15.36 + </Group>
15.37 + </Group>
15.38 + </DimensionLayout>
15.39 + <DimensionLayout dim="1">
15.40 + <Group type="103" groupAlignment="0" attributes="0">
15.41 + <Group type="102" alignment="0" attributes="0">
15.42 + <EmptySpace max="-2" attributes="0"/>
15.43 + <Component id="jLayeredPane1" min="-2" pref="301" max="-2" attributes="0"/>
15.44 + <EmptySpace max="32767" attributes="0"/>
15.45 + </Group>
15.46 + </Group>
15.47 + </DimensionLayout>
15.48 + </Layout>
15.49 + <SubComponents>
15.50 + <Container class="javax.swing.JLayeredPane" name="jLayeredPane1">
15.51 + <Properties>
15.52 + <Property name="name" type="java.lang.String" value="jLayeredPane1" noResource="true"/>
15.53 + </Properties>
15.54 +
15.55 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout"/>
15.56 + <SubComponents>
15.57 + <Component class="javax.swing.JTextField" name="jTextFieldciripUser">
15.58 + <Properties>
15.59 + <Property name="name" type="java.lang.String" value="jTextFieldciripUser" noResource="true"/>
15.60 + </Properties>
15.61 + <Constraints>
15.62 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.63 + <JLayeredPaneConstraints x="200" y="10" width="140" height="-1" layer="0" position="-1"/>
15.64 + </Constraint>
15.65 + </Constraints>
15.66 + </Component>
15.67 + <Component class="javax.swing.JLabel" name="jLabelciripUser">
15.68 + <Properties>
15.69 + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
15.70 + <ComponentRef name="jTextFieldciripUser"/>
15.71 + </Property>
15.72 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.73 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jLabelciripUser" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.74 + </Property>
15.75 + <Property name="name" type="java.lang.String" value="jLabelciripUser" noResource="true"/>
15.76 + </Properties>
15.77 + <Constraints>
15.78 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.79 + <JLayeredPaneConstraints x="10" y="10" width="180" height="-1" layer="0" position="-1"/>
15.80 + </Constraint>
15.81 + </Constraints>
15.82 + </Component>
15.83 + <Component class="javax.swing.JPasswordField" name="jPasswordFieldciripPassw">
15.84 + <Properties>
15.85 + <Property name="name" type="java.lang.String" value="jPasswordFieldciripPassw" noResource="true"/>
15.86 + </Properties>
15.87 + <Constraints>
15.88 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.89 + <JLayeredPaneConstraints x="200" y="50" width="140" height="-1" layer="0" position="-1"/>
15.90 + </Constraint>
15.91 + </Constraints>
15.92 + </Component>
15.93 + <Component class="javax.swing.JLabel" name="jLabelciripPassw">
15.94 + <Properties>
15.95 + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
15.96 + <ComponentRef name="jPasswordFieldciripPassw"/>
15.97 + </Property>
15.98 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.99 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jLabelciripPassw" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.100 + </Property>
15.101 + <Property name="name" type="java.lang.String" value="jLabelciripPassw" noResource="true"/>
15.102 + </Properties>
15.103 + <Constraints>
15.104 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.105 + <JLayeredPaneConstraints x="10" y="50" width="180" height="-1" layer="0" position="-1"/>
15.106 + </Constraint>
15.107 + </Constraints>
15.108 + </Component>
15.109 + <Component class="javax.swing.JTextField" name="jTextFieldMPcmd">
15.110 + <Properties>
15.111 + <Property name="name" type="java.lang.String" value="jTextFieldMPcmd" noResource="true"/>
15.112 + </Properties>
15.113 + <Constraints>
15.114 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.115 + <JLayeredPaneConstraints x="200" y="90" width="198" height="-1" layer="0" position="-1"/>
15.116 + </Constraint>
15.117 + </Constraints>
15.118 + </Component>
15.119 + <Component class="javax.swing.JLabel" name="jLabelMPcmd">
15.120 + <Properties>
15.121 + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
15.122 + <ComponentRef name="jLabelMPcmd"/>
15.123 + </Property>
15.124 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.125 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jLabelMPcmd" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.126 + </Property>
15.127 + <Property name="name" type="java.lang.String" value="jLabelMPcmd" noResource="true"/>
15.128 + </Properties>
15.129 + <Constraints>
15.130 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.131 + <JLayeredPaneConstraints x="10" y="90" width="180" height="17" layer="0" position="-1"/>
15.132 + </Constraint>
15.133 + </Constraints>
15.134 + </Component>
15.135 + <Component class="javax.swing.JComboBox" name="jComboBoxLang">
15.136 + <Properties>
15.137 + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
15.138 + <StringArray count="2">
15.139 + <StringItem index="0" value="en_US"/>
15.140 + <StringItem index="1" value="ro_RO"/>
15.141 + </StringArray>
15.142 + </Property>
15.143 + <Property name="name" type="java.lang.String" value="jComboBoxLang" noResource="true"/>
15.144 + </Properties>
15.145 + <Constraints>
15.146 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.147 + <JLayeredPaneConstraints x="200" y="130" width="90" height="-1" layer="0" position="-1"/>
15.148 + </Constraint>
15.149 + </Constraints>
15.150 + </Component>
15.151 + <Component class="javax.swing.JLabel" name="jLabelLang">
15.152 + <Properties>
15.153 + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
15.154 + <ComponentRef name="jComboBoxLang"/>
15.155 + </Property>
15.156 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.157 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jLabelLang" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.158 + </Property>
15.159 + <Property name="name" type="java.lang.String" value="jLabelLang" noResource="true"/>
15.160 + </Properties>
15.161 + <Constraints>
15.162 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.163 + <JLayeredPaneConstraints x="10" y="130" width="121" height="-1" layer="0" position="-1"/>
15.164 + </Constraint>
15.165 + </Constraints>
15.166 + </Component>
15.167 + <Component class="javax.swing.JButton" name="jButtonSave">
15.168 + <Properties>
15.169 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
15.170 + <action class="ro.xirincs.j2cirip.ConfigBox" id="SaveInfo" methodName="SaveInfo"/>
15.171 + </Property>
15.172 + <Property name="font" type="java.awt.Font" resourceKey="jButtonSave.font"/>
15.173 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.174 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonSave" replaceFormat="bundle.getString("{key}")"/>
15.175 + </Property>
15.176 + <Property name="name" type="java.lang.String" value="jButtonSave" noResource="true"/>
15.177 + </Properties>
15.178 + <Constraints>
15.179 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.180 + <JLayeredPaneConstraints x="390" y="220" width="100" height="-1" layer="0" position="-1"/>
15.181 + </Constraint>
15.182 + </Constraints>
15.183 + </Component>
15.184 + <Component class="javax.swing.JLabel" name="jLabelRezultat">
15.185 + <Properties>
15.186 + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
15.187 + <ComponentRef name="jButtonSave"/>
15.188 + </Property>
15.189 + <Property name="text" type="java.lang.String" resourceKey="jLabelRezultat.text"/>
15.190 + <Property name="name" type="java.lang.String" value="jLabelRezultat" noResource="true"/>
15.191 + </Properties>
15.192 + <Constraints>
15.193 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.194 + <JLayeredPaneConstraints x="240" y="220" width="100" height="20" layer="0" position="-1"/>
15.195 + </Constraint>
15.196 + </Constraints>
15.197 + </Component>
15.198 + <Component class="javax.swing.JButton" name="closeButton">
15.199 + <Properties>
15.200 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
15.201 + <action class="ro.xirincs.j2cirip.ConfigBox" id="closeConfigBox" methodName="closeConfigBox"/>
15.202 + </Property>
15.203 + <Property name="font" type="java.awt.Font" resourceKey="closeButton.font"/>
15.204 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.205 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonClose" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.206 + </Property>
15.207 + <Property name="name" type="java.lang.String" value="closeButton" noResource="true"/>
15.208 + </Properties>
15.209 + <Constraints>
15.210 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.211 + <JLayeredPaneConstraints x="390" y="260" width="100" height="-1" layer="0" position="-1"/>
15.212 + </Constraint>
15.213 + </Constraints>
15.214 + </Component>
15.215 + <Component class="java.awt.Checkbox" name="checkboxShowDebug">
15.216 + <Properties>
15.217 + <Property name="label" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.218 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="labelShowDebug" replaceFormat="bundle.getString("{key}")"/>
15.219 + </Property>
15.220 + <Property name="name" type="java.lang.String" value="checkboxShowDebug" noResource="true"/>
15.221 + </Properties>
15.222 + <Constraints>
15.223 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.224 + <JLayeredPaneConstraints x="10" y="220" width="230" height="-1" layer="0" position="-1"/>
15.225 + </Constraint>
15.226 + </Constraints>
15.227 + </Component>
15.228 + <Component class="javax.swing.JButton" name="jButtonChooseMplayer">
15.229 + <Properties>
15.230 + <Property name="font" type="java.awt.Font" resourceKey="jButtonChooseMplayer.font"/>
15.231 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.232 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jButtonChooseMplayer" replaceFormat="bundle.getString("{key}")"/>
15.233 + </Property>
15.234 + <Property name="name" type="java.lang.String" value="jButtonChooseMplayer" noResource="true"/>
15.235 + </Properties>
15.236 + <Events>
15.237 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonChooseMplayerActionPerformed"/>
15.238 + </Events>
15.239 + <Constraints>
15.240 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.241 + <JLayeredPaneConstraints x="410" y="90" width="80" height="-1" layer="0" position="-1"/>
15.242 + </Constraint>
15.243 + </Constraints>
15.244 + </Component>
15.245 + <Component class="javax.swing.JLabel" name="jLabelRegister">
15.246 + <Properties>
15.247 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.248 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jLabelRegister" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.249 + </Property>
15.250 + <Property name="name" type="java.lang.String" value="jLabelRegister" noResource="true"/>
15.251 + </Properties>
15.252 + <Events>
15.253 + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabelRegisterMouseClicked"/>
15.254 + </Events>
15.255 + <Constraints>
15.256 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.257 + <JLayeredPaneConstraints x="370" y="10" width="120" height="-1" layer="0" position="-1"/>
15.258 + </Constraint>
15.259 + </Constraints>
15.260 + </Component>
15.261 + <Component class="javax.swing.JComboBox" name="jComboBoxLookFeel">
15.262 + <Properties>
15.263 + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
15.264 + <StringArray count="22">
15.265 + <StringItem index="0" value="Java"/>
15.266 + <StringItem index="1" value="System"/>
15.267 + <StringItem index="2" value="Nimbus"/>
15.268 + <StringItem index="3" value="Motif"/>
15.269 + <StringItem index="4" value="Ocean"/>
15.270 + <StringItem index="5" value="Windows"/>
15.271 + <StringItem index="6" value="WindowsClassic"/>
15.272 + <StringItem index="7" value="GTK"/>
15.273 + <StringItem index="8" value="SubstanceAutumn"/>
15.274 + <StringItem index="9" value="SubstanceBusiness"/>
15.275 + <StringItem index="10" value="SubstanceBusinessBlueSteel"/>
15.276 + <StringItem index="11" value="SubstanceBusinessBlackSteel"/>
15.277 + <StringItem index="12" value="SubstanceChallengerDeep"/>
15.278 + <StringItem index="13" value="SubstanceCreme"/>
15.279 + <StringItem index="14" value="SubstanceCremeCoffee"/>
15.280 + <StringItem index="15" value="SubstanceDust"/>
15.281 + <StringItem index="16" value="SubstanceDustCoffee"/>
15.282 + <StringItem index="17" value="SubstanceEmeraldDusk"/>
15.283 + <StringItem index="18" value="SubstanceMagma"/>
15.284 + <StringItem index="19" value="SubstanceMistAqua"/>
15.285 + <StringItem index="20" value="SubstanceMistSilver"/>
15.286 + <StringItem index="21" value=" "/>
15.287 + </StringArray>
15.288 + </Property>
15.289 + <Property name="name" type="java.lang.String" value="jComboBoxLookFeel" noResource="true"/>
15.290 + </Properties>
15.291 + <Constraints>
15.292 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.293 + <JLayeredPaneConstraints x="200" y="170" width="170" height="-1" layer="0" position="-1"/>
15.294 + </Constraint>
15.295 + </Constraints>
15.296 + </Component>
15.297 + <Component class="javax.swing.JLabel" name="jLabelLookFeel">
15.298 + <Properties>
15.299 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
15.300 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="jLabelLookFeel" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
15.301 + </Property>
15.302 + <Property name="name" type="java.lang.String" value="jLabelLookFeel" noResource="true"/>
15.303 + </Properties>
15.304 + <Constraints>
15.305 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
15.306 + <JLayeredPaneConstraints x="10" y="180" width="170" height="-1" layer="0" position="-1"/>
15.307 + </Constraint>
15.308 + </Constraints>
15.309 + </Component>
15.310 + </SubComponents>
15.311 + </Container>
15.312 + </SubComponents>
15.313 +</Form>
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/src/ro/xirincs/j2cirip/ConfigBox.java Mon Jul 06 16:25:29 2009 +0300
16.3 @@ -0,0 +1,289 @@
16.4 +/**####################################################################
16.5 + *# #
16.6 + *# j2Cirip v. 1.0 beta 1 #
16.7 + *# Created by Costel @ Xirincs.Info #
16.8 + *# #
16.9 + *# https://sourceforge.net/projects/j2cirip/ #
16.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
16.11 + *# #
16.12 + *####################################################################*/
16.13 +/**
16.14 + * ConfigBox.java
16.15 + */
16.16 +package ro.xirincs.j2cirip;
16.17 +
16.18 +import java.awt.Desktop;
16.19 +import java.io.File;
16.20 +import java.io.FileInputStream;
16.21 +import java.io.FileOutputStream;
16.22 +import java.io.IOException;
16.23 +import java.net.URI;
16.24 +import java.util.Properties;
16.25 +import java.util.ResourceBundle;
16.26 +import java.util.logging.Level;
16.27 +import java.util.logging.Logger;
16.28 +import javax.swing.JFileChooser;
16.29 +import org.jdesktop.application.Action;
16.30 +
16.31 +/**
16.32 + *
16.33 + * @author Costel
16.34 + */
16.35 +public class ConfigBox extends javax.swing.JDialog {
16.36 +
16.37 + private static final long serialVersionUID = 1L;
16.38 +
16.39 + public ConfigBox(java.awt.Frame parent) {
16.40 + super(parent);
16.41 +
16.42 + initComponents();
16.43 +
16.44 + try {
16.45 + props.load(new FileInputStream(propFile));
16.46 + } catch (IOException ex) {
16.47 + jLabelRezultat.setText(bundle.getString("error"));
16.48 + Logger.getLogger(ConfigBox.class.getName()).log(Level.SEVERE, null, ex);
16.49 + }
16.50 +
16.51 + jTextFieldciripUser.setText(props.getProperty("ciripUser"));
16.52 + jPasswordFieldciripPassw.setText(props.getProperty("ciripPassw"));
16.53 + jTextFieldMPcmd.setText(props.getProperty("MPcmd"));
16.54 + jComboBoxLang.setSelectedItem(props.getProperty("lang"));
16.55 + jComboBoxLookFeel.setSelectedItem(props.getProperty("aspect"));
16.56 + checkboxShowDebug.setState(Boolean.parseBoolean(props.getProperty("showDebug")));
16.57 +
16.58 + getRootPane().setDefaultButton(jButtonSave);
16.59 +
16.60 + }
16.61 +
16.62 + /** This method is called from within the constructor to
16.63 + * initialize the form.
16.64 + * WARNING: Do NOT modify this code. The content of this method is
16.65 + * always regenerated by the Form Editor.
16.66 + */
16.67 + @SuppressWarnings("unchecked")
16.68 + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
16.69 + private void initComponents() {
16.70 +
16.71 + jLayeredPane1 = new javax.swing.JLayeredPane();
16.72 + jTextFieldciripUser = new javax.swing.JTextField();
16.73 + jLabelciripUser = new javax.swing.JLabel();
16.74 + jPasswordFieldciripPassw = new javax.swing.JPasswordField();
16.75 + jLabelciripPassw = new javax.swing.JLabel();
16.76 + jTextFieldMPcmd = new javax.swing.JTextField();
16.77 + jLabelMPcmd = new javax.swing.JLabel();
16.78 + jComboBoxLang = new javax.swing.JComboBox();
16.79 + jLabelLang = new javax.swing.JLabel();
16.80 + jButtonSave = new javax.swing.JButton();
16.81 + jLabelRezultat = new javax.swing.JLabel();
16.82 + closeButton = new javax.swing.JButton();
16.83 + checkboxShowDebug = new java.awt.Checkbox();
16.84 + jButtonChooseMplayer = new javax.swing.JButton();
16.85 + jLabelRegister = new javax.swing.JLabel();
16.86 + jComboBoxLookFeel = new javax.swing.JComboBox();
16.87 + jLabelLookFeel = new javax.swing.JLabel();
16.88 +
16.89 + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
16.90 + java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("ro/xirincs/j2cirip/resources/Bundle"); // NOI18N
16.91 + setTitle(bundle.getString("configTitle")); // NOI18N
16.92 + setName("Form"); // NOI18N
16.93 +
16.94 + jLayeredPane1.setName("jLayeredPane1"); // NOI18N
16.95 +
16.96 + jTextFieldciripUser.setName("jTextFieldciripUser"); // NOI18N
16.97 + jTextFieldciripUser.setBounds(200, 10, 140, 20);
16.98 + jLayeredPane1.add(jTextFieldciripUser, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.99 +
16.100 + jLabelciripUser.setLabelFor(jTextFieldciripUser);
16.101 + jLabelciripUser.setText(bundle.getString("jLabelciripUser")); // NOI18N
16.102 + jLabelciripUser.setName("jLabelciripUser"); // NOI18N
16.103 + jLabelciripUser.setBounds(10, 10, 180, 14);
16.104 + jLayeredPane1.add(jLabelciripUser, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.105 +
16.106 + jPasswordFieldciripPassw.setName("jPasswordFieldciripPassw"); // NOI18N
16.107 + jPasswordFieldciripPassw.setBounds(200, 50, 140, 20);
16.108 + jLayeredPane1.add(jPasswordFieldciripPassw, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.109 +
16.110 + jLabelciripPassw.setLabelFor(jPasswordFieldciripPassw);
16.111 + jLabelciripPassw.setText(bundle.getString("jLabelciripPassw")); // NOI18N
16.112 + jLabelciripPassw.setName("jLabelciripPassw"); // NOI18N
16.113 + jLabelciripPassw.setBounds(10, 50, 180, 14);
16.114 + jLayeredPane1.add(jLabelciripPassw, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.115 +
16.116 + jTextFieldMPcmd.setName("jTextFieldMPcmd"); // NOI18N
16.117 + jTextFieldMPcmd.setBounds(200, 90, 198, 20);
16.118 + jLayeredPane1.add(jTextFieldMPcmd, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.119 +
16.120 + jLabelMPcmd.setLabelFor(jLabelMPcmd);
16.121 + jLabelMPcmd.setText(bundle.getString("jLabelMPcmd")); // NOI18N
16.122 + jLabelMPcmd.setName("jLabelMPcmd"); // NOI18N
16.123 + jLabelMPcmd.setBounds(10, 90, 180, 17);
16.124 + jLayeredPane1.add(jLabelMPcmd, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.125 +
16.126 + jComboBoxLang.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "en_US", "ro_RO" }));
16.127 + jComboBoxLang.setName("jComboBoxLang"); // NOI18N
16.128 + jComboBoxLang.setBounds(200, 130, 90, 22);
16.129 + jLayeredPane1.add(jComboBoxLang, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.130 +
16.131 + jLabelLang.setLabelFor(jComboBoxLang);
16.132 + jLabelLang.setText(bundle.getString("jLabelLang")); // NOI18N
16.133 + jLabelLang.setName("jLabelLang"); // NOI18N
16.134 + jLabelLang.setBounds(10, 130, 121, 14);
16.135 + jLayeredPane1.add(jLabelLang, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.136 +
16.137 + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ro.xirincs.j2cirip.App.class).getContext().getActionMap(ConfigBox.class, this);
16.138 + jButtonSave.setAction(actionMap.get("SaveInfo")); // NOI18N
16.139 + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ro.xirincs.j2cirip.App.class).getContext().getResourceMap(ConfigBox.class);
16.140 + jButtonSave.setFont(resourceMap.getFont("jButtonSave.font")); // NOI18N
16.141 + jButtonSave.setText(bundle.getString("buttonSave")); // NOI18N
16.142 + jButtonSave.setName("jButtonSave"); // NOI18N
16.143 + jButtonSave.setBounds(390, 220, 100, 23);
16.144 + jLayeredPane1.add(jButtonSave, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.145 +
16.146 + jLabelRezultat.setLabelFor(jButtonSave);
16.147 + jLabelRezultat.setText(resourceMap.getString("jLabelRezultat.text")); // NOI18N
16.148 + jLabelRezultat.setName("jLabelRezultat"); // NOI18N
16.149 + jLabelRezultat.setBounds(240, 220, 100, 20);
16.150 + jLayeredPane1.add(jLabelRezultat, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.151 +
16.152 + closeButton.setAction(actionMap.get("closeConfigBox")); // NOI18N
16.153 + closeButton.setFont(resourceMap.getFont("closeButton.font")); // NOI18N
16.154 + closeButton.setText(bundle.getString("buttonClose")); // NOI18N
16.155 + closeButton.setName("closeButton"); // NOI18N
16.156 + closeButton.setBounds(390, 260, 100, 23);
16.157 + jLayeredPane1.add(closeButton, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.158 +
16.159 + checkboxShowDebug.setLabel(bundle.getString("labelShowDebug")); // NOI18N
16.160 + checkboxShowDebug.setName("checkboxShowDebug"); // NOI18N
16.161 + checkboxShowDebug.setBounds(10, 220, 230, 20);
16.162 + jLayeredPane1.add(checkboxShowDebug, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.163 +
16.164 + jButtonChooseMplayer.setFont(resourceMap.getFont("jButtonChooseMplayer.font")); // NOI18N
16.165 + jButtonChooseMplayer.setText(bundle.getString("jButtonChooseMplayer")); // NOI18N
16.166 + jButtonChooseMplayer.setName("jButtonChooseMplayer"); // NOI18N
16.167 + jButtonChooseMplayer.addActionListener(new java.awt.event.ActionListener() {
16.168 + public void actionPerformed(java.awt.event.ActionEvent evt) {
16.169 + jButtonChooseMplayerActionPerformed(evt);
16.170 + }
16.171 + });
16.172 + jButtonChooseMplayer.setBounds(410, 90, 80, 23);
16.173 + jLayeredPane1.add(jButtonChooseMplayer, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.174 +
16.175 + jLabelRegister.setText(bundle.getString("jLabelRegister")); // NOI18N
16.176 + jLabelRegister.setName("jLabelRegister"); // NOI18N
16.177 + jLabelRegister.addMouseListener(new java.awt.event.MouseAdapter() {
16.178 + public void mouseClicked(java.awt.event.MouseEvent evt) {
16.179 + jLabelRegisterMouseClicked(evt);
16.180 + }
16.181 + });
16.182 + jLabelRegister.setBounds(370, 10, 120, 14);
16.183 + jLayeredPane1.add(jLabelRegister, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.184 +
16.185 + jComboBoxLookFeel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Java", "System", "Nimbus", "Motif", "Ocean", "Windows", "WindowsClassic", "GTK", "SubstanceAutumn", "SubstanceBusiness", "SubstanceBusinessBlueSteel", "SubstanceBusinessBlackSteel", "SubstanceChallengerDeep", "SubstanceCreme", "SubstanceCremeCoffee", "SubstanceDust", "SubstanceDustCoffee", "SubstanceEmeraldDusk", "SubstanceMagma", "SubstanceMistAqua", "SubstanceMistSilver", " " }));
16.186 + jComboBoxLookFeel.setName("jComboBoxLookFeel"); // NOI18N
16.187 + jComboBoxLookFeel.setBounds(200, 170, 170, 22);
16.188 + jLayeredPane1.add(jComboBoxLookFeel, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.189 +
16.190 + jLabelLookFeel.setText(bundle.getString("jLabelLookFeel")); // NOI18N
16.191 + jLabelLookFeel.setName("jLabelLookFeel"); // NOI18N
16.192 + jLabelLookFeel.setBounds(10, 180, 170, 14);
16.193 + jLayeredPane1.add(jLabelLookFeel, javax.swing.JLayeredPane.DEFAULT_LAYER);
16.194 +
16.195 + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
16.196 + getContentPane().setLayout(layout);
16.197 + layout.setHorizontalGroup(
16.198 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
16.199 + .addGroup(layout.createSequentialGroup()
16.200 + .addContainerGap()
16.201 + .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 495, Short.MAX_VALUE)
16.202 + .addContainerGap())
16.203 + );
16.204 + layout.setVerticalGroup(
16.205 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
16.206 + .addGroup(layout.createSequentialGroup()
16.207 + .addContainerGap()
16.208 + .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)
16.209 + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
16.210 + );
16.211 +
16.212 + pack();
16.213 + }// </editor-fold>//GEN-END:initComponents
16.214 +
16.215 + private void jButtonChooseMplayerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonChooseMplayerActionPerformed
16.216 + JFileChooser fileChooser = new JFileChooser();
16.217 +
16.218 + // Show Open File dialog:
16.219 + int result = fileChooser.showOpenDialog(null);
16.220 + if (result == JFileChooser.APPROVE_OPTION &&
16.221 + fileChooser.getSelectedFile().getName().contains("mplayer")) {
16.222 + if (fileChooser.getSelectedFile() != null) // Only display if there is a valid URL
16.223 + {
16.224 + jTextFieldMPcmd.setText(fileChooser.getSelectedFile().getAbsolutePath());
16.225 +
16.226 + } // end inner if
16.227 + //App.getApplication().shutdown();
16.228 + //App.getApplication().startup();
16.229 + } // end outer if
16.230 + }//GEN-LAST:event_jButtonChooseMplayerActionPerformed
16.231 +
16.232 + private void jLabelRegisterMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabelRegisterMouseClicked
16.233 + try {
16.234 + Desktop.getDesktop().browse(new URI(bundle.getString("jLabelRegisterUrl")));
16.235 + } catch (Exception ex) {
16.236 + Logger.getLogger(AboutBox.class.getName()).log(Level.SEVERE, null, ex);
16.237 + }
16.238 + }//GEN-LAST:event_jLabelRegisterMouseClicked
16.239 +
16.240 + /**
16.241 + * @param args the command line arguments
16.242 + */
16.243 + @Action
16.244 + @SuppressWarnings("static-access")
16.245 + public void SaveInfo() {
16.246 + try {
16.247 +
16.248 + //save config
16.249 + props.setProperty("ciripUser", jTextFieldciripUser.getText());
16.250 + props.setProperty("ciripPassw", new String(jPasswordFieldciripPassw.getPassword()));
16.251 + props.setProperty("MPcmd", jTextFieldMPcmd.getText());
16.252 + props.setProperty("lang", (String) jComboBoxLang.getSelectedItem());
16.253 + props.setProperty("aspect", (String) jComboBoxLookFeel.getSelectedItem());
16.254 + props.setProperty("showDebug", "" + checkboxShowDebug.getState());
16.255 + props.store(new FileOutputStream(propFile), "Last action");
16.256 + jLabelRezultat.setText(bundle.getString("done"));
16.257 +
16.258 + App.getApplication().restart();
16.259 +
16.260 + } catch (Exception ex) {
16.261 + jLabelRezultat.setText(bundle.getString("error"));
16.262 + Logger.getLogger(ConfigBox.class.getName()).log(Level.SEVERE, null, ex);
16.263 + }
16.264 + }
16.265 +
16.266 + @Action
16.267 + public void closeConfigBox() {
16.268 + dispose();
16.269 + }
16.270 + // Variables declaration - do not modify//GEN-BEGIN:variables
16.271 + private java.awt.Checkbox checkboxShowDebug;
16.272 + private javax.swing.JButton closeButton;
16.273 + private javax.swing.JButton jButtonChooseMplayer;
16.274 + private javax.swing.JButton jButtonSave;
16.275 + private javax.swing.JComboBox jComboBoxLang;
16.276 + private javax.swing.JComboBox jComboBoxLookFeel;
16.277 + private javax.swing.JLabel jLabelLang;
16.278 + private javax.swing.JLabel jLabelLookFeel;
16.279 + private javax.swing.JLabel jLabelMPcmd;
16.280 + private javax.swing.JLabel jLabelRegister;
16.281 + private javax.swing.JLabel jLabelRezultat;
16.282 + private javax.swing.JLabel jLabelciripPassw;
16.283 + private javax.swing.JLabel jLabelciripUser;
16.284 + private javax.swing.JLayeredPane jLayeredPane1;
16.285 + private javax.swing.JPasswordField jPasswordFieldciripPassw;
16.286 + private javax.swing.JTextField jTextFieldMPcmd;
16.287 + private javax.swing.JTextField jTextFieldciripUser;
16.288 + // End of variables declaration//GEN-END:variables
16.289 + private ResourceBundle bundle = ResourceBundle.getBundle("ro/xirincs/j2cirip/resources/Bundle");
16.290 + private File propFile = new File("./config/Config.properties");
16.291 + private Properties props = new Properties();
16.292 +}
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/src/ro/xirincs/j2cirip/View.form Mon Jul 06 16:25:29 2009 +0300
17.3 @@ -0,0 +1,471 @@
17.4 +<?xml version="1.0" encoding="UTF-8" ?>
17.5 +
17.6 +<Form version="1.5" maxVersion="1.7">
17.7 + <NonVisualComponents>
17.8 + <Container class="javax.swing.JPanel" name="mainPanel">
17.9 + <Properties>
17.10 + <Property name="autoscrolls" type="boolean" value="true"/>
17.11 + <Property name="name" type="java.lang.String" value="mainPanel" noResource="true"/>
17.12 + </Properties>
17.13 +
17.14 + <Layout>
17.15 + <DimensionLayout dim="0">
17.16 + <Group type="103" groupAlignment="0" attributes="0">
17.17 + <Group type="102" alignment="0" attributes="0">
17.18 + <EmptySpace max="-2" attributes="0"/>
17.19 + <Component id="jSplitPaneMain" pref="604" max="32767" attributes="0"/>
17.20 + <EmptySpace max="-2" attributes="0"/>
17.21 + </Group>
17.22 + </Group>
17.23 + </DimensionLayout>
17.24 + <DimensionLayout dim="1">
17.25 + <Group type="103" groupAlignment="0" attributes="0">
17.26 + <Group type="102" alignment="0" attributes="0">
17.27 + <EmptySpace max="-2" attributes="0"/>
17.28 + <Component id="jSplitPaneMain" pref="386" max="32767" attributes="0"/>
17.29 + <EmptySpace max="-2" attributes="0"/>
17.30 + </Group>
17.31 + </Group>
17.32 + </DimensionLayout>
17.33 + </Layout>
17.34 + <SubComponents>
17.35 + <Container class="javax.swing.JSplitPane" name="jSplitPaneMain">
17.36 + <Properties>
17.37 + <Property name="dividerLocation" type="int" value="200"/>
17.38 + <Property name="orientation" type="int" value="0"/>
17.39 + <Property name="resizeWeight" type="double" value="1.0"/>
17.40 + <Property name="continuousLayout" type="boolean" value="true"/>
17.41 + <Property name="name" type="java.lang.String" value="jSplitPaneMain" noResource="true"/>
17.42 + <Property name="oneTouchExpandable" type="boolean" value="true"/>
17.43 + </Properties>
17.44 +
17.45 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
17.46 + <SubComponents>
17.47 + <Container class="javax.swing.JScrollPane" name="jScrollPanePublicTimeline">
17.48 + <Properties>
17.49 + <Property name="name" type="java.lang.String" value="jScrollPanePublicTimeline" noResource="true"/>
17.50 + </Properties>
17.51 + <AuxValues>
17.52 + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
17.53 + </AuxValues>
17.54 + <Constraints>
17.55 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
17.56 + <JSplitPaneConstraints position="top"/>
17.57 + </Constraint>
17.58 + </Constraints>
17.59 +
17.60 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
17.61 + <SubComponents>
17.62 + <Component class="javax.swing.JEditorPane" name="jEditorPanePublicTimeline">
17.63 + <Properties>
17.64 + <Property name="contentType" type="java.lang.String" resourceKey="jEditorPanePublicTimeline.contentType"/>
17.65 + <Property name="editable" type="boolean" value="false"/>
17.66 + <Property name="font" type="java.awt.Font" resourceKey="jEditorPanePublicTimeline.font"/>
17.67 + <Property name="name" type="java.lang.String" value="jEditorPanePublicTimeline" noResource="true"/>
17.68 + </Properties>
17.69 + <Events>
17.70 + <EventHandler event="hyperlinkUpdate" listener="javax.swing.event.HyperlinkListener" parameters="javax.swing.event.HyperlinkEvent" handler="jEditorPanePublicTimelineHyperlinkUpdate"/>
17.71 + </Events>
17.72 + </Component>
17.73 + </SubComponents>
17.74 + </Container>
17.75 + <Container class="javax.swing.JScrollPane" name="jScrollPaneBottom">
17.76 + <Properties>
17.77 + <Property name="name" type="java.lang.String" value="jScrollPaneBottom" noResource="true"/>
17.78 + </Properties>
17.79 + <Constraints>
17.80 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
17.81 + <JSplitPaneConstraints position="right"/>
17.82 + </Constraint>
17.83 + </Constraints>
17.84 +
17.85 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
17.86 + <SubComponents>
17.87 + <Container class="javax.swing.JLayeredPane" name="jLayeredPaneBottom">
17.88 + <Properties>
17.89 + <Property name="name" type="java.lang.String" value="jLayeredPaneBottom" noResource="true"/>
17.90 + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
17.91 + <Dimension value="[500, 150]"/>
17.92 + </Property>
17.93 + </Properties>
17.94 +
17.95 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout"/>
17.96 + <SubComponents>
17.97 + <Container class="javax.swing.JScrollPane" name="jScrollPaneResult">
17.98 + <Properties>
17.99 + <Property name="font" type="java.awt.Font" resourceKey="jScrollPaneResult.font"/>
17.100 + <Property name="name" type="java.lang.String" value="jScrollPaneResult" noResource="true"/>
17.101 + </Properties>
17.102 + <AuxValues>
17.103 + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
17.104 + </AuxValues>
17.105 + <Constraints>
17.106 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.107 + <JLayeredPaneConstraints x="10" y="40" width="368" height="90" layer="0" position="-1"/>
17.108 + </Constraint>
17.109 + </Constraints>
17.110 +
17.111 + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
17.112 + <SubComponents>
17.113 + <Component class="javax.swing.JTextArea" name="jTextAreaStatus">
17.114 + <Properties>
17.115 + <Property name="columns" type="int" value="20"/>
17.116 + <Property name="font" type="java.awt.Font" resourceKey="jTextAreaStatus.font"/>
17.117 + <Property name="lineWrap" type="boolean" value="true"/>
17.118 + <Property name="rows" type="int" value="4"/>
17.119 + <Property name="wrapStyleWord" type="boolean" value="true"/>
17.120 + <Property name="name" type="java.lang.String" value="jTextAreaStatus" noResource="true"/>
17.121 + </Properties>
17.122 + <Events>
17.123 + <EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jTextAreaStatusKeyPressed"/>
17.124 + <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jTextAreaStatusKeyPressed"/>
17.125 + <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="jTextAreaStatusKeyPressed"/>
17.126 + </Events>
17.127 + </Component>
17.128 + </SubComponents>
17.129 + </Container>
17.130 + <Component class="javax.swing.JButton" name="jButtonReplies">
17.131 + <Properties>
17.132 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
17.133 + <action class="ro.xirincs.j2cirip.View" id="GetReplies" methodName="GetReplies"/>
17.134 + </Property>
17.135 + <Property name="font" type="java.awt.Font" resourceKey="jButtonReplies.font"/>
17.136 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.137 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonReplies" replaceFormat="bundle.getString("{key}")"/>
17.138 + </Property>
17.139 + <Property name="name" type="java.lang.String" value="jButtonReplies" noResource="true"/>
17.140 + </Properties>
17.141 + <Constraints>
17.142 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.143 + <JLayeredPaneConstraints x="10" y="10" width="140" height="-1" layer="0" position="-1"/>
17.144 + </Constraint>
17.145 + </Constraints>
17.146 + </Component>
17.147 + <Component class="javax.swing.JButton" name="jButtonSetStatus">
17.148 + <Properties>
17.149 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
17.150 + <action class="ro.xirincs.j2cirip.View" id="SetUpdate" methodName="SetUpdate"/>
17.151 + </Property>
17.152 + <Property name="font" type="java.awt.Font" resourceKey="jButtonSetStatus.font"/>
17.153 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.154 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonSetStatus" replaceFormat="bundle.getString("{key}")"/>
17.155 + </Property>
17.156 + <Property name="name" type="java.lang.String" value="jButtonSetStatus" noResource="true"/>
17.157 + </Properties>
17.158 + <AuxValues>
17.159 + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
17.160 + </AuxValues>
17.161 + <Constraints>
17.162 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.163 + <JLayeredPaneConstraints x="280" y="10" width="100" height="-1" layer="0" position="-1"/>
17.164 + </Constraint>
17.165 + </Constraints>
17.166 + </Component>
17.167 + <Component class="javax.swing.JButton" name="jButtonClean">
17.168 + <Properties>
17.169 + <Property name="font" type="java.awt.Font" resourceKey="jButtonClean.font"/>
17.170 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.171 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonClean" replaceFormat="bundle.getString("{key}")"/>
17.172 + </Property>
17.173 + <Property name="name" type="java.lang.String" value="jButtonClean" noResource="true"/>
17.174 + </Properties>
17.175 + <Events>
17.176 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonCleanActionPerformed"/>
17.177 + </Events>
17.178 + <Constraints>
17.179 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.180 + <JLayeredPaneConstraints x="450" y="10" width="80" height="-1" layer="0" position="-1"/>
17.181 + </Constraint>
17.182 + </Constraints>
17.183 + </Component>
17.184 + <Component class="javax.swing.JToggleButton" name="jToggleButtonGetTimeline">
17.185 + <Properties>
17.186 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
17.187 + <action class="ro.xirincs.j2cirip.View" id="GetPublicTimeline" methodName="GetPublicTimeline"/>
17.188 + </Property>
17.189 + <Property name="font" type="java.awt.Font" resourceKey="jToggleButtonGetTimeline.font"/>
17.190 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.191 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonPublicTimeLine" replaceFormat="bundle.getString("{key}")"/>
17.192 + </Property>
17.193 + <Property name="name" type="java.lang.String" value="jToggleButtonGetTimeline" noResource="true"/>
17.194 + </Properties>
17.195 + <Events>
17.196 + <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jToggleButtonGetTimelineStateChanged"/>
17.197 + </Events>
17.198 + <Constraints>
17.199 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.200 + <JLayeredPaneConstraints x="170" y="10" width="90" height="-1" layer="0" position="-1"/>
17.201 + </Constraint>
17.202 + </Constraints>
17.203 + </Component>
17.204 + <Component class="javax.swing.JButton" name="jButtonMediaPlayer">
17.205 + <Properties>
17.206 + <Property name="font" type="java.awt.Font" resourceKey="jButtonMediaPlayer.font"/>
17.207 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.208 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="buttonPlayer" replaceFormat="bundle.getString("{key}")"/>
17.209 + </Property>
17.210 + <Property name="name" type="java.lang.String" value="jButtonMediaPlayer" noResource="true"/>
17.211 + </Properties>
17.212 + <Events>
17.213 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMediaPlayerActionPerformed"/>
17.214 + </Events>
17.215 + <Constraints>
17.216 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.217 + <JLayeredPaneConstraints x="390" y="50" width="140" height="-1" layer="0" position="-1"/>
17.218 + </Constraint>
17.219 + </Constraints>
17.220 + </Component>
17.221 + <Component class="javax.swing.JButton" name="jButtonMPvolUP">
17.222 + <Properties>
17.223 + <Property name="font" type="java.awt.Font" resourceKey="jButtonMPvolUP.font"/>
17.224 + <Property name="text" type="java.lang.String" resourceKey="jButtonMPvolUP.text"/>
17.225 + <Property name="name" type="java.lang.String" value="jButtonMPvolUP" noResource="true"/>
17.226 + </Properties>
17.227 + <Events>
17.228 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMPvolUPActionPerformed"/>
17.229 + </Events>
17.230 + <Constraints>
17.231 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.232 + <JLayeredPaneConstraints x="460" y="80" width="70" height="-1" layer="0" position="-1"/>
17.233 + </Constraint>
17.234 + </Constraints>
17.235 + </Component>
17.236 + <Component class="javax.swing.JButton" name="jButtonMPvolDown">
17.237 + <Properties>
17.238 + <Property name="font" type="java.awt.Font" resourceKey="jButtonMPvolDown.font"/>
17.239 + <Property name="text" type="java.lang.String" resourceKey="jButtonMPvolDown.text"/>
17.240 + <Property name="name" type="java.lang.String" value="jButtonMPvolDown" noResource="true"/>
17.241 + </Properties>
17.242 + <Events>
17.243 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMPvolDownActionPerformed"/>
17.244 + </Events>
17.245 + <Constraints>
17.246 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.247 + <JLayeredPaneConstraints x="390" y="80" width="70" height="-1" layer="0" position="-1"/>
17.248 + </Constraint>
17.249 + </Constraints>
17.250 + </Component>
17.251 + <Component class="javax.swing.JButton" name="jButtonMPstop">
17.252 + <Properties>
17.253 + <Property name="font" type="java.awt.Font" resourceKey="jButtonMPstop.font"/>
17.254 + <Property name="text" type="java.lang.String" resourceKey="jButtonMPstop.text"/>
17.255 + <Property name="name" type="java.lang.String" value="jButtonMPstop" noResource="true"/>
17.256 + </Properties>
17.257 + <Events>
17.258 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMPstopActionPerformed"/>
17.259 + </Events>
17.260 + <Constraints>
17.261 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.262 + <JLayeredPaneConstraints x="460" y="110" width="70" height="-1" layer="0" position="-1"/>
17.263 + </Constraint>
17.264 + </Constraints>
17.265 + </Component>
17.266 + <Component class="javax.swing.JToggleButton" name="jToggleMPpause">
17.267 + <Properties>
17.268 + <Property name="font" type="java.awt.Font" resourceKey="jToggleMPpause.font"/>
17.269 + <Property name="text" type="java.lang.String" resourceKey="jToggleMPpause.text"/>
17.270 + <Property name="name" type="java.lang.String" value="jToggleMPpause" noResource="true"/>
17.271 + </Properties>
17.272 + <Events>
17.273 + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jToggleMPpauseActionPerformed"/>
17.274 + </Events>
17.275 + <Constraints>
17.276 + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout$JLayeredPaneConstraintsDescription">
17.277 + <JLayeredPaneConstraints x="390" y="110" width="70" height="-1" layer="0" position="-1"/>
17.278 + </Constraint>
17.279 + </Constraints>
17.280 + </Component>
17.281 + </SubComponents>
17.282 + </Container>
17.283 + </SubComponents>
17.284 + </Container>
17.285 + </SubComponents>
17.286 + </Container>
17.287 + </SubComponents>
17.288 + </Container>
17.289 + <Container class="javax.swing.JMenuBar" name="menuBar">
17.290 + <Properties>
17.291 + <Property name="name" type="java.lang.String" value="menuBar" noResource="true"/>
17.292 + </Properties>
17.293 +
17.294 + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
17.295 + <Property name="useNullLayout" type="boolean" value="true"/>
17.296 + </Layout>
17.297 + <SubComponents>
17.298 + <Menu class="javax.swing.JMenu" name="fileMenu">
17.299 + <Properties>
17.300 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.301 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="fileMenu" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
17.302 + </Property>
17.303 + <Property name="name" type="java.lang.String" value="fileMenu" noResource="true"/>
17.304 + </Properties>
17.305 + <AuxValues>
17.306 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
17.307 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
17.308 + </AuxValues>
17.309 + <SubComponents>
17.310 + <MenuItem class="javax.swing.JMenuItem" name="jMenuItemConfig">
17.311 + <Properties>
17.312 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
17.313 + <action class="ro.xirincs.j2cirip.View" id="showConfigPanel" methodName="showConfigPanel"/>
17.314 + </Property>
17.315 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.316 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="menuItemConfig" replaceFormat="bundle.getString("{key}")"/>
17.317 + </Property>
17.318 + <Property name="name" type="java.lang.String" value="jMenuItemConfig" noResource="true"/>
17.319 + </Properties>
17.320 + </MenuItem>
17.321 + <MenuItem class="javax.swing.JMenuItem" name="jMenuItemExit">
17.322 + <Properties>
17.323 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
17.324 + <action class="org.jdesktop.application.Application" id="quit" methodName="quit"/>
17.325 + </Property>
17.326 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.327 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="menuItemExit" replaceFormat="bundle.getString("{key}")"/>
17.328 + </Property>
17.329 + <Property name="toolTipText" type="java.lang.String" resourceKey="jMenuItemExit.toolTipText"/>
17.330 + <Property name="name" type="java.lang.String" value="jMenuItemExit" noResource="true"/>
17.331 + </Properties>
17.332 + <AuxValues>
17.333 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
17.334 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
17.335 + </AuxValues>
17.336 + </MenuItem>
17.337 + </SubComponents>
17.338 + </Menu>
17.339 + <Menu class="javax.swing.JMenu" name="helpMenu">
17.340 + <Properties>
17.341 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.342 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="helpMenu" replaceFormat="bundle.getString("{key}")"/>
17.343 + </Property>
17.344 + <Property name="name" type="java.lang.String" value="helpMenu" noResource="true"/>
17.345 + </Properties>
17.346 + <AuxValues>
17.347 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
17.348 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
17.349 + </AuxValues>
17.350 + <SubComponents>
17.351 + <MenuItem class="javax.swing.JMenuItem" name="aboutMenuItem">
17.352 + <Properties>
17.353 + <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
17.354 + <action class="ro.xirincs.j2cirip.View" id="showAboutBox" methodName="showAboutBox"/>
17.355 + </Property>
17.356 + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
17.357 + <ResourceString bundle="ro/xirincs/j2cirip/resources/Bundle.properties" key="aboutMenuItem" replaceFormat="bundle.getString("{key}")"/>
17.358 + </Property>
17.359 + <Property name="name" type="java.lang.String" value="aboutMenuItem" noResource="true"/>
17.360 + </Properties>
17.361 + <AuxValues>
17.362 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
17.363 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
17.364 + </AuxValues>
17.365 + </MenuItem>
17.366 + </SubComponents>
17.367 + </Menu>
17.368 + </SubComponents>
17.369 + </Container>
17.370 + <Container class="javax.swing.JPanel" name="statusPanel">
17.371 + <Properties>
17.372 + <Property name="name" type="java.lang.String" value="statusPanel" noResource="true"/>
17.373 + </Properties>
17.374 +
17.375 + <Layout>
17.376 + <DimensionLayout dim="0">
17.377 + <Group type="103" groupAlignment="0" attributes="0">
17.378 + <Component id="statusPanelSeparator" alignment="0" pref="624" max="32767" attributes="0"/>
17.379 + <Group type="102" alignment="0" attributes="0">
17.380 + <EmptySpace max="-2" attributes="0"/>
17.381 + <Component id="statusMessageLabel" min="-2" max="-2" attributes="0"/>
17.382 + <EmptySpace pref="450" max="32767" attributes="0"/>
17.383 + <Component id="progressBar" min="-2" max="-2" attributes="0"/>
17.384 + <EmptySpace max="-2" attributes="0"/>
17.385 + <Component id="statusAnimationLabel" min="-2" max="-2" attributes="0"/>
17.386 + <EmptySpace max="-2" attributes="0"/>
17.387 + </Group>
17.388 + </Group>
17.389 + </DimensionLayout>
17.390 + <DimensionLayout dim="1">
17.391 + <Group type="103" groupAlignment="0" attributes="0">
17.392 + <Group type="102" alignment="0" attributes="0">
17.393 + <Component id="statusPanelSeparator" min="-2" pref="2" max="-2" attributes="0"/>
17.394 + <EmptySpace max="32767" attributes="0"/>
17.395 + <Group type="103" groupAlignment="3" attributes="0">
17.396 + <Component id="statusMessageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
17.397 + <Component id="statusAnimationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
17.398 + <Component id="progressBar" alignment="3" min="-2" max="-2" attributes="0"/>
17.399 + </Group>
17.400 + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
17.401 + </Group>
17.402 + </Group>
17.403 + </DimensionLayout>
17.404 + </Layout>
17.405 + <SubComponents>
17.406 + <Component class="javax.swing.JSeparator" name="statusPanelSeparator">
17.407 + <Properties>
17.408 + <Property name="name" type="java.lang.String" value="statusPanelSeparator" noResource="true"/>
17.409 + </Properties>
17.410 + <AuxValues>
17.411 + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
17.412 + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
17.413 + </AuxValues>
17.414 + </Component>
17.415 + <Component class="javax.swing.JLabel" name="statusMessageLabel">
17.416 + <Properties>
17.417 + <Property name="name" type="java.lang.String" value="statusMessageLabel" noResource="true"/>
17.418 + </Properties>
17.419 + </Component>
17.420 + <Component class="javax.swing.JLabel" name="statusAnimationLabel">
17.421 + <Properties>
17.422 + <Property name="horizontalAlignment" type="int" value="2"/>
17.423 + <Property name="name" type="java.lang.String" value="statusAnimationLabel" noResource="true"/>
17.424 + </Properties>
17.425 + </Component>
17.426 + <Component class="javax.swing.JProgressBar" name="progressBar">
17.427 + <Properties>
17.428 + <Property name="name" type="java.lang.String" value="progressBar" noResource="true"/>
17.429 + </Properties>
17.430 + </Component>
17.431 + </SubComponents>
17.432 + </Container>
17.433 + <Container class="javax.swing.JPopupMenu" name="jPopupMenu1">
17.434 + <Properties>
17.435 + <Property name="name" type="java.lang.String" value="jPopupMenu1" noResource="true"/>
17.436 + </Properties>
17.437 +
17.438 + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
17.439 + <Property name="useNullLayout" type="boolean" value="true"/>
17.440 + </Layout>
17.441 + <SubComponents>
17.442 + <MenuItem class="javax.swing.JMenuItem" name="jMenuItemMess">
17.443 + <Properties>
17.444 + <Property name="text" type="java.lang.String" resourceKey="jMenuItemMess.text"/>
17.445 + <Property name="name" type="java.lang.String" value="jMenuItemMess" noResource="true"/>
17.446 + </Properties>
17.447 + </MenuItem>
17.448 + </SubComponents>
17.449 + </Container>
17.450 + </NonVisualComponents>
17.451 + <Properties>
17.452 + <Property name="component" type="javax.swing.JComponent" editor="org.netbeans.modules.form.ComponentChooserEditor">
17.453 + <ComponentRef name="mainPanel"/>
17.454 + </Property>
17.455 + <Property name="menuBar" type="javax.swing.JMenuBar" editor="org.netbeans.modules.form.ComponentChooserEditor">
17.456 + <ComponentRef name="menuBar"/>
17.457 + </Property>
17.458 + <Property name="statusBar" type="javax.swing.JComponent" editor="org.netbeans.modules.form.ComponentChooserEditor">
17.459 + <ComponentRef name="statusPanel"/>
17.460 + </Property>
17.461 + </Properties>
17.462 + <AuxValues>
17.463 + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
17.464 + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
17.465 + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
17.466 + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
17.467 + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
17.468 + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
17.469 + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
17.470 + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
17.471 + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
17.472 + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-56,0,0,2,112"/>
17.473 + </AuxValues>
17.474 +</Form>
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/src/ro/xirincs/j2cirip/View.java Mon Jul 06 16:25:29 2009 +0300
18.3 @@ -0,0 +1,1217 @@
18.4 +/**####################################################################
18.5 + *# #
18.6 + *# j2Cirip v. 1.0 beta 1 #
18.7 + *# Created by Costel @ Xirincs.Info #
18.8 + *# #
18.9 + *# https://sourceforge.net/projects/j2cirip/ #
18.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
18.11 + *# #
18.12 + *####################################################################*/
18.13 +/**
18.14 + * View.java
18.15 + */
18.16 +package ro.xirincs.j2cirip;
18.17 +
18.18 +import java.awt.Desktop;
18.19 +import java.awt.MouseInfo;
18.20 +import ro.xirincs.j2cirip.utils.ciripApi;
18.21 +import ro.xirincs.j2cirip.utils.dataSort;
18.22 +import java.io.IOException;
18.23 +import java.util.ResourceBundle;
18.24 +import java.util.logging.Level;
18.25 +import java.util.logging.Logger;
18.26 +import javax.swing.text.AttributeSet;
18.27 +import javax.swing.text.BadLocationException;
18.28 +import org.jdesktop.application.Action;
18.29 +import org.jdesktop.application.ResourceMap;
18.30 +import org.jdesktop.application.SingleFrameApplication;
18.31 +import org.jdesktop.application.FrameView;
18.32 +import org.jdesktop.application.TaskMonitor;
18.33 +import java.awt.event.ActionEvent;
18.34 +import java.awt.event.ActionListener;
18.35 +import java.awt.event.KeyEvent;
18.36 +import java.io.File;
18.37 +import java.io.FileInputStream;
18.38 +import java.io.PrintWriter;
18.39 +import java.io.StringWriter;
18.40 +import java.net.URI;
18.41 +import java.net.URLDecoder;
18.42 +import java.text.SimpleDateFormat;
18.43 +import java.util.ArrayList;
18.44 +import java.util.Date;
18.45 +import java.util.Locale;
18.46 +import java.util.Map;
18.47 +import java.util.Properties;
18.48 +import java.util.regex.Pattern;
18.49 +import javax.swing.Timer;
18.50 +import javax.swing.Icon;
18.51 +import javax.swing.JDialog;
18.52 +import javax.swing.JFileChooser;
18.53 +import javax.swing.JFrame;
18.54 +import javax.swing.event.HyperlinkEvent;
18.55 +import javax.swing.text.ElementIterator;
18.56 +import javax.swing.text.StyleConstants;
18.57 +import javax.swing.text.html.HTML;
18.58 +import javax.swing.text.html.HTMLDocument;
18.59 +import org.jdesktop.application.Task;
18.60 +import org.w3c.dom.Document;
18.61 +import org.w3c.dom.Element;
18.62 +import org.w3c.dom.NodeList;
18.63 +import ro.xirincs.j2cirip.utils.MPlayer;
18.64 +
18.65 +/**
18.66 + * The application's main frame.
18.67 + */
18.68 +public class View extends FrameView {
18.69 +
18.70 + @SuppressWarnings("empty-statement")
18.71 + public View(SingleFrameApplication app) {
18.72 + super(app);
18.73 +
18.74 + initComponents();
18.75 +
18.76 + try {
18.77 + props.load(new FileInputStream(propFile));
18.78 + } catch (IOException ex) {
18.79 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.80 + }
18.81 +
18.82 + jButtonSetStatus.setMnemonic(KeyEvent.VK_ENTER);
18.83 + jButtonSetStatus.setEnabled(false);
18.84 +
18.85 + jEditorPanePublicTimeline.setText("<table width=\"100%\"><tr><td colspan=\"2\">" + bundle.getString("welcome") + "</td></tr></table>");
18.86 +
18.87 + if (props.getProperty("ciripUser") == null ||
18.88 + props.getProperty("ciripUser").trim().length() < 1 ||
18.89 + props.getProperty("ciripPassw") == null ||
18.90 + props.getProperty("ciripPassw").trim().length() < 1) {
18.91 + jButtonReplies.setEnabled(false);
18.92 + }
18.93 + jButtonSetStatus.setEnabled(false);
18.94 +
18.95 + if (props.getProperty("MPcmd") == null ||
18.96 + props.getProperty("MPcmd").trim().length() < 3) {
18.97 + jButtonMediaPlayer.setEnabled(false);
18.98 + jButtonMPvolDown.setEnabled(false);
18.99 + jButtonMPvolUP.setEnabled(false);
18.100 + jToggleMPpause.setEnabled(false);
18.101 + jButtonMPstop.setEnabled(false);
18.102 + }
18.103 +
18.104 + // status bar initialization - message timeout, idle icon and busy animation, etc
18.105 + ResourceMap resourceMap = getResourceMap();
18.106 + int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
18.107 + messageTimer = new Timer(messageTimeout, new ActionListener() {
18.108 +
18.109 + @Override
18.110 + public void actionPerformed(ActionEvent e) {
18.111 + statusMessageLabel.setText("");
18.112 + }
18.113 + });
18.114 + messageTimer.setRepeats(false);
18.115 + int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
18.116 + for (int i = 0; i < busyIcons.length; i++) {
18.117 + busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
18.118 + }
18.119 + busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
18.120 +
18.121 + @Override
18.122 + public void actionPerformed(ActionEvent e) {
18.123 + busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
18.124 + statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
18.125 + }
18.126 + });
18.127 + idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
18.128 + statusAnimationLabel.setIcon(idleIcon);
18.129 + progressBar.setVisible(false);
18.130 +
18.131 + // connecting action tasks to status bar via TaskMonitor
18.132 + TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
18.133 + taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
18.134 +
18.135 + @Override
18.136 + public void propertyChange(java.beans.PropertyChangeEvent evt) {
18.137 + if (evt.getPropertyName().equals("started")) {
18.138 + if (!busyIconTimer.isRunning()) {
18.139 + statusAnimationLabel.setIcon(busyIcons[0]);
18.140 + busyIconIndex = 0;
18.141 + busyIconTimer.start();
18.142 + }
18.143 + progressBar.setVisible(true);
18.144 + progressBar.setIndeterminate(true);
18.145 + } else if (evt.getPropertyName().equals("done")) {
18.146 + busyIconTimer.stop();
18.147 + statusAnimationLabel.setIcon(idleIcon);
18.148 + progressBar.setVisible(false);
18.149 + progressBar.setValue(0);
18.150 + } else if (evt.getPropertyName().equals("message")) {
18.151 + String text = (String) (evt.getNewValue());
18.152 + statusMessageLabel.setText((text == null) ? "" : text);
18.153 + messageTimer.restart();
18.154 + } else if (evt.getPropertyName().equals("progress")) {
18.155 + int value = (Integer) (evt.getNewValue());
18.156 + progressBar.setVisible(true);
18.157 + progressBar.setIndeterminate(false);
18.158 + progressBar.setValue(value);
18.159 + }
18.160 + }
18.161 + });
18.162 + }
18.163 +
18.164 + @Action
18.165 + public void showAboutBox() {
18.166 + if (aboutBox == null) {
18.167 + JFrame mainFrame = App.getApplication().getMainFrame();
18.168 + aboutBox = new AboutBox(mainFrame);
18.169 + aboutBox.setLocationRelativeTo(mainFrame);
18.170 + }
18.171 + App.getApplication().show(aboutBox);
18.172 + }
18.173 +
18.174 + @Action
18.175 + public void showConfigPanel() {
18.176 + if (configBox == null) {
18.177 + JFrame mainFrame = App.getApplication().getMainFrame();
18.178 + configBox = new ConfigBox(mainFrame);
18.179 + configBox.setLocationRelativeTo(mainFrame);
18.180 + //configBox.setAlwaysOnTop(true);
18.181 + }
18.182 + App.getApplication().show(configBox);
18.183 + }
18.184 +
18.185 + /** This method is called from within the constructor to
18.186 + * initialize the form.
18.187 + * WARNING: Do NOT modify this code. The content of this method is
18.188 + * always regenerated by the Form Editor.
18.189 + */
18.190 + @SuppressWarnings("unchecked")
18.191 + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
18.192 + private void initComponents() {
18.193 +
18.194 + mainPanel = new javax.swing.JPanel();
18.195 + jSplitPaneMain = new javax.swing.JSplitPane();
18.196 + jScrollPanePublicTimeline = new javax.swing.JScrollPane();
18.197 + jEditorPanePublicTimeline = new javax.swing.JEditorPane();
18.198 + jScrollPaneBottom = new javax.swing.JScrollPane();
18.199 + jLayeredPaneBottom = new javax.swing.JLayeredPane();
18.200 + jScrollPaneResult = new javax.swing.JScrollPane();
18.201 + jTextAreaStatus = new javax.swing.JTextArea();
18.202 + jButtonReplies = new javax.swing.JButton();
18.203 + jButtonSetStatus = new javax.swing.JButton();
18.204 + jButtonClean = new javax.swing.JButton();
18.205 + jToggleButtonGetTimeline = new javax.swing.JToggleButton();
18.206 + jButtonMediaPlayer = new javax.swing.JButton();
18.207 + jButtonMPvolUP = new javax.swing.JButton();
18.208 + jButtonMPvolDown = new javax.swing.JButton();
18.209 + jButtonMPstop = new javax.swing.JButton();
18.210 + jToggleMPpause = new javax.swing.JToggleButton();
18.211 + menuBar = new javax.swing.JMenuBar();
18.212 + javax.swing.JMenu fileMenu = new javax.swing.JMenu();
18.213 + jMenuItemConfig = new javax.swing.JMenuItem();
18.214 + javax.swing.JMenuItem jMenuItemExit = new javax.swing.JMenuItem();
18.215 + javax.swing.JMenu helpMenu = new javax.swing.JMenu();
18.216 + javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
18.217 + statusPanel = new javax.swing.JPanel();
18.218 + javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
18.219 + statusMessageLabel = new javax.swing.JLabel();
18.220 + statusAnimationLabel = new javax.swing.JLabel();
18.221 + progressBar = new javax.swing.JProgressBar();
18.222 + jPopupMenu1 = new javax.swing.JPopupMenu();
18.223 + jMenuItemMess = new javax.swing.JMenuItem();
18.224 +
18.225 + mainPanel.setAutoscrolls(true);
18.226 + mainPanel.setName("mainPanel"); // NOI18N
18.227 +
18.228 + jSplitPaneMain.setDividerLocation(200);
18.229 + jSplitPaneMain.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
18.230 + jSplitPaneMain.setResizeWeight(1.0);
18.231 + jSplitPaneMain.setContinuousLayout(true);
18.232 + jSplitPaneMain.setName("jSplitPaneMain"); // NOI18N
18.233 + jSplitPaneMain.setOneTouchExpandable(true);
18.234 +
18.235 + jScrollPanePublicTimeline.setName("jScrollPanePublicTimeline"); // NOI18N
18.236 +
18.237 + org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ro.xirincs.j2cirip.App.class).getContext().getResourceMap(View.class);
18.238 + jEditorPanePublicTimeline.setContentType(resourceMap.getString("jEditorPanePublicTimeline.contentType")); // NOI18N
18.239 + jEditorPanePublicTimeline.setEditable(false);
18.240 + jEditorPanePublicTimeline.setFont(resourceMap.getFont("jEditorPanePublicTimeline.font")); // NOI18N
18.241 + jEditorPanePublicTimeline.setName("jEditorPanePublicTimeline"); // NOI18N
18.242 + jEditorPanePublicTimeline.addHyperlinkListener(new javax.swing.event.HyperlinkListener() {
18.243 + public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) {
18.244 + jEditorPanePublicTimelineHyperlinkUpdate(evt);
18.245 + }
18.246 + });
18.247 + jScrollPanePublicTimeline.setViewportView(jEditorPanePublicTimeline);
18.248 +
18.249 + jSplitPaneMain.setTopComponent(jScrollPanePublicTimeline);
18.250 +
18.251 + jScrollPaneBottom.setName("jScrollPaneBottom"); // NOI18N
18.252 +
18.253 + jLayeredPaneBottom.setName("jLayeredPaneBottom"); // NOI18N
18.254 + jLayeredPaneBottom.setPreferredSize(new java.awt.Dimension(500, 150));
18.255 +
18.256 + jScrollPaneResult.setFont(resourceMap.getFont("jScrollPaneResult.font")); // NOI18N
18.257 + jScrollPaneResult.setName("jScrollPaneResult"); // NOI18N
18.258 +
18.259 + jTextAreaStatus.setColumns(20);
18.260 + jTextAreaStatus.setFont(resourceMap.getFont("jTextAreaStatus.font")); // NOI18N
18.261 + jTextAreaStatus.setLineWrap(true);
18.262 + jTextAreaStatus.setRows(4);
18.263 + jTextAreaStatus.setWrapStyleWord(true);
18.264 + jTextAreaStatus.setName("jTextAreaStatus"); // NOI18N
18.265 + jTextAreaStatus.addKeyListener(new java.awt.event.KeyAdapter() {
18.266 + public void keyPressed(java.awt.event.KeyEvent evt) {
18.267 + jTextAreaStatusKeyPressed(evt);
18.268 + }
18.269 + public void keyReleased(java.awt.event.KeyEvent evt) {
18.270 + jTextAreaStatusKeyPressed(evt);
18.271 + }
18.272 + public void keyTyped(java.awt.event.KeyEvent evt) {
18.273 + jTextAreaStatusKeyPressed(evt);
18.274 + }
18.275 + });
18.276 + jScrollPaneResult.setViewportView(jTextAreaStatus);
18.277 +
18.278 + jScrollPaneResult.setBounds(10, 40, 368, 90);
18.279 + jLayeredPaneBottom.add(jScrollPaneResult, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.280 +
18.281 + javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ro.xirincs.j2cirip.App.class).getContext().getActionMap(View.class, this);
18.282 + jButtonReplies.setAction(actionMap.get("GetReplies")); // NOI18N
18.283 + jButtonReplies.setFont(resourceMap.getFont("jButtonReplies.font")); // NOI18N
18.284 + jButtonReplies.setText(bundle.getString("buttonReplies")); // NOI18N
18.285 + jButtonReplies.setName("jButtonReplies"); // NOI18N
18.286 + jButtonReplies.setBounds(10, 10, 140, 23);
18.287 + jLayeredPaneBottom.add(jButtonReplies, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.288 +
18.289 + jButtonSetStatus.setAction(actionMap.get("SetUpdate")); // NOI18N
18.290 + jButtonSetStatus.setFont(resourceMap.getFont("jButtonSetStatus.font")); // NOI18N
18.291 + jButtonSetStatus.setText(bundle.getString("buttonSetStatus")); // NOI18N
18.292 + jButtonSetStatus.setName("jButtonSetStatus"); // NOI18N
18.293 + jButtonSetStatus.setBounds(280, 10, 100, 23);
18.294 + jLayeredPaneBottom.add(jButtonSetStatus, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.295 +
18.296 + jButtonClean.setFont(resourceMap.getFont("jButtonClean.font")); // NOI18N
18.297 + jButtonClean.setText(bundle.getString("buttonClean")); // NOI18N
18.298 + jButtonClean.setName("jButtonClean"); // NOI18N
18.299 + jButtonClean.addActionListener(new java.awt.event.ActionListener() {
18.300 + public void actionPerformed(java.awt.event.ActionEvent evt) {
18.301 + jButtonCleanActionPerformed(evt);
18.302 + }
18.303 + });
18.304 + jButtonClean.setBounds(450, 10, 80, 23);
18.305 + jLayeredPaneBottom.add(jButtonClean, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.306 +
18.307 + jToggleButtonGetTimeline.setAction(actionMap.get("GetPublicTimeline")); // NOI18N
18.308 + jToggleButtonGetTimeline.setFont(resourceMap.getFont("jToggleButtonGetTimeline.font")); // NOI18N
18.309 + jToggleButtonGetTimeline.setText(bundle.getString("buttonPublicTimeLine")); // NOI18N
18.310 + jToggleButtonGetTimeline.setName("jToggleButtonGetTimeline"); // NOI18N
18.311 + jToggleButtonGetTimeline.addChangeListener(new javax.swing.event.ChangeListener() {
18.312 + public void stateChanged(javax.swing.event.ChangeEvent evt) {
18.313 + jToggleButtonGetTimelineStateChanged(evt);
18.314 + }
18.315 + });
18.316 + jToggleButtonGetTimeline.setBounds(170, 10, 90, 23);
18.317 + jLayeredPaneBottom.add(jToggleButtonGetTimeline, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.318 +
18.319 + jButtonMediaPlayer.setFont(resourceMap.getFont("jButtonMediaPlayer.font")); // NOI18N
18.320 + jButtonMediaPlayer.setText(bundle.getString("buttonPlayer")); // NOI18N
18.321 + jButtonMediaPlayer.setName("jButtonMediaPlayer"); // NOI18N
18.322 + jButtonMediaPlayer.addActionListener(new java.awt.event.ActionListener() {
18.323 + public void actionPerformed(java.awt.event.ActionEvent evt) {
18.324 + jButtonMediaPlayerActionPerformed(evt);
18.325 + }
18.326 + });
18.327 + jButtonMediaPlayer.setBounds(390, 50, 140, 23);
18.328 + jLayeredPaneBottom.add(jButtonMediaPlayer, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.329 +
18.330 + jButtonMPvolUP.setFont(resourceMap.getFont("jButtonMPvolUP.font")); // NOI18N
18.331 + jButtonMPvolUP.setText(resourceMap.getString("jButtonMPvolUP.text")); // NOI18N
18.332 + jButtonMPvolUP.setName("jButtonMPvolUP"); // NOI18N
18.333 + jButtonMPvolUP.addActionListener(new java.awt.event.ActionListener() {
18.334 + public void actionPerformed(java.awt.event.ActionEvent evt) {
18.335 + jButtonMPvolUPActionPerformed(evt);
18.336 + }
18.337 + });
18.338 + jButtonMPvolUP.setBounds(460, 80, 70, 23);
18.339 + jLayeredPaneBottom.add(jButtonMPvolUP, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.340 +
18.341 + jButtonMPvolDown.setFont(resourceMap.getFont("jButtonMPvolDown.font")); // NOI18N
18.342 + jButtonMPvolDown.setText(resourceMap.getString("jButtonMPvolDown.text")); // NOI18N
18.343 + jButtonMPvolDown.setName("jButtonMPvolDown"); // NOI18N
18.344 + jButtonMPvolDown.addActionListener(new java.awt.event.ActionListener() {
18.345 + public void actionPerformed(java.awt.event.ActionEvent evt) {
18.346 + jButtonMPvolDownActionPerformed(evt);
18.347 + }
18.348 + });
18.349 + jButtonMPvolDown.setBounds(390, 80, 70, 23);
18.350 + jLayeredPaneBottom.add(jButtonMPvolDown, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.351 +
18.352 + jButtonMPstop.setFont(resourceMap.getFont("jButtonMPstop.font")); // NOI18N
18.353 + jButtonMPstop.setText(resourceMap.getString("jButtonMPstop.text")); // NOI18N
18.354 + jButtonMPstop.setName("jButtonMPstop"); // NOI18N
18.355 + jButtonMPstop.addActionListener(new java.awt.event.ActionListener() {
18.356 + public void actionPerformed(java.awt.event.ActionEvent evt) {
18.357 + jButtonMPstopActionPerformed(evt);
18.358 + }
18.359 + });
18.360 + jButtonMPstop.setBounds(460, 110, 70, 23);
18.361 + jLayeredPaneBottom.add(jButtonMPstop, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.362 +
18.363 + jToggleMPpause.setFont(resourceMap.getFont("jToggleMPpause.font")); // NOI18N
18.364 + jToggleMPpause.setText(resourceMap.getString("jToggleMPpause.text")); // NOI18N
18.365 + jToggleMPpause.setName("jToggleMPpause"); // NOI18N
18.366 + jToggleMPpause.addActionListener(new java.awt.event.ActionListener() {
18.367 + public void actionPerformed(java.awt.event.ActionEvent evt) {
18.368 + jToggleMPpauseActionPerformed(evt);
18.369 + }
18.370 + });
18.371 + jToggleMPpause.setBounds(390, 110, 70, 23);
18.372 + jLayeredPaneBottom.add(jToggleMPpause, javax.swing.JLayeredPane.DEFAULT_LAYER);
18.373 +
18.374 + jScrollPaneBottom.setViewportView(jLayeredPaneBottom);
18.375 +
18.376 + jSplitPaneMain.setRightComponent(jScrollPaneBottom);
18.377 +
18.378 + javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
18.379 + mainPanel.setLayout(mainPanelLayout);
18.380 + mainPanelLayout.setHorizontalGroup(
18.381 + mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
18.382 + .addGroup(mainPanelLayout.createSequentialGroup()
18.383 + .addContainerGap()
18.384 + .addComponent(jSplitPaneMain, javax.swing.GroupLayout.DEFAULT_SIZE, 604, Short.MAX_VALUE)
18.385 + .addContainerGap())
18.386 + );
18.387 + mainPanelLayout.setVerticalGroup(
18.388 + mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
18.389 + .addGroup(mainPanelLayout.createSequentialGroup()
18.390 + .addContainerGap()
18.391 + .addComponent(jSplitPaneMain, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
18.392 + .addContainerGap())
18.393 + );
18.394 +
18.395 + menuBar.setName("menuBar"); // NOI18N
18.396 +
18.397 + java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("ro/xirincs/j2cirip/resources/Bundle"); // NOI18N
18.398 + fileMenu.setText(bundle.getString("fileMenu")); // NOI18N
18.399 + fileMenu.setName("fileMenu"); // NOI18N
18.400 +
18.401 + jMenuItemConfig.setAction(actionMap.get("showConfigPanel")); // NOI18N
18.402 + jMenuItemConfig.setText(bundle.getString("menuItemConfig")); // NOI18N
18.403 + jMenuItemConfig.setName("jMenuItemConfig"); // NOI18N
18.404 + fileMenu.add(jMenuItemConfig);
18.405 +
18.406 + jMenuItemExit.setAction(actionMap.get("quit")); // NOI18N
18.407 + jMenuItemExit.setText(bundle.getString("menuItemExit")); // NOI18N
18.408 + jMenuItemExit.setToolTipText(resourceMap.getString("jMenuItemExit.toolTipText")); // NOI18N
18.409 + jMenuItemExit.setName("jMenuItemExit"); // NOI18N
18.410 + fileMenu.add(jMenuItemExit);
18.411 +
18.412 + menuBar.add(fileMenu);
18.413 +
18.414 + helpMenu.setText(bundle.getString("helpMenu")); // NOI18N
18.415 + helpMenu.setName("helpMenu"); // NOI18N
18.416 +
18.417 + aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
18.418 + aboutMenuItem.setText(bundle.getString("aboutMenuItem")); // NOI18N
18.419 + aboutMenuItem.setName("aboutMenuItem"); // NOI18N
18.420 + helpMenu.add(aboutMenuItem);
18.421 +
18.422 + menuBar.add(helpMenu);
18.423 +
18.424 + statusPanel.setName("statusPanel"); // NOI18N
18.425 +
18.426 + statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N
18.427 +
18.428 + statusMessageLabel.setName("statusMessageLabel"); // NOI18N
18.429 +
18.430 + statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
18.431 + statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N
18.432 +
18.433 + progressBar.setName("progressBar"); // NOI18N
18.434 +
18.435 + javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
18.436 + statusPanel.setLayout(statusPanelLayout);
18.437 + statusPanelLayout.setHorizontalGroup(
18.438 + statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
18.439 + .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 624, Short.MAX_VALUE)
18.440 + .addGroup(statusPanelLayout.createSequentialGroup()
18.441 + .addContainerGap()
18.442 + .addComponent(statusMessageLabel)
18.443 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 450, Short.MAX_VALUE)
18.444 + .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
18.445 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
18.446 + .addComponent(statusAnimationLabel)
18.447 + .addContainerGap())
18.448 + );
18.449 + statusPanelLayout.setVerticalGroup(
18.450 + statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
18.451 + .addGroup(statusPanelLayout.createSequentialGroup()
18.452 + .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
18.453 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
18.454 + .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
18.455 + .addComponent(statusMessageLabel)
18.456 + .addComponent(statusAnimationLabel)
18.457 + .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
18.458 + .addGap(3, 3, 3))
18.459 + );
18.460 +
18.461 + jPopupMenu1.setName("jPopupMenu1"); // NOI18N
18.462 +
18.463 + jMenuItemMess.setText(resourceMap.getString("jMenuItemMess.text")); // NOI18N
18.464 + jMenuItemMess.setName("jMenuItemMess"); // NOI18N
18.465 + jPopupMenu1.add(jMenuItemMess);
18.466 +
18.467 + setComponent(mainPanel);
18.468 + setMenuBar(menuBar);
18.469 + setStatusBar(statusPanel);
18.470 + }// </editor-fold>//GEN-END:initComponents
18.471 +
18.472 + private void jEditorPanePublicTimelineHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) {//GEN-FIRST:event_jEditorPanePublicTimelineHyperlinkUpdate
18.473 +
18.474 + String linkUrl = evt.getURL().toExternalForm();
18.475 +
18.476 + //mouse is over link
18.477 + if (evt.getEventType() == HyperlinkEvent.EventType.ENTERED) {
18.478 + if (linkUrl.toLowerCase().startsWith("http://replyto:")) {
18.479 + jMenuItemMess.setText(bundle.getString("urlmessClickReply"));
18.480 + } else if (linkUrl.toLowerCase().endsWith(".flv") ||
18.481 + linkUrl.toLowerCase().endsWith(".avi") ||
18.482 + linkUrl.toLowerCase().endsWith(".mpg") ||
18.483 + linkUrl.toLowerCase().endsWith(".mpeg") ||
18.484 + linkUrl.toLowerCase().endsWith(".mp4") ||
18.485 + linkUrl.toLowerCase().endsWith(".mp3")) {
18.486 + jMenuItemMess.setText(bundle.getString("urlmessClickMedia"));
18.487 + } else {
18.488 + jMenuItemMess.setText(bundle.getString("urlmessClickLink"));
18.489 + }
18.490 +
18.491 + jPopupMenu1.setLocation(MouseInfo.getPointerInfo().getLocation());
18.492 + jPopupMenu1.setVisible(true);
18.493 + } //mouse has left the link
18.494 + else if (evt.getEventType() == HyperlinkEvent.EventType.EXITED) {
18.495 + jPopupMenu1.setVisible(false);
18.496 + } //daca se da click pe link
18.497 + else if (evt.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
18.498 +
18.499 + if (linkUrl.toLowerCase().startsWith("http://replyto:")) {
18.500 + //daca se da click pe un nick
18.501 + jTextAreaStatus.append(" " + linkUrl.replace("http://replyto:", "") + " ");
18.502 +
18.503 + } else if (linkUrl.toLowerCase().contains(".swf") && linkUrl.toLowerCase().endsWith(".flv")) {
18.504 + //daca este fisier flv vizualizat cu flash
18.505 + //MPlayer jmPlayer = new MPlayer();
18.506 + try {
18.507 + linkUrl = Pattern.compile("http://\\S+swf\\S*(http://+\\S+)").
18.508 + matcher(URLDecoder.decode(linkUrl, "UTF-8")).replaceAll("$1");
18.509 +
18.510 + addElement("<tr><td colspan=\"2\"><font color=\"blue\">" +
18.511 + bundle.getString("openLinkMedia") + ":<br/>" + linkUrl + "</font><br/></br></td></tr>");
18.512 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.513 +
18.514 + jmPlayer.open(linkUrl);
18.515 +
18.516 + } catch (IOException ex) {
18.517 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.518 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.519 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.520 +
18.521 + //show debug
18.522 + if (Boolean.parseBoolean(props.getProperty("showDebug")) && ex.getMessage() != null) {
18.523 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.524 + ex.getMessage() + "</font><br/></br></td></tr>");
18.525 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.526 + }
18.527 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.528 + }
18.529 + } else if (linkUrl.toLowerCase().endsWith(".avi") ||
18.530 + linkUrl.toLowerCase().endsWith(".mpg") ||
18.531 + linkUrl.toLowerCase().endsWith(".mpeg") ||
18.532 + linkUrl.toLowerCase().endsWith(".mp4") ||
18.533 + linkUrl.toLowerCase().endsWith(".mp3")) {
18.534 + //daca este link media
18.535 + //MPlayer jmPlayer = new MPlayer();
18.536 + try {
18.537 + addElement("<tr><td colspan=\"2\"><font color=\"blue\">" +
18.538 + bundle.getString("openLinkMedia") + ":<br/>" + linkUrl + "</font><br/></br></td></tr>");
18.539 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.540 + jmPlayer.open(linkUrl);
18.541 +
18.542 + } catch (IOException ex) {
18.543 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.544 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.545 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.546 +
18.547 + //show debug
18.548 + if (Boolean.parseBoolean(props.getProperty("showDebug")) && ex.getMessage() != null) {
18.549 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.550 + ex.getMessage() + "</font><br/></br></td></tr>");
18.551 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.552 + }
18.553 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.554 + }
18.555 + } else {
18.556 + //se deschide in browser-ul default din sistem
18.557 + try {
18.558 + addElement("<tr><td colspan=\"2\"><font color=\"blue\">" +
18.559 + bundle.getString("openLinkBrowser") + ":<br/>" + linkUrl + "</font><br/></br></td></tr>");
18.560 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.561 +
18.562 + Desktop.getDesktop().browse(new URI(linkUrl));
18.563 + } catch (Exception ex) {
18.564 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.565 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.566 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.567 +
18.568 + //show debug
18.569 + if (Boolean.parseBoolean(props.getProperty("showDebug")) && ex.getMessage() != null) {
18.570 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.571 + ex.getMessage() + "</font><br/></br></td></tr>");
18.572 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.573 + }
18.574 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.575 + }
18.576 + }
18.577 + }
18.578 +}//GEN-LAST:event_jEditorPanePublicTimelineHyperlinkUpdate
18.579 +
18.580 + @SuppressWarnings("static-access")
18.581 + private void jButtonMediaPlayerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMediaPlayerActionPerformed
18.582 +
18.583 + JFileChooser fileChooser = new JFileChooser();
18.584 + // Show Open File dialog:
18.585 + int result = fileChooser.showOpenDialog(null);
18.586 + if (result == JFileChooser.APPROVE_OPTION) // User chose a file
18.587 + {
18.588 + File file = fileChooser.getSelectedFile();
18.589 +
18.590 +
18.591 + if (file != null) // Only display if there is a valid URL
18.592 + {
18.593 +
18.594 + try {
18.595 + jmPlayer.close();
18.596 + jmPlayer.open(file.getAbsolutePath());
18.597 + } catch (IOException ex) {
18.598 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.599 + }
18.600 +
18.601 + } // end inner if
18.602 +
18.603 + } // end outer if
18.604 +
18.605 +
18.606 + }//GEN-LAST:event_jButtonMediaPlayerActionPerformed
18.607 +
18.608 + private void jButtonMPvolUPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMPvolUPActionPerformed
18.609 + jmPlayer.setVolume(jmPlayer.getVolume() + 10);
18.610 + }//GEN-LAST:event_jButtonMPvolUPActionPerformed
18.611 +
18.612 + private void jButtonMPvolDownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMPvolDownActionPerformed
18.613 + jmPlayer.setVolume(jmPlayer.getVolume() - 10);
18.614 + }//GEN-LAST:event_jButtonMPvolDownActionPerformed
18.615 +
18.616 + private void jButtonMPstopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMPstopActionPerformed
18.617 + jmPlayer.close();
18.618 + }//GEN-LAST:event_jButtonMPstopActionPerformed
18.619 +
18.620 + private void jToggleMPpauseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleMPpauseActionPerformed
18.621 + jmPlayer.togglePlay();
18.622 + }//GEN-LAST:event_jToggleMPpauseActionPerformed
18.623 +
18.624 + private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCleanActionPerformed
18.625 + ultimaData = null;
18.626 + jEditorPanePublicTimeline.setText("<table width=\"100%\"><tr><td colspan=\"2\"></td></tr></table>");
18.627 + System.gc();
18.628 + }//GEN-LAST:event_jButtonCleanActionPerformed
18.629 +
18.630 + private void jTextAreaStatusKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextAreaStatusKeyPressed
18.631 + jButtonSetStatus.setText(jTextAreaStatus.getText().trim().length() + "");
18.632 + if (jTextAreaStatus.getText().trim().length() >= 5) {
18.633 + jButtonSetStatus.setEnabled(true);
18.634 + } else {
18.635 + jButtonSetStatus.setEnabled(false);
18.636 + }
18.637 +}//GEN-LAST:event_jTextAreaStatusKeyPressed
18.638 +
18.639 + private void jToggleButtonGetTimelineStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jToggleButtonGetTimelineStateChanged
18.640 + if (jToggleButtonGetTimeline.isSelected() == false) {
18.641 + if (gptlt != null) {
18.642 + gptlt.cancelled();
18.643 + gptlt = null;
18.644 + }
18.645 + }
18.646 +
18.647 + }//GEN-LAST:event_jToggleButtonGetTimelineStateChanged
18.648 +
18.649 + @Action
18.650 + public Task SetUpdate() {
18.651 + return new SetUpdateTask(getApplication());
18.652 + }
18.653 +
18.654 + private class SetUpdateTask extends Task {
18.655 +
18.656 + SetUpdateTask(org.jdesktop.application.Application app) {
18.657 + super(app);
18.658 + }
18.659 +
18.660 + @Override
18.661 + protected Void doInBackground() {
18.662 +
18.663 + try {
18.664 + setMessage(bundle.getString("initializare"));
18.665 + setProgress(0, 0, 3);
18.666 + Thread.sleep(1000);
18.667 +
18.668 + setMessage(bundle.getString("stepSetStatus"));
18.669 +
18.670 + dom = cip.setUpdate(jTextAreaStatus.getText().trim(), props.getProperty("ciripUser"),
18.671 + props.getProperty("ciripPassw"));
18.672 + setProgress(1, 0, 3);
18.673 + Thread.sleep(1000);
18.674 +
18.675 + setMessage(bundle.getString("stepShow"));
18.676 + docEle = dom.getDocumentElement();
18.677 +
18.678 + addElement("<tr><td><font color=\"blue\">" +
18.679 + docEle.getFirstChild().getNodeValue() + "</font><br/></br></td></tr>");
18.680 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.681 +
18.682 + setProgress(2, 0, 3);
18.683 + Thread.sleep(1000);
18.684 +
18.685 + setProgress(3, 0, 3);
18.686 + Thread.sleep(1000);
18.687 +
18.688 + //
18.689 + //clean text area
18.690 + jTextAreaStatus.setText("");
18.691 +
18.692 + //get public timeline
18.693 + ds = new dataSort();
18.694 +
18.695 + try {
18.696 + setMessage(bundle.getString("initializare"));
18.697 + setProgress(0, 0, 3);
18.698 + Thread.sleep(1000);
18.699 +
18.700 + setMessage(bundle.getString("stepGetPublicTimeline"));
18.701 + dom = cip.getPublicTimeline();
18.702 + setProgress(1, 0, 3);
18.703 + Thread.sleep(1000);
18.704 +
18.705 + setMessage(bundle.getString("stepParsing"));
18.706 + docEle = dom.getDocumentElement();
18.707 + nl = docEle.getElementsByTagName("status");
18.708 + setProgress(2, 0, 3);
18.709 + Thread.sleep(1000);
18.710 +
18.711 + setMessage(bundle.getString("stepShow"));
18.712 +
18.713 + if (nl != null && nl.getLength() > 0) {
18.714 + for (int i = 0; i < nl.getLength(); i++) {
18.715 +
18.716 + el = (Element) nl.item(i);
18.717 +
18.718 + sdf = new SimpleDateFormat("EEE MMM d HH:mm:ss Z yyyy",
18.719 + Locale.ENGLISH);
18.720 + data = sdf.parse(getTextValue(el, "created_at"));
18.721 +
18.722 + if (props.getProperty("lang").contentEquals("ro_RO")) {
18.723 + sdfLocal = new SimpleDateFormat("EEEE, d MMMM yyyy 'ora' HH:mm:ss",
18.724 + new Locale(System.getProperty("user.language")));
18.725 + } else {
18.726 + sdfLocal = new SimpleDateFormat("EEE, MMM d HH:mm:ss yyyy",
18.727 + new Locale(System.getProperty("user.language")));
18.728 + }
18.729 +
18.730 + diff = new Date().getTime() - data.getTime();
18.731 +
18.732 + if (props.getProperty("ciripUser") != null &&
18.733 + props.getProperty("ciripUser").trim().length() > 1 &&
18.734 + getTextValue(el, "text").toLowerCase().contains("@" +
18.735 + props.getProperty("ciripUser").toLowerCase())) {
18.736 + bgColorMe = "#CCCCCC";
18.737 + } else {
18.738 + bgColorMe = "##FFFFFF";
18.739 + }
18.740 + textUrl = Pattern.compile("\\b(http://+)(\\S*)\\b").matcher(getTextValue(el, "text")).
18.741 + replaceAll("<a href=\"$1$2\">$2</a>");
18.742 +
18.743 + strg = "<tr><td bgcolor=\"" + bgColorMe + "\"><a href=\"http://www.cirip.ro/u/" + getTextValue(el, "username") +
18.744 + "\"><img src=\"" + getTextValue(el, "profile_image_url") +
18.745 + "\" border=\"0\" alt=\"test\"></a></td>";
18.746 +
18.747 + strg += "<td bgcolor=\"" + bgColorMe + "\"><a href=\"http://replyto:@" + getTextValue(el, "username") +
18.748 + "\">" + getTextValue(el, "username") + "</a>:<br/>" + textUrl + "<br/>" +
18.749 + sdfLocal.format(data) + " (" + diff / (1000 * 60) +
18.750 + " " + bundle.getString("minAgo") + ")" +
18.751 + "<br/><br/></td></tr>";
18.752 +
18.753 + ds.setInfo(data, new String(strg));
18.754 +
18.755 + }
18.756 + }
18.757 +
18.758 + ///
18.759 + entries = ds.getInfo();
18.760 +
18.761 + for (int i = 0; i < entries.size(); i++) {
18.762 +
18.763 + if (ultimaData == null || entries.get(i).getKey().after(ultimaData)) {
18.764 + ultimaData = entries.get(i).getKey();
18.765 + addElement(entries.get(i).getValue());
18.766 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.767 + Thread.sleep(1000);
18.768 + }
18.769 +
18.770 + }
18.771 +
18.772 + setProgress(3, 0, 3);
18.773 + Thread.sleep(1000);
18.774 +
18.775 + } catch (Exception ignore) {
18.776 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.777 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.778 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.779 +
18.780 + if (Boolean.parseBoolean(props.getProperty("showDebug"))) {
18.781 + sw = new StringWriter();
18.782 + ignore.printStackTrace(new PrintWriter(sw));
18.783 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.784 + sw.toString() + "</font><br/></br></td></tr>");
18.785 +
18.786 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.787 + }
18.788 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ignore);
18.789 + }
18.790 +
18.791 +
18.792 + ///
18.793 +
18.794 + } catch (Exception ignore) {
18.795 + addElement("<tr><td><font color=\"red\">" +
18.796 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.797 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.798 +
18.799 + if (Boolean.parseBoolean(props.getProperty("showDebug"))) {
18.800 + sw = new StringWriter();
18.801 + ignore.printStackTrace(new PrintWriter(sw));
18.802 + addElement("<tr><td colspan = \"2\"><font color=\"red\">" +
18.803 + sw.toString() + "</font><br/></br></td></tr>");
18.804 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.805 + }
18.806 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ignore);
18.807 +
18.808 + }
18.809 + return null;
18.810 + }
18.811 +
18.812 + @Override
18.813 + protected void finished() {
18.814 + setMessage(bundle.getString("finished"));
18.815 + }
18.816 +
18.817 + @Override
18.818 + protected void succeeded(Object result) {
18.819 + setMessage(bundle.getString("done"));
18.820 + }
18.821 + }
18.822 +
18.823 + @Action
18.824 + public Task GetReplies() {
18.825 + return new GetRepliesTask(getApplication());
18.826 + }
18.827 +
18.828 + private class GetRepliesTask extends Task {
18.829 +
18.830 + GetRepliesTask(org.jdesktop.application.Application app) {
18.831 +
18.832 + super(app);
18.833 + }
18.834 +
18.835 + @Override
18.836 + protected Void doInBackground() {
18.837 +
18.838 + try {
18.839 + setMessage(bundle.getString("initializare"));
18.840 + setProgress(0, 0, 3);
18.841 + Thread.sleep(1000);
18.842 +
18.843 + setMessage(bundle.getString("stepGetReplies"));
18.844 + dom = cip.getReplies(props.getProperty("ciripUser"), props.getProperty("ciripPassw"));
18.845 + setProgress(1, 0, 3);
18.846 + Thread.sleep(1000);
18.847 +
18.848 + setMessage(bundle.getString("stepParsing"));
18.849 + Element docEle = dom.getDocumentElement();
18.850 + NodeList nl = docEle.getElementsByTagName("status");
18.851 + setProgress(2, 0, 3);
18.852 + Thread.sleep(1000);
18.853 +
18.854 + setMessage(bundle.getString("stepShow") + " " + nl.getLength());
18.855 +
18.856 + dataSort ds = new dataSort();
18.857 +
18.858 + if (nl != null && nl.getLength() > 0) {
18.859 + for (int i = 0; i < nl.getLength(); i++) {
18.860 +
18.861 + Element el = (Element) nl.item(i);
18.862 +
18.863 + sdf = new SimpleDateFormat("EEE MMM d HH:mm:ss Z yyyy",
18.864 + Locale.ENGLISH);
18.865 + data = sdf.parse(getTextValue(el, "created_at"));
18.866 +
18.867 + if (props.getProperty("lang").contentEquals("ro_RO")) {
18.868 + sdfLocal = new SimpleDateFormat("EEEE, d MMMM yyyy 'ora' HH:mm:ss",
18.869 + new Locale(System.getProperty("user.language")));
18.870 + } else {
18.871 + sdfLocal = new SimpleDateFormat("EEE, MMM d HH:mm:ss yyyy",
18.872 + new Locale(System.getProperty("user.language")));
18.873 + }
18.874 +
18.875 + long diff = new Date().getTime() - data.getTime();
18.876 +
18.877 + if (props.getProperty("ciripUser") != null &&
18.878 + props.getProperty("ciripUser").trim().length() > 1 &&
18.879 + getTextValue(el, "text").toLowerCase().contains("@" +
18.880 + props.getProperty("ciripUser").toLowerCase())) {
18.881 + bgColorMe = "#CCCCCC";
18.882 + } else {
18.883 + bgColorMe = "##FFFFFF";
18.884 + }
18.885 + textUrl = Pattern.compile("\\b(http://+)(\\S*)\\b").matcher(getTextValue(el, "text")).
18.886 + replaceAll("<a href=\"$1$2\">$2</a>");
18.887 +
18.888 + strg = "<tr><td bgcolor=\"" + bgColorMe + "\"><a href=\"http://www.cirip.ro/u/" + getTextValue(el, "username") +
18.889 + "\"><img src=\"" + getTextValue(el, "profile_image_url") +
18.890 + "\" border=\"0\" alt=\"test\"></a></td>";
18.891 +
18.892 + strg += "<td bgcolor=\"" + bgColorMe + "\"><a href=\"http://replyto:@" + getTextValue(el, "username") +
18.893 + "\">" + getTextValue(el, "username") + "</a>:<br/>" + textUrl + "<br/>" +
18.894 + sdfLocal.format(data) + " (" + diff / (1000 * 60) +
18.895 + " " + bundle.getString("minAgo") + ")" +
18.896 + "<br/><br/></td></tr>";
18.897 +
18.898 + ds.setInfo(data, new String(strg));
18.899 +
18.900 + }
18.901 + }
18.902 +
18.903 + entries = ds.getInfo();
18.904 +
18.905 + for (int i = 0; i < entries.size(); i++) {
18.906 + addElement(entries.get(i).getValue());
18.907 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.908 + Thread.sleep(1000);
18.909 +
18.910 + }
18.911 +
18.912 + setProgress(3, 0, 3);
18.913 + Thread.sleep(1000);
18.914 +
18.915 + } catch (Exception ignore) {
18.916 + addElement("<tr><td><font color=\"red\">" +
18.917 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.918 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.919 +
18.920 + if (Boolean.parseBoolean(props.getProperty("showDebug"))) {
18.921 + sw = new StringWriter();
18.922 + ignore.printStackTrace(new PrintWriter(sw));
18.923 + addElement("<tr><td><font color=\"red\">" +
18.924 + sw.toString() + "</font><br/></br></td></tr>");
18.925 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.926 + }
18.927 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ignore);
18.928 + }
18.929 + return null;
18.930 + }
18.931 +
18.932 + @Override
18.933 + protected void finished() {
18.934 + setMessage(bundle.getString("finished"));
18.935 + }
18.936 +
18.937 + @Override
18.938 + protected void succeeded(Object result) {
18.939 + setMessage(bundle.getString("done"));
18.940 + }
18.941 + }
18.942 +
18.943 + @Action
18.944 + public Task GetPublicTimeline() {
18.945 + gptlt = new GetPublicTimelineTask(getApplication());
18.946 + return gptlt;
18.947 + }
18.948 +
18.949 + private class GetPublicTimelineTask extends Task {
18.950 +
18.951 + GetPublicTimelineTask(org.jdesktop.application.Application app) {
18.952 + // Runs on the EDT. Copy GUI state that
18.953 + // doInBackground() depends on from parameters
18.954 + // to GetPublicTimelineTask fields, here.
18.955 + super(app);
18.956 + }
18.957 +
18.958 + @Override
18.959 + protected Void doInBackground() {
18.960 +
18.961 + while (jToggleButtonGetTimeline.isSelected()) {
18.962 +
18.963 + ds = new dataSort();
18.964 +
18.965 + try {
18.966 + setMessage(bundle.getString("initializare"));
18.967 + setProgress(0, 0, 3);
18.968 + Thread.sleep(1000);
18.969 +
18.970 + setMessage(bundle.getString("stepGetPublicTimeline"));
18.971 + dom = cip.getPublicTimeline();
18.972 + setProgress(1, 0, 3);
18.973 + Thread.sleep(1000);
18.974 +
18.975 + setMessage(bundle.getString("stepParsing"));
18.976 + docEle = dom.getDocumentElement();
18.977 + nl = docEle.getElementsByTagName("status");
18.978 + setProgress(2, 0, 3);
18.979 + Thread.sleep(1000);
18.980 +
18.981 + setMessage(bundle.getString("stepShow"));
18.982 +
18.983 + if (nl != null && nl.getLength() > 0) {
18.984 + for (int i = 0; i < nl.getLength(); i++) {
18.985 +
18.986 + el = (Element) nl.item(i);
18.987 +
18.988 + sdf = new SimpleDateFormat("EEE MMM d HH:mm:ss Z yyyy",
18.989 + Locale.ENGLISH);
18.990 + data = sdf.parse(getTextValue(el, "created_at"));
18.991 +
18.992 + if (props.getProperty("lang").contentEquals("ro_RO")) {
18.993 + sdfLocal = new SimpleDateFormat("EEEE, d MMMM yyyy 'ora' HH:mm:ss",
18.994 + new Locale(System.getProperty("user.language")));
18.995 + } else {
18.996 + sdfLocal = new SimpleDateFormat("EEE, MMM d HH:mm:ss yyyy",
18.997 + new Locale(System.getProperty("user.language")));
18.998 + }
18.999 +
18.1000 + diff = new Date().getTime() - data.getTime();
18.1001 +
18.1002 + if (props.getProperty("ciripUser") != null &&
18.1003 + props.getProperty("ciripUser").trim().length() > 1 &&
18.1004 + getTextValue(el, "text").toLowerCase().contains("@" +
18.1005 + props.getProperty("ciripUser").toLowerCase())) {
18.1006 + bgColorMe = "#CCCCCC";
18.1007 + } else {
18.1008 + bgColorMe = "##FFFFFF";
18.1009 + }
18.1010 + textUrl = Pattern.compile("\\b(http://+)(\\S*)\\b").matcher(getTextValue(el, "text")).
18.1011 + replaceAll("<a href=\"$1$2\">$2</a>");
18.1012 +
18.1013 + strg = "<tr><td bgcolor=\"" + bgColorMe + "\"><a href=\"http://www.cirip.ro/u/" + getTextValue(el, "username") +
18.1014 + "\"><img src=\"" + getTextValue(el, "profile_image_url") +
18.1015 + "\" border=\"0\" alt=\"test\"></a></td>";
18.1016 +
18.1017 + strg += "<td bgcolor=\"" + bgColorMe + "\"><a href=\"http://replyto:@" + getTextValue(el, "username") +
18.1018 + "\">" + getTextValue(el, "username") + "</a>:<br/>" + textUrl + "<br/>" +
18.1019 + sdfLocal.format(data) + " (" + diff / (1000 * 60) +
18.1020 + " " + bundle.getString("minAgo") + ")" +
18.1021 + "<br/><br/></td></tr>";
18.1022 +
18.1023 + ds.setInfo(data, new String(strg));
18.1024 +
18.1025 + }
18.1026 + }
18.1027 +
18.1028 + ///
18.1029 + entries = ds.getInfo();
18.1030 +
18.1031 + for (int i = 0; i < entries.size(); i++) {
18.1032 +
18.1033 + if (ultimaData == null || entries.get(i).getKey().after(ultimaData)) {
18.1034 + ultimaData = entries.get(i).getKey();
18.1035 + addElement(entries.get(i).getValue());
18.1036 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1037 + Thread.sleep(1000);
18.1038 + }
18.1039 +
18.1040 + }
18.1041 +
18.1042 + setProgress(3, 0, 3);
18.1043 + Thread.sleep(1000);
18.1044 +
18.1045 + } catch (InterruptedException ex) {
18.1046 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.1047 + bundle.getString("cancelled") + "</font><br/></br></td></tr>");
18.1048 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1049 +
18.1050 + if (Boolean.parseBoolean(props.getProperty("showDebug"))) {
18.1051 + sw = new StringWriter();
18.1052 + ex.printStackTrace(new PrintWriter(sw));
18.1053 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.1054 + sw.toString() + "</font><br/></br></td></tr>");
18.1055 +
18.1056 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1057 + }
18.1058 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.1059 +
18.1060 + } catch (Exception ignore) {
18.1061 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.1062 + bundle.getString("error") + "</font><br/></br></td></tr>");
18.1063 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1064 +
18.1065 + if (Boolean.parseBoolean(props.getProperty("showDebug"))) {
18.1066 + sw = new StringWriter();
18.1067 + ignore.printStackTrace(new PrintWriter(sw));
18.1068 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.1069 + sw.toString() + "</font><br/></br></td></tr>");
18.1070 +
18.1071 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1072 + }
18.1073 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ignore);
18.1074 + }
18.1075 + try {
18.1076 + Thread.sleep(waitRefresh);
18.1077 + } catch (InterruptedException ex) {
18.1078 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.1079 + bundle.getString("cancelled") + "</font><br/></br></td></tr>");
18.1080 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1081 +
18.1082 + if (Boolean.parseBoolean(props.getProperty("showDebug"))) {
18.1083 + sw = new StringWriter();
18.1084 + ex.printStackTrace(new PrintWriter(sw));
18.1085 + addElement("<tr><td colspan=\"2\"><font color=\"red\">" +
18.1086 + sw.toString() + "</font><br/></br></td></tr>");
18.1087 +
18.1088 + jEditorPanePublicTimeline.setCaretPosition(jEditorPanePublicTimeline.getDocument().getLength());
18.1089 + }
18.1090 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.1091 + }
18.1092 +
18.1093 + }
18.1094 + return null;
18.1095 + }
18.1096 +
18.1097 + @Override
18.1098 + protected void finished() {
18.1099 + setMessage(bundle.getString("finished"));
18.1100 +
18.1101 + }
18.1102 +
18.1103 + @Override
18.1104 + protected void succeeded(Object result) {
18.1105 + setMessage(bundle.getString("done"));
18.1106 + }
18.1107 +
18.1108 + @Override
18.1109 + protected void cancelled() {
18.1110 + super.cancel(true);
18.1111 + setMessage("cancelled!");
18.1112 + }
18.1113 + }
18.1114 +
18.1115 + private String getTextValue(Element ele, String tagName) {
18.1116 + String textVal = null;
18.1117 + NodeList nl1 = ele.getElementsByTagName(tagName);
18.1118 + if (nl1 != null && nl1.getLength() > 0) {
18.1119 + Element el1 = (Element) nl1.item(0);
18.1120 + textVal = el1.getFirstChild().getNodeValue();
18.1121 + }
18.1122 +
18.1123 + return textVal;
18.1124 + }
18.1125 +
18.1126 + public void addElement(String trChild) {
18.1127 + HTMLDocument doc = (HTMLDocument) jEditorPanePublicTimeline.getDocument();
18.1128 +
18.1129 + ElementIterator iterator = new ElementIterator(doc);
18.1130 + javax.swing.text.Element element;
18.1131 + while ((element = iterator.next()) != null) {
18.1132 + AttributeSet attributes = (AttributeSet) element.getAttributes();
18.1133 + Object name = attributes.getAttribute(StyleConstants.NameAttribute);
18.1134 +
18.1135 + if ((name instanceof HTML.Tag) && ((name == HTML.Tag.TABLE))) {
18.1136 + int count = element.getElementCount();
18.1137 + javax.swing.text.Element child = element.getElement(count - 1);
18.1138 + AttributeSet childAttributes = child.getAttributes();
18.1139 +
18.1140 + if (childAttributes.getAttribute(StyleConstants.NameAttribute) == HTML.Tag.TR) {
18.1141 + try {
18.1142 + doc.insertAfterEnd(child, trChild);
18.1143 + } catch (BadLocationException ex) {
18.1144 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.1145 + } catch (IOException ex) {
18.1146 + Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
18.1147 + }
18.1148 + }
18.1149 +
18.1150 + }
18.1151 + }
18.1152 + }
18.1153 +
18.1154 + public void closePlayer() {
18.1155 + jmPlayer.close();
18.1156 + }
18.1157 +
18.1158 + public void setStatusMessageLabel(String statusMess) {
18.1159 + statusMessageLabel.setText(statusMess);
18.1160 + }
18.1161 +
18.1162 + private void actionTimeline() {
18.1163 + }
18.1164 + // Variables declaration - do not modify//GEN-BEGIN:variables
18.1165 + private javax.swing.JButton jButtonClean;
18.1166 + private javax.swing.JButton jButtonMPstop;
18.1167 + private javax.swing.JButton jButtonMPvolDown;
18.1168 + private javax.swing.JButton jButtonMPvolUP;
18.1169 + private javax.swing.JButton jButtonMediaPlayer;
18.1170 + private javax.swing.JButton jButtonReplies;
18.1171 + private javax.swing.JButton jButtonSetStatus;
18.1172 + private javax.swing.JEditorPane jEditorPanePublicTimeline;
18.1173 + private javax.swing.JLayeredPane jLayeredPaneBottom;
18.1174 + private javax.swing.JMenuItem jMenuItemConfig;
18.1175 + private javax.swing.JMenuItem jMenuItemMess;
18.1176 + private javax.swing.JPopupMenu jPopupMenu1;
18.1177 + private javax.swing.JScrollPane jScrollPaneBottom;
18.1178 + private javax.swing.JScrollPane jScrollPanePublicTimeline;
18.1179 + private javax.swing.JScrollPane jScrollPaneResult;
18.1180 + private javax.swing.JSplitPane jSplitPaneMain;
18.1181 + private javax.swing.JTextArea jTextAreaStatus;
18.1182 + private javax.swing.JToggleButton jToggleButtonGetTimeline;
18.1183 + private javax.swing.JToggleButton jToggleMPpause;
18.1184 + private javax.swing.JPanel mainPanel;
18.1185 + private javax.swing.JMenuBar menuBar;
18.1186 + private javax.swing.JProgressBar progressBar;
18.1187 + private javax.swing.JLabel statusAnimationLabel;
18.1188 + private javax.swing.JLabel statusMessageLabel;
18.1189 + private javax.swing.JPanel statusPanel;
18.1190 + // End of variables declaration//GEN-END:variables
18.1191 + private final Timer messageTimer;
18.1192 + private final Timer busyIconTimer;
18.1193 + private final Icon idleIcon;
18.1194 + private final Icon[] busyIcons = new Icon[15];
18.1195 + private int busyIconIndex = 0;
18.1196 + private JDialog aboutBox;
18.1197 + private JDialog configBox;
18.1198 + private Document dom;
18.1199 + private static final ResourceBundle bundle = ResourceBundle.getBundle("ro/xirincs/j2cirip/resources/Bundle");
18.1200 + private static final File propFile = new File("./config/Config.properties");
18.1201 + private Properties props = new Properties();
18.1202 + private ciripApi cip = new ciripApi();
18.1203 + private Date ultimaData = null;
18.1204 + private MPlayer jmPlayer = new MPlayer();
18.1205 + private SimpleDateFormat sdf;
18.1206 + private SimpleDateFormat sdfLocal;
18.1207 + private Date data;
18.1208 + private String bgColorMe = "";
18.1209 + private int waitRefresh = 180000;
18.1210 + private ArrayList<Map.Entry<Date, String>> entries;
18.1211 + private Element docEle;
18.1212 + private NodeList nl;
18.1213 + private dataSort ds;
18.1214 + private Element el;
18.1215 + private String textUrl;
18.1216 + private String strg;
18.1217 + private long diff;
18.1218 + private StringWriter sw;
18.1219 + private GetPublicTimelineTask gptlt;
18.1220 +}
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/src/ro/xirincs/j2cirip/resources/AboutBox.properties Mon Jul 06 16:25:29 2009 +0300
19.3 @@ -0,0 +1,12 @@
19.4 +######################################################################
19.5 +# #
19.6 +# j2Cirip v. 1.0 beta 1 #
19.7 +# Created by Costel @ Xirincs.Info #
19.8 +# #
19.9 +# https://sourceforge.net/projects/j2cirip/ #
19.10 +# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
19.11 +# #
19.12 +######################################################################
19.13 +closeAboutBox.Action.text = &Close
19.14 +#NOI18N
19.15 +closeButton.font=Dialog-Plain-10
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/src/ro/xirincs/j2cirip/resources/App.properties Mon Jul 06 16:25:29 2009 +0300
20.3 @@ -0,0 +1,20 @@
20.4 +######################################################################
20.5 +# #
20.6 +# j2Cirip v. 1.0 beta 1 #
20.7 +# Created by Costel @ Xirincs.Info #
20.8 +# #
20.9 +# https://sourceforge.net/projects/j2cirip/ #
20.10 +# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
20.11 +# #
20.12 +######################################################################
20.13 +# Application global resources
20.14 +
20.15 +Application.name = j2cirip
20.16 +Application.title = J2Cirip
20.17 +Application.description = A simple java desktop application for cirip.ro
20.18 +Application.vendorId = Costel @ Xirincs.Ro
20.19 +Application.id = j2cirip
20.20 +Application.lookAndFeel = default
20.21 +quit.Action.accelerator=ctrl pressed Q
20.22 +quit.Action.shortDescription=Exit the application
20.23 +quit.Action.text=Exit
20.24 \ No newline at end of file
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/src/ro/xirincs/j2cirip/resources/Bundle.properties Mon Jul 06 16:25:29 2009 +0300
21.3 @@ -0,0 +1,74 @@
21.4 +######################################################################
21.5 +# #
21.6 +# j2Cirip v. 1.0 beta 1 #
21.7 +# Created by Costel @ Xirincs.Info #
21.8 +# #
21.9 +# https://sourceforge.net/projects/j2cirip/ #
21.10 +# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
21.11 +# #
21.12 +######################################################################
21.13 +
21.14 +#internationalization - English
21.15 +
21.16 +initializare=Initialization
21.17 +failed=Failed
21.18 +error=Error!
21.19 +cancelled=Cancelled!
21.20 +finished=Finished
21.21 +done=Done
21.22 +
21.23 +welcome=Welcome!
21.24 +
21.25 +buttonClean=Clean
21.26 +buttonReplies=My Replies
21.27 +buttonSetStatus=Cirip
21.28 +buttonPublicTimeLine=TimeLine
21.29 +buttonStop=Stop
21.30 +stepSetStatus=Send
21.31 +stepShow=Show
21.32 +stepGetReplies=Check for Replies
21.33 +stepParsing=Parsing
21.34 +stepGetPublicTimeline=Check public timeline
21.35 +menuItemConfig=Configuration
21.36 +menuItemExit=Exit
21.37 +aboutMenuItem=About
21.38 +fileMenu=File
21.39 +helpMenu=Help
21.40 +buttonPlayer=Play File
21.41 +buttonClose=Close
21.42 +buttonSave=Save
21.43 +minAgo=min ago
21.44 +urlmessClickLink=Click to open with default browser
21.45 +urlmessClickReply=Click for reply
21.46 +urlmessClickMedia=Click for play with MPlayer
21.47 +
21.48 +#AboutBox
21.49 +aboutTitle=About: j2Cirip 1.0.0 beta 1
21.50 +aboutDesc=A java desktop application for cirip.ro
21.51 +aboutVersion=1.0.0 beta 1
21.52 +aboutVersionLabel=Version
21.53 +aboutAutor=Costel @ Xirincs.Info
21.54 +aboutAutorLabel=Author
21.55 +aboutHomePage=HomePage
21.56 +aboutHomePageLabelUrl=<html><a href=\"https://sourceforge.net/projects/j2cirip/\"> \
21.57 + https://sourceforge.net/projects/j2cirip/</a>
21.58 +aboutHomePageUrl=https://sourceforge.net/projects/j2cirip/</a>
21.59 +aboutBlog=Blog
21.60 +aboutBlogLabelUrl=<html><a href=\"http://www.blogospheerix.com/blog/costel/category/j2Cirip\"> \
21.61 + http://www.blogospheerix.com/blog/costel/category/j2Cirip</a>
21.62 +aboutBlogUrl=http://www.blogospheerix.com/blog/costel/category/j2Cirip
21.63 +
21.64 +#ConfigBox
21.65 +configTitle=Configuration
21.66 +jLabelciripUser=Cirip Username
21.67 +jLabelciripPassw=Cirip Password
21.68 +jLabelMPcmd=MPlayer file
21.69 +jLabelLang=Language
21.70 +labelShowDebug=Show Debug Info
21.71 +jButtonChooseMplayer=Choose
21.72 +jLabelLookFeel=Look & Feel
21.73 +jLabelRegister=<html><a href=\"http://www.cirip.ro/cirip/inregistrare?lg=en\">Register</a>
21.74 +jLabelRegisterUrl=http://www.cirip.ro/cirip/inregistrare?lg=en
21.75 +openLinkMedia=Open with MPlayer
21.76 +openLinkBrowser=Open with default browser
21.77 +aboutHomePageBlog=Blog
21.78 \ No newline at end of file
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/src/ro/xirincs/j2cirip/resources/Bundle_ro_ro.properties Mon Jul 06 16:25:29 2009 +0300
22.3 @@ -0,0 +1,74 @@
22.4 +######################################################################
22.5 +# #
22.6 +# j2Cirip v. 1.0 beta 1 #
22.7 +# Created by Costel @ Xirincs.Info #
22.8 +# #
22.9 +# https://sourceforge.net/projects/j2cirip/ #
22.10 +# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
22.11 +# #
22.12 +######################################################################
22.13 +
22.14 +#internationalization - Romanian
22.15 +
22.16 +initializare=Initializare
22.17 +failed=Esuare
22.18 +error=Eroare!
22.19 +cancelled=Abandonat!
22.20 +finished=Terminare
22.21 +done=Gata
22.22 +
22.23 +welcome=Bine ai venit!
22.24 +
22.25 +buttonClean=Cur\u0103\u0163are
22.26 +buttonReplies=R\u0103spunsurile mele
22.27 +buttonSetStatus=Cirip
22.28 +buttonPublicTimeLine=TimeLine
22.29 +buttonStop=Stop
22.30 +stepSetStatus=Trimite
22.31 +stepShow=Arata
22.32 +stepGetReplies=Caut\u0103 r\u0103spunsurile
22.33 +stepParsing=Extrage datele
22.34 +stepGetPublicTimeline=Caut\u0103 mesajele publice
22.35 +menuItemConfig=Configurare
22.36 +menuItemExit=Ie\u015Fire
22.37 +aboutMenuItem=Despre
22.38 +fileMenu=Fi\u015Fier
22.39 +helpMenu=Ajutor
22.40 +buttonPlayer=Play Fi\u015Fier
22.41 +buttonClose=\u00CEnchidere
22.42 +buttonSave=Salvare
22.43 +minAgo=min \u00EEn urm\u0103
22.44 +urlmessClickLink=Click pentru a deschide link-ul \u00EEn browsers
22.45 +urlmessClickReply=Click pentru a-i r\u0103spunde
22.46 +urlmessClickMedia=Click pentru a asculta cu MPlayer
22.47 +
22.48 +#AboutBox
22.49 +aboutTitle=Despre: j2Cirip 1.0 beta 1
22.50 +aboutDesc=Aplicatie java, client pentru cirip.ro
22.51 +aboutVersion=1.0 beta 1
22.52 +aboutVersionLabel=Versiune
22.53 +aboutAutor=Costel @ Xirincs.Ro
22.54 +aboutAutorLabel=Autor
22.55 +aboutHomePage=HomePage
22.56 +aboutHomePageLabelUrl=<html><a href=\"https://sourceforge.net/projects/j2cirip/\"> \
22.57 + https://sourceforge.net/projects/j2cirip/</a>
22.58 +aboutHomePageUrl=https://sourceforge.net/projects/j2cirip/
22.59 +aboutBlog=Blog
22.60 +aboutBlogLabelUrl=<html><a href=\"http://www.blogospheerix.com/blog/costel/category/j2Cirip\"> \
22.61 + http://www.blogospheerix.com/blog/costel/category/j2Cirip</a>
22.62 +aboutBlogUrl=http://www.blogospheerix.com/blog/costel/category/j2Cirip
22.63 +
22.64 +#ConfigBox
22.65 +configTitle=Configurare
22.66 +jLabelciripUser=Cirip Username
22.67 +jLabelciripPassw=Cirip Password
22.68 +jLabelMPcmd=Fi\u015Fier executabil MPlayer
22.69 +jLabelLang=Limba
22.70 +labelShowDebug=Arat\u0103 informa\u0163iile pentru depanare
22.71 +jButtonChooseMplayer=Selectare
22.72 +jLabelLookFeel=Aspect
22.73 +jLabelRegister=<html><a href=\"http://www.cirip.ro/cirip/inregistrare?lg=en\">\u00CEnregistrare</a>
22.74 +jLabelRegisterUrl=http://www.cirip.ro/cirip/inregistrare?lg=ro
22.75 +
22.76 +openLinkMedia=Deschide cu MPlayer
22.77 +openLinkBrowser=Deschide cu browser-ul default
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/src/ro/xirincs/j2cirip/resources/ConfigBox.properties Mon Jul 06 16:25:29 2009 +0300
23.3 @@ -0,0 +1,14 @@
23.4 +# To change this template, choose Tools | Templates
23.5 +# and open the template in the editor.
23.6 +
23.7 +jLabelRezultat.text=
23.8 +SaveInfo.Action.shortDescription=
23.9 +SaveInfo.Action.text=
23.10 +closeConfigBox.Action.shortDescription=
23.11 +closeConfigBox.Action.text=
23.12 +#NOI18N
23.13 +jButtonChooseMplayer.font=Dialog-Plain-10
23.14 +#NOI18N
23.15 +jButtonSave.font=Dialog-Plain-10
23.16 +#NOI18N
23.17 +closeButton.font=Dialog-Plain-10
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/src/ro/xirincs/j2cirip/resources/View.properties Mon Jul 06 16:25:29 2009 +0300
24.3 @@ -0,0 +1,84 @@
24.4 +######################################################################
24.5 +# #
24.6 +# j2Cirip v. 1.0 beta 1 #
24.7 +# Created by Costel @ Xirincs.Info #
24.8 +# #
24.9 +# https://sourceforge.net/projects/j2cirip/ #
24.10 +# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
24.11 +# #
24.12 +######################################################################
24.13 +# @Action resources
24.14 +
24.15 +showAboutBox.Action.text = &About...
24.16 +showAboutBox.Action.shortDescription = Show the application's information dialog
24.17 +
24.18 +# status bar resources
24.19 +
24.20 +StatusBar.messageTimeout = 5000
24.21 +StatusBar.busyAnimationRate = 30
24.22 +StatusBar.idleIcon = busyicons/idle-icon.png
24.23 +StatusBar.busyIcons[0] = busyicons/busy-icon0.png
24.24 +StatusBar.busyIcons[1] = busyicons/busy-icon1.png
24.25 +StatusBar.busyIcons[2] = busyicons/busy-icon2.png
24.26 +StatusBar.busyIcons[3] = busyicons/busy-icon3.png
24.27 +StatusBar.busyIcons[4] = busyicons/busy-icon4.png
24.28 +StatusBar.busyIcons[5] = busyicons/busy-icon5.png
24.29 +StatusBar.busyIcons[6] = busyicons/busy-icon6.png
24.30 +StatusBar.busyIcons[7] = busyicons/busy-icon7.png
24.31 +StatusBar.busyIcons[8] = busyicons/busy-icon8.png
24.32 +StatusBar.busyIcons[9] = busyicons/busy-icon9.png
24.33 +StatusBar.busyIcons[10] = busyicons/busy-icon10.png
24.34 +StatusBar.busyIcons[11] = busyicons/busy-icon11.png
24.35 +StatusBar.busyIcons[12] = busyicons/busy-icon12.png
24.36 +StatusBar.busyIcons[13] = busyicons/busy-icon13.png
24.37 +StatusBar.busyIcons[14] = busyicons/busy-icon14.png
24.38 +setStatus.Action.shortDescription=
24.39 +setStatus.Action.text=
24.40 +SetStatus.Action.shortDescription=
24.41 +SetStatus.Action.text=
24.42 +SetInfo.Action.shortDescription=
24.43 +SetInfo.Action.text=
24.44 +#NOI18N
24.45 +jScrollPaneResult.font=Tahoma 12 Plain
24.46 +#NOI18N
24.47 +jTextAreaStatus.font=Arial 12 Plain
24.48 +GetReplies.Action.text=
24.49 +GetReplies.Action.shortDescription=
24.50 +GetPublicTimeline.Action.shortDescription=
24.51 +GetPublicTimeline.Action.text=
24.52 +jMenuItemExit.toolTipText=
24.53 +ShowConfigPanel.Action.text=
24.54 +ShowConfigPanel.Action.shortDescription=
24.55 +showConfigPanel.Action.text=
24.56 +showConfigPanel.Action.shortDescription=
24.57 +SetUpdate.Action.shortDescription=
24.58 +SetUpdate.Action.text=
24.59 +StopAction.Action.shortDescription=
24.60 +StopAction.Action.text=
24.61 +#NOI18N
24.62 +jEditorPanePublicTimeline.font=Arial-Plain-12
24.63 +jEditorPanePublicTimeline.contentType=text/html
24.64 +#NOI18N
24.65 +jButtonReplies.font=Dialog-Plain-10
24.66 +#NOI18N
24.67 +jButtonMediaPlayer.font=Dialog-Plain-10
24.68 +jButtonMPvolUP.text=Vol +
24.69 +jButtonMPvolDown.text=Vol -
24.70 +#NOI18N
24.71 +jButtonMPvolUP.font=Dialog-Plain-10
24.72 +#NOI18N
24.73 +jButtonMPvolDown.font=Dialog-Plain-10
24.74 +jToggleButton1.text=jToggleButton1
24.75 +jToggleMPpause.text=||
24.76 +#NOI18N
24.77 +jToggleMPpause.font=Dialog-Plain-10
24.78 +#NOI18N
24.79 +jButtonSetStatus.font=Dialog-Bold-10
24.80 +#NOI18N
24.81 +jButtonClean.font=Dialog-Plain-10
24.82 +jMenuItemMess.text=jMenuItem1
24.83 +#NOI18N
24.84 +jToggleButtonGetTimeline.font=Dialog-Plain-10
24.85 +jButtonMPstop.text=Stop
24.86 +#NOI18N
24.87 +jButtonMPstop.font=Dialog-Plain-10
25.1 Binary file src/ro/xirincs/j2cirip/resources/about.png has changed
26.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon0.png has changed
27.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon1.png has changed
28.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon10.png has changed
29.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon11.png has changed
30.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon12.png has changed
31.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon13.png has changed
32.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon14.png has changed
33.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon2.png has changed
34.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon3.png has changed
35.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon4.png has changed
36.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon5.png has changed
37.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon6.png has changed
38.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon7.png has changed
39.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon8.png has changed
40.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/busy-icon9.png has changed
41.1 Binary file src/ro/xirincs/j2cirip/resources/busyicons/idle-icon.png has changed
42.1 Binary file src/ro/xirincs/j2cirip/resources/splash.png has changed
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
43.2 +++ b/src/ro/xirincs/j2cirip/utils/MPlayer.java Mon Jul 06 16:25:29 2009 +0300
43.3 @@ -0,0 +1,249 @@
43.4 +/**####################################################################
43.5 + *# #
43.6 + *# j2Cirip v. 1.0 beta 1 #
43.7 + *# Created by Costel @ Xirincs.Info #
43.8 + *# #
43.9 + *# https://sourceforge.net/projects/j2cirip/ #
43.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
43.11 + *# #
43.12 + *####################################################################*/
43.13 +/**
43.14 + * A player which is an interface to the MPlayer.
43.15 + * Thanks to Adrian BER
43.16 + */
43.17 +package ro.xirincs.j2cirip.utils;
43.18 +
43.19 +import java.io.*;
43.20 +import java.util.Properties;
43.21 +import java.util.logging.Logger;
43.22 +import java.util.logging.Level;
43.23 +import ro.xirincs.j2cirip.App;
43.24 +
43.25 +public class MPlayer {
43.26 +
43.27 + public MPlayer() {
43.28 + try {
43.29 + props.load(new FileInputStream(propFile));
43.30 + } catch (Exception ex) {
43.31 + Logger.getLogger(MPlayer.class.getName()).log(Level.SEVERE, null, ex);
43.32 + }
43.33 + }
43.34 + private static Logger logger = Logger.getLogger(MPlayer.class.getName());
43.35 +
43.36 + /** A thread that reads from an input stream and outputs to another line by line. */
43.37 + private static class LineRedirecter extends Thread {
43.38 +
43.39 + private InputStream in;
43.40 + private OutputStream out;
43.41 + /** The prefix used to prefix the lines when outputting to the logger. */
43.42 + private String prefix;
43.43 +
43.44 + LineRedirecter(InputStream in, OutputStream out, String prefix) {
43.45 + this.in = in;
43.46 + this.out = out;
43.47 + this.prefix = prefix;
43.48 + }
43.49 +
43.50 + @Override
43.51 + public void run() {
43.52 + try {
43.53 + // creates the decorating reader and writer
43.54 + BufferedReader reader = new BufferedReader(new InputStreamReader(in));
43.55 + PrintStream printStream = new PrintStream(out);
43.56 + String line;
43.57 +
43.58 + // read line by line
43.59 + while ((line = reader.readLine()) != null) {
43.60 + logger.info((prefix != null ? prefix : "") + line);
43.61 + printStream.println(line);
43.62 + App.getApplication().getVw().setStatusMessageLabel(line);
43.63 + }
43.64 + } catch (IOException ex) {
43.65 + Logger.getLogger(MPlayer.class.getName()).log(Level.SEVERE,
43.66 + "An error has occured while grabbing lines", ex);
43.67 + }
43.68 + }
43.69 + }
43.70 + /** The process corresponding to MPlayer. */
43.71 + private Process mplayerProcess;
43.72 + /** The standard input for MPlayer where you can send commands. */
43.73 + private PrintStream mplayerIn;
43.74 + /** A combined reader for the the standard output and error of MPlayer. Used to read MPlayer responses. */
43.75 + private BufferedReader mplayerOutErr;
43.76 +
43.77 + public void open(String path) throws IOException {
43.78 + //String path = file.getAbsolutePath().replace('\\', '/');
43.79 +
43.80 + if (mplayerProcess == null) {
43.81 + // start MPlayer as an external process -quiet
43.82 + //String command = props.getProperty("MPcmd") + " -slave -quiet -idle " + path;
43.83 + String command = props.getProperty("MPcmd") + " -slave " + path;
43.84 + logger.info("Starting MPlayer process: " + command);
43.85 + mplayerProcess = Runtime.getRuntime().exec(command);
43.86 +
43.87 + // create the piped streams where to redirect the standard output and error of MPlayer
43.88 + // specify a bigger pipesize
43.89 + PipedInputStream readFrom = new PipedInputStream(1024 * 1024);
43.90 + PipedOutputStream writeTo = new PipedOutputStream(readFrom);
43.91 + mplayerOutErr = new BufferedReader(new InputStreamReader(readFrom));
43.92 +
43.93 + // create the threads to redirect the standard output and error of MPlayer
43.94 + new LineRedirecter(mplayerProcess.getInputStream(), writeTo, "MPlayer says: ").start();
43.95 + new LineRedirecter(mplayerProcess.getErrorStream(), writeTo, "MPlayer encountered an error: ").start();
43.96 +
43.97 + // the standard input of MPlayer
43.98 + mplayerIn = new PrintStream(mplayerProcess.getOutputStream());
43.99 + } else {
43.100 + execute("loadfile \"" + path + "\" 0");
43.101 + }
43.102 + // wait to start playing
43.103 + waitForAnswer("Starting playback...");
43.104 + logger.info("Started playing file " + path);
43.105 + }
43.106 +
43.107 + public void close() {
43.108 + if (mplayerProcess != null) {
43.109 + execute("quit");
43.110 + try {
43.111 + mplayerProcess.waitFor();
43.112 + } catch (InterruptedException e) {
43.113 + }
43.114 + mplayerProcess = null;
43.115 + }
43.116 + }
43.117 +
43.118 + public File getPlayingFile() {
43.119 + String path = getProperty("path");
43.120 + return path == null ? null : new File(path);
43.121 + }
43.122 +
43.123 + public void togglePlay() {
43.124 + execute("pause");
43.125 + }
43.126 +
43.127 + public boolean isPlaying() {
43.128 + return mplayerProcess != null;
43.129 + }
43.130 +
43.131 + public long getTimePosition() {
43.132 + return getPropertyAsLong("time_pos");
43.133 + }
43.134 +
43.135 + public void setTimePosition(long seconds) {
43.136 + setProperty("time_pos", seconds);
43.137 + }
43.138 +
43.139 + public long getTotalTime() {
43.140 + return getPropertyAsLong("length");
43.141 + }
43.142 +
43.143 + public float getVolume() {
43.144 + return getPropertyAsFloat("volume");
43.145 + }
43.146 +
43.147 + public void setVolume(float volume) {
43.148 + setProperty("volume", volume);
43.149 + }
43.150 +
43.151 + protected String getProperty(String name) {
43.152 + if (name == null || mplayerProcess == null) {
43.153 + return null;
43.154 + }
43.155 + String s = "ANS_" + name + "=";
43.156 + String x = execute("get_property " + name, s);
43.157 + if (x == null) {
43.158 + return null;
43.159 + }
43.160 + if (!x.startsWith(s)) {
43.161 + return null;
43.162 + }
43.163 + return x.substring(s.length());
43.164 + }
43.165 +
43.166 + protected long getPropertyAsLong(String name) {
43.167 + try {
43.168 + return Long.parseLong(getProperty(name));
43.169 + } catch (NumberFormatException exc) {
43.170 + } catch (NullPointerException exc) {
43.171 + }
43.172 + return 0;
43.173 + }
43.174 +
43.175 + protected float getPropertyAsFloat(String name) {
43.176 + try {
43.177 + return Float.parseFloat(getProperty(name));
43.178 + } catch (NumberFormatException exc) {
43.179 + } catch (NullPointerException exc) {
43.180 + }
43.181 + return 0f;
43.182 + }
43.183 +
43.184 + protected void setProperty(String name, String value) {
43.185 + execute("set_property " + name + " " + value);
43.186 + }
43.187 +
43.188 + protected void setProperty(String name, long value) {
43.189 + execute("set_property " + name + " " + value);
43.190 + }
43.191 +
43.192 + protected void setProperty(String name, float value) {
43.193 + execute("set_property " + name + " " + value);
43.194 + }
43.195 +
43.196 + /** Sends a command to MPlayer..
43.197 + * @param command the command to be sent
43.198 + */
43.199 + private void execute(String command) {
43.200 + execute(command, null);
43.201 + }
43.202 +
43.203 + /** Sends a command to MPlayer and waits for an answer.
43.204 + * @param command the command to be sent
43.205 + * @param expected the string with which has to start the line; if null don't wait for an answer
43.206 + * @return the MPlayer answer
43.207 + */
43.208 + private String execute(String command, String expected) {
43.209 + if (mplayerProcess != null) {
43.210 + logger.info("Send to MPlayer the command \"" + command + "\" and expecting " + (expected != null ? "\"" + expected + "\"" : "no answer"));
43.211 + mplayerIn.print(command);
43.212 + mplayerIn.print("\n");
43.213 + mplayerIn.flush();
43.214 + logger.info("Command sent");
43.215 + if (expected != null) {
43.216 + String response = waitForAnswer(expected);
43.217 + logger.info("MPlayer command response: " + response);
43.218 + return response;
43.219 + }
43.220 + }
43.221 + return null;
43.222 + }
43.223 +
43.224 + /** Read from the MPlayer standard output and error a line that starts with
43.225 + * the given parameter and return it.
43.226 + * @param expected the expected starting string for the line
43.227 + * @return the entire line from the standard output or error of MPlayer
43.228 + */
43.229 + private String waitForAnswer(String expected) {
43.230 + // todo add the possibility to specify more options to be specified
43.231 + // todo use regexp matching instead of the beginning of a string
43.232 + int i = 1;
43.233 + String line = null;
43.234 + if (expected != null) {
43.235 + try {
43.236 + while ((line = mplayerOutErr.readLine()) != null) {
43.237 + logger.info("Reading line: " + line);
43.238 + if (line.startsWith(expected)) {
43.239 + return line;
43.240 + }
43.241 + }
43.242 + } catch (Exception e) {
43.243 + }
43.244 + }
43.245 + return line;
43.246 + }
43.247 + //private File propFile = new File("/home/costel/NetBeansProjects/j2cirip/config/Config.properties");
43.248 + private File propFile = new File("./config/Config.properties");
43.249 + private Properties props = new Properties();
43.250 +}
43.251 +
43.252 +
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
44.2 +++ b/src/ro/xirincs/j2cirip/utils/ciripApi.java Mon Jul 06 16:25:29 2009 +0300
44.3 @@ -0,0 +1,139 @@
44.4 +/**####################################################################
44.5 + *# #
44.6 + *# j2Cirip v. 1.0 beta 1 #
44.7 + *# Created by Costel @ Xirincs.Info #
44.8 + *# #
44.9 + *# https://sourceforge.net/projects/j2cirip/ #
44.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
44.11 + *# #
44.12 + *####################################################################*/
44.13 +/**
44.14 + * ciripAPI.java
44.15 + */
44.16 +package ro.xirincs.j2cirip.utils;
44.17 +
44.18 +import java.io.DataOutputStream;
44.19 +import java.io.PrintWriter;
44.20 +import java.io.StringWriter;
44.21 +import java.net.Authenticator;
44.22 +import java.net.HttpURLConnection;
44.23 +import java.net.PasswordAuthentication;
44.24 +import java.net.URL;
44.25 +import java.net.URLEncoder;
44.26 +import java.util.logging.Level;
44.27 +import java.util.logging.Logger;
44.28 +
44.29 +import javax.xml.parsers.DocumentBuilder;
44.30 +import javax.xml.parsers.DocumentBuilderFactory;
44.31 +
44.32 +import org.w3c.dom.Document;
44.33 +
44.34 +public class ciripApi {
44.35 +
44.36 + private URL url;
44.37 + private HttpURLConnection httpSource;
44.38 + private DocumentBuilderFactory dbf;
44.39 + private DocumentBuilder db;
44.40 + private Document dom;
44.41 + String err = null;
44.42 +
44.43 + public String getErr() {
44.44 + return err;
44.45 + }
44.46 +
44.47 + public void setErr(Exception ex) {
44.48 + StringWriter sw = new StringWriter();
44.49 + ex.printStackTrace(new PrintWriter(sw));
44.50 + err = sw.toString();
44.51 + }
44.52 +
44.53 + public Document setUpdate(String status, final String user, final String passw) {
44.54 + try {
44.55 + Authenticator.setDefault(new Authenticator() {
44.56 +
44.57 + @Override
44.58 + protected PasswordAuthentication getPasswordAuthentication() {
44.59 + return new PasswordAuthentication(user, passw.toCharArray());
44.60 + }
44.61 + });
44.62 +
44.63 +
44.64 + //URL url = new URL("http://www.cirip.ro/statuses/replies.xml");
44.65 + url = new URL("http://www.cirip.ro/statuses/update.xml");
44.66 + httpSource = (HttpURLConnection) url.openConnection();
44.67 + httpSource.setRequestMethod("POST");
44.68 + httpSource.setDoInput(true);
44.69 + httpSource.setDoOutput(true);
44.70 + httpSource.setUseCaches(false);
44.71 + httpSource.setAllowUserInteraction(true);
44.72 + HttpURLConnection.setFollowRedirects(true);
44.73 + httpSource.setInstanceFollowRedirects(true);
44.74 + httpSource.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
44.75 + DataOutputStream out = new DataOutputStream(httpSource.getOutputStream());
44.76 + status = URLEncoder.encode(status, "UTF-8");
44.77 + String content = "status=" + status;
44.78 + out.writeBytes(content);
44.79 + out.flush();
44.80 + out.close();
44.81 +
44.82 + dbf = DocumentBuilderFactory.newInstance();
44.83 + db = dbf.newDocumentBuilder();
44.84 + dom = db.parse(httpSource.getInputStream());
44.85 + err = null;
44.86 +
44.87 + } catch (Exception ex) {
44.88 + setErr(ex);
44.89 + Logger.getLogger(ciripApi.class.getName()).log(Level.SEVERE, null, ex);
44.90 + }
44.91 + return dom;
44.92 + }
44.93 +
44.94 + public Document getReplies(final String user, final String passw) {
44.95 + try {
44.96 + Authenticator.setDefault(new Authenticator() {
44.97 +
44.98 + @Override
44.99 + protected PasswordAuthentication getPasswordAuthentication() {
44.100 + return new PasswordAuthentication(user, passw.toCharArray());
44.101 + }
44.102 + });
44.103 +
44.104 + dbf = DocumentBuilderFactory.newInstance();
44.105 + db = dbf.newDocumentBuilder();
44.106 +
44.107 + url = new URL("http://www.cirip.ro/statuses/replies.xml");
44.108 + httpSource = (HttpURLConnection) url.openConnection();
44.109 +
44.110 + dom = db.parse(httpSource.getInputStream());
44.111 + err = null;
44.112 +
44.113 + } catch (Exception ex) {
44.114 + setErr(ex);
44.115 + Logger.getLogger(ciripApi.class.getName()).log(Level.SEVERE, null, ex);
44.116 + }
44.117 +
44.118 + return dom;
44.119 +
44.120 + }
44.121 +
44.122 + public Document getPublicTimeline() {
44.123 + try {
44.124 +
44.125 + dbf = DocumentBuilderFactory.newInstance();
44.126 + db = dbf.newDocumentBuilder();
44.127 +
44.128 + url = new URL("http://www.cirip.ro/statuses/public_timeline.xml");
44.129 + httpSource = (HttpURLConnection) url.openConnection();
44.130 +
44.131 + dom = db.parse(httpSource.getInputStream());
44.132 + err = null;
44.133 +
44.134 + } catch (Exception ex) {
44.135 + setErr(ex);
44.136 + Logger.getLogger(ciripApi.class.getName()).log(Level.SEVERE, null, ex);
44.137 + }
44.138 +
44.139 + return dom;
44.140 +
44.141 + }
44.142 +}
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
45.2 +++ b/src/ro/xirincs/j2cirip/utils/dataSort.java Mon Jul 06 16:25:29 2009 +0300
45.3 @@ -0,0 +1,48 @@
45.4 +/**####################################################################
45.5 + *# #
45.6 + *# j2Cirip v. 1.0 beta 1 #
45.7 + *# Created by Costel @ Xirincs.Info #
45.8 + *# #
45.9 + *# https://sourceforge.net/projects/j2cirip/ #
45.10 + *# http://www.blogospheerix.com/blog/costel/category/j2Cirip #
45.11 + *# #
45.12 + *####################################################################*/
45.13 +/**
45.14 + * dataSort.java
45.15 + */
45.16 +package ro.xirincs.j2cirip.utils;
45.17 +
45.18 +import java.util.ArrayList;
45.19 +import java.util.Collections;
45.20 +import java.util.Comparator;
45.21 +import java.util.Date;
45.22 +import java.util.HashMap;
45.23 +import java.util.Map;
45.24 +
45.25 +public class dataSort {
45.26 +
45.27 + private static Comparator<Map.Entry<Date, String>> SORT_ALPHABETICALLY = new ComparData();
45.28 + private Map<Date, String> dateContinut = new HashMap<Date, String>();
45.29 + private ArrayList<Map.Entry<Date, String>> entries;
45.30 +
45.31 + public void setInfo(Date data, String continut) {
45.32 + dateContinut.put(data, new String(continut));
45.33 + }
45.34 +
45.35 + public ArrayList<Map.Entry<Date, String>> getInfo() {
45.36 + entries = new ArrayList<Map.Entry<Date, String>>(dateContinut.entrySet());
45.37 + Collections.sort(entries, SORT_ALPHABETICALLY);
45.38 + return entries;
45.39 + }
45.40 +
45.41 +
45.42 +}
45.43 +
45.44 +class ComparData implements Comparator<Map.Entry<Date, String>> {
45.45 +
45.46 + @Override
45.47 + public int compare(Map.Entry<Date, String> entry1, Map.Entry<Date, String> entry2) {
45.48 + return entry1.getKey().compareTo(entry2.getKey());
45.49 + }
45.50 +}
45.51 +