Compare commits
No commits in common. "master" and "wiki" have entirely different histories.
1
ProjectHome.md
Normal file
|
@ -0,0 +1 @@
|
|||
Projekt windy na przedmiot systemy wbudowane czasu rzeczywistego
|
|
@ -1,38 +0,0 @@
|
|||
1 2
|
||||
1 3
|
||||
1 4
|
||||
1 5
|
||||
1 7
|
||||
2 6
|
||||
8 3
|
||||
12 2
|
||||
12 1
|
||||
10 5
|
||||
5 3
|
||||
3 4
|
||||
4 3
|
||||
4 3
|
||||
4 3
|
||||
4 3
|
||||
4 3
|
||||
4 3
|
||||
11 10
|
||||
10 11
|
||||
6 3
|
||||
7 4
|
||||
2 7
|
||||
3 2
|
||||
3 5
|
||||
5 3
|
||||
1 5
|
||||
2 6
|
||||
3 7
|
||||
4 8
|
||||
5 9
|
||||
6 10
|
||||
7 11
|
||||
8 12
|
||||
9 1
|
||||
10 2
|
||||
11 3
|
||||
12 4
|
|
@ -1,74 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="Winda" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project Winda.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="Winda-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
|
@ -1,3 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
X-COMMENT: Main-Class will be added automatically by build
|
||||
|
|
@ -1,891 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
|
||||
For the purpose of easier reading the script
|
||||
is divided into following sections:
|
||||
|
||||
- initialization
|
||||
- compilation
|
||||
- jar
|
||||
- execution
|
||||
- debugging
|
||||
- javadoc
|
||||
- junit compilation
|
||||
- junit execution
|
||||
- junit debugging
|
||||
- applet
|
||||
- cleanup
|
||||
|
||||
-->
|
||||
<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="Winda-impl">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="-pre-init" name="-init-private">
|
||||
<property file="nbproject/private/config.properties"/>
|
||||
<property file="nbproject/private/configs/${config}.properties"/>
|
||||
<property file="nbproject/private/private.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private" name="-init-user">
|
||||
<property file="${user.properties.file}"/>
|
||||
<!-- The two properties below are usually overridden -->
|
||||
<!-- by the active platform. Just a fallback. -->
|
||||
<property name="default.javac.source" value="1.4"/>
|
||||
<property name="default.javac.target" value="1.4"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
|
||||
<property file="nbproject/configs/${config}.properties"/>
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
|
||||
<available file="${manifest.file}" property="manifest.available"/>
|
||||
<available file="${application.splash}" property="splashscreen.available"/>
|
||||
<condition property="main.class.available">
|
||||
<and>
|
||||
<isset property="main.class"/>
|
||||
<not>
|
||||
<equals arg1="${main.class}" arg2="" trim="true"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<isset property="main.class.available"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.mkdist">
|
||||
<and>
|
||||
<isset property="libs.CopyLibs.classpath"/>
|
||||
<not>
|
||||
<istrue value="${mkdist.disabled}"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class}"/>
|
||||
<isset property="do.mkdist"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class+mkdist.available}"/>
|
||||
<istrue value="${splashscreen.available}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive">
|
||||
<not>
|
||||
<istrue value="${jar.archive.disabled}"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available+main.class">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class}"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class+mkdist.available}"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="have.tests">
|
||||
<or>
|
||||
<available file="${test.src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="have.sources">
|
||||
<or>
|
||||
<available file="${src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="netbeans.home+have.tests">
|
||||
<and>
|
||||
<isset property="netbeans.home"/>
|
||||
<isset property="have.tests"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="no.javadoc.preview">
|
||||
<and>
|
||||
<isset property="javadoc.preview"/>
|
||||
<isfalse value="${javadoc.preview}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="run.jvmargs" value=""/>
|
||||
<property name="javac.compilerargs" value=""/>
|
||||
<property name="work.dir" value="${basedir}"/>
|
||||
<condition property="no.deps">
|
||||
<and>
|
||||
<istrue value="${no.dependencies}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javac.debug" value="true"/>
|
||||
<property name="javadoc.preview" value="true"/>
|
||||
<property name="application.args" value=""/>
|
||||
<property name="source.encoding" value="${file.encoding}"/>
|
||||
<property name="runtime.encoding" value="${source.encoding}"/>
|
||||
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
|
||||
<and>
|
||||
<isset property="javadoc.encoding"/>
|
||||
<not>
|
||||
<equals arg1="${javadoc.encoding}" arg2=""/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javadoc.encoding.used" value="${source.encoding}"/>
|
||||
<property name="includes" value="**"/>
|
||||
<property name="excludes" value=""/>
|
||||
<property name="do.depend" value="false"/>
|
||||
<condition property="do.depend.true">
|
||||
<istrue value="${do.depend}"/>
|
||||
</condition>
|
||||
<path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
|
||||
<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
|
||||
<length length="0" string="${endorsed.classpath}" when="greater"/>
|
||||
</condition>
|
||||
<property name="javac.fork" value="false"/>
|
||||
<property name="jar.index" value="false"/>
|
||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||
</target>
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="test.src.dir">Must set test.src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="dist.dir">Must set dist.dir</fail>
|
||||
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
||||
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
||||
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
||||
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
|
||||
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
|
||||
<fail unless="dist.jar">Must set dist.jar</fail>
|
||||
</target>
|
||||
<target name="-init-macrodef-property">
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<attribute default="${javac.processorpath}" name="processorpath"/>
|
||||
<attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="${javac.debug}" name="debug"/>
|
||||
<attribute default="${empty.dir}" name="sourcepath"/>
|
||||
<attribute default="${empty.dir}" name="gensrcdir"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<property location="${build.dir}/empty" name="empty.dir"/>
|
||||
<mkdir dir="${empty.dir}"/>
|
||||
<mkdir dir="@{apgeneratedsrcdir}"/>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
||||
<src>
|
||||
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
||||
<include name="*"/>
|
||||
</dirset>
|
||||
</src>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<compilerarg line="${javac.compilerargs}"/>
|
||||
<compilerarg value="-processorpath"/>
|
||||
<compilerarg path="@{processorpath}:${empty.dir}"/>
|
||||
<compilerarg line="${ap.processors.internal}"/>
|
||||
<compilerarg line="${annotation.processing.processor.options}"/>
|
||||
<compilerarg value="-s"/>
|
||||
<compilerarg path="@{apgeneratedsrcdir}"/>
|
||||
<compilerarg line="${ap.proc.none.internal}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<attribute default="${javac.processorpath}" name="processorpath"/>
|
||||
<attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="${javac.debug}" name="debug"/>
|
||||
<attribute default="${empty.dir}" name="sourcepath"/>
|
||||
<attribute default="${empty.dir}" name="gensrcdir"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<property location="${build.dir}/empty" name="empty.dir"/>
|
||||
<mkdir dir="${empty.dir}"/>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
||||
<src>
|
||||
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
||||
<include name="*"/>
|
||||
</dirset>
|
||||
</src>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<compilerarg line="${javac.compilerargs}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
|
||||
<macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<sequential>
|
||||
<depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</depend>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<sequential>
|
||||
<fail unless="javac.includes">Must set javac.includes</fail>
|
||||
<pathconvert pathsep="," property="javac.includes.binary">
|
||||
<path>
|
||||
<filelist dir="@{destdir}" files="${javac.includes}"/>
|
||||
</path>
|
||||
<globmapper from="*.java" to="*.class"/>
|
||||
</pathconvert>
|
||||
<delete>
|
||||
<files includes="${javac.includes.binary}"/>
|
||||
</delete>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-junit">
|
||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="**" name="testincludes"/>
|
||||
<sequential>
|
||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
|
||||
<batchtest todir="${build.test.results.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||
<filename name="@{testincludes}"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<classpath>
|
||||
<path path="${run.test.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
</junit>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${main.class}" name="name"/>
|
||||
<attribute default="${debug.classpath}" name="classpath"/>
|
||||
<attribute default="" name="stopclassname"/>
|
||||
<sequential>
|
||||
<nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</nbjpdastart>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${build.classes.dir}" name="dir"/>
|
||||
<sequential>
|
||||
<nbjpdareload>
|
||||
<fileset dir="@{dir}" includes="${fix.classes}">
|
||||
<include name="${fix.includes}*.class"/>
|
||||
</fileset>
|
||||
</nbjpdareload>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-debug-args">
|
||||
<property name="version-output" value="java version "${ant.java.version}"/>
|
||||
<condition property="have-jdk-older-than-1.4">
|
||||
<or>
|
||||
<contains string="${version-output}" substring="java version "1.0"/>
|
||||
<contains string="${version-output}" substring="java version "1.1"/>
|
||||
<contains string="${version-output}" substring="java version "1.2"/>
|
||||
<contains string="${version-output}" substring="java version "1.3"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
|
||||
<istrue value="${have-jdk-older-than-1.4}"/>
|
||||
</condition>
|
||||
<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
<condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
|
||||
<isset property="debug.transport"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-debug-args" name="-init-macrodef-debug">
|
||||
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${main.class}" name="classname"/>
|
||||
<attribute default="${debug.classpath}" name="classpath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<jvmarg line="${debug-args-line}"/>
|
||||
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper from="run-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-java">
|
||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${main.class}" name="classname"/>
|
||||
<attribute default="${run.classpath}" name="classpath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper from="run-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-copylibs">
|
||||
<macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
||||
<pathconvert property="run.classpath.without.build.classes.dir">
|
||||
<path path="${run.classpath}"/>
|
||||
<map from="${build.classes.dir.resolved}" to=""/>
|
||||
</pathconvert>
|
||||
<pathconvert pathsep=" " property="jar.classpath">
|
||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||
<chainedmapper>
|
||||
<flattenmapper/>
|
||||
<globmapper from="*" to="lib/*"/>
|
||||
</chainedmapper>
|
||||
</pathconvert>
|
||||
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
|
||||
<copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Class-Path" value="${jar.classpath}"/>
|
||||
<customize/>
|
||||
</manifest>
|
||||
</copylibs>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-presetdef-jar">
|
||||
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
|
||||
<j2seproject1:fileset dir="${build.classes.dir}"/>
|
||||
</jar>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target name="-init-ap-cmdline-properties">
|
||||
<property name="annotation.processing.enabled" value="true"/>
|
||||
<property name="annotation.processing.processors.list" value=""/>
|
||||
<property name="annotation.processing.processor.options" value=""/>
|
||||
<property name="annotation.processing.run.all.processors" value="true"/>
|
||||
<property name="javac.processorpath" value="${javac.classpath}"/>
|
||||
<property name="javac.test.processorpath" value="${javac.test.classpath}"/>
|
||||
<condition property="ap.supported.internal" value="true">
|
||||
<not>
|
||||
<matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
|
||||
</not>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
|
||||
<condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
|
||||
<isfalse value="${annotation.processing.run.all.processors}"/>
|
||||
</condition>
|
||||
<condition else="" property="ap.proc.none.internal" value="-proc:none">
|
||||
<isfalse value="${annotation.processing.enabled}"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||
<property name="ap.cmd.line.internal" value=""/>
|
||||
</target>
|
||||
<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,-init-ap-cmdline" name="init"/>
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="-deps-jar-init" unless="built-jar.properties">
|
||||
<property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
|
||||
<delete file="${built-jar.properties}" quiet="true"/>
|
||||
</target>
|
||||
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
|
||||
<echo level="warn" message="Cycle detected: Winda was already built"/>
|
||||
</target>
|
||||
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<touch file="${built-jar.properties}" verbose="false"/>
|
||||
<property file="${built-jar.properties}" prefix="already.built.jar."/>
|
||||
<antcall target="-warn-already-built-jar"/>
|
||||
<propertyfile file="${built-jar.properties}">
|
||||
<entry key="${basedir}" value=""/>
|
||||
</propertyfile>
|
||||
</target>
|
||||
<target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
|
||||
<target depends="init" name="-check-automatic-build">
|
||||
<available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
|
||||
</target>
|
||||
<target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
|
||||
<antcall target="clean"/>
|
||||
</target>
|
||||
<target depends="init,deps-jar" name="-pre-pre-compile">
|
||||
<mkdir dir="${build.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target if="do.depend.true" name="-compile-depend">
|
||||
<pathconvert property="build.generated.subdirs">
|
||||
<dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
||||
<include name="*"/>
|
||||
</dirset>
|
||||
</pathconvert>
|
||||
<j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
|
||||
<j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
|
||||
<copy todir="${build.classes.dir}">
|
||||
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target if="has.persistence.xml" name="-copy-persistence-xml">
|
||||
<mkdir dir="${build.classes.dir}/META-INF"/>
|
||||
<copy todir="${build.classes.dir}/META-INF">
|
||||
<fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
|
||||
<target name="-pre-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<j2seproject3:force-recompile/>
|
||||
<j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
|
||||
</target>
|
||||
<target name="-post-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
||||
<!--
|
||||
====================
|
||||
JAR BUILDING SECTION
|
||||
====================
|
||||
-->
|
||||
<target depends="init" name="-pre-pre-jar">
|
||||
<dirname file="${dist.jar}" property="dist.jar.dir"/>
|
||||
<mkdir dir="${dist.jar.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
|
||||
<j2seproject1:jar/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
|
||||
<j2seproject1:jar manifest="${manifest.file}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
|
||||
<j2seproject1:jar manifest="${manifest.file}">
|
||||
<j2seproject1:manifest>
|
||||
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
|
||||
</j2seproject1:manifest>
|
||||
</j2seproject1:jar>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<pathconvert property="run.classpath.with.dist.jar">
|
||||
<path path="${run.classpath}"/>
|
||||
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
|
||||
</pathconvert>
|
||||
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
|
||||
<basename file="${application.splash}" property="splashscreen.basename"/>
|
||||
<mkdir dir="${build.classes.dir}/META-INF"/>
|
||||
<copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
|
||||
<j2seproject3:copylibs>
|
||||
<customize>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
<attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
|
||||
</customize>
|
||||
</j2seproject3:copylibs>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<echo>java -jar "${dist.jar.resolved}"</echo>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
|
||||
<j2seproject3:copylibs>
|
||||
<customize>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
</customize>
|
||||
</j2seproject3:copylibs>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<echo>java -jar "${dist.jar.resolved}"</echo>
|
||||
</target>
|
||||
<target name="-post-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
|
||||
<!--
|
||||
=================
|
||||
EXECUTION SECTION
|
||||
=================
|
||||
-->
|
||||
<target depends="init,compile" description="Run a main class." name="run">
|
||||
<j2seproject1:java>
|
||||
<customize>
|
||||
<arg line="${application.args}"/>
|
||||
</customize>
|
||||
</j2seproject1:java>
|
||||
</target>
|
||||
<target name="-do-not-recompile">
|
||||
<property name="javac.includes.binary" value=""/>
|
||||
</target>
|
||||
<target depends="init,compile-single" name="run-single">
|
||||
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||
<j2seproject1:java classname="${run.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single" name="run-test-with-main">
|
||||
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||
<j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
|
||||
</target>
|
||||
<!--
|
||||
=================
|
||||
DEBUGGING SECTION
|
||||
=================
|
||||
-->
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
||||
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
|
||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile" name="-debug-start-debuggee">
|
||||
<j2seproject3:debug>
|
||||
<customize>
|
||||
<arg line="${application.args}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
|
||||
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
|
||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
|
||||
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
||||
<j2seproject3:debug classname="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
|
||||
<target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
|
||||
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
||||
<j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
|
||||
<target depends="init" name="-pre-debug-fix">
|
||||
<fail unless="fix.includes">Must set fix.includes</fail>
|
||||
<property name="javac.includes" value="${fix.includes}.java"/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
|
||||
<j2seproject1:nbjpdareload/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
|
||||
<!--
|
||||
===============
|
||||
JAVADOC SECTION
|
||||
===============
|
||||
-->
|
||||
<target depends="init" if="have.sources" name="-javadoc-build">
|
||||
<mkdir dir="${dist.javadoc.dir}"/>
|
||||
<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}">
|
||||
<classpath>
|
||||
<path path="${javac.classpath}"/>
|
||||
</classpath>
|
||||
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
||||
<filename name="**/*.java"/>
|
||||
</fileset>
|
||||
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
||||
<include name="**/*.java"/>
|
||||
</fileset>
|
||||
</javadoc>
|
||||
<copy todir="${dist.javadoc.dir}">
|
||||
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
||||
<filename name="**/doc-files/**"/>
|
||||
</fileset>
|
||||
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
||||
<include name="**/doc-files/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
|
||||
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
|
||||
</target>
|
||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||
<!--
|
||||
=========================
|
||||
JUNIT COMPILATION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||
<mkdir dir="${build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target if="do.depend.true" name="-compile-test-depend">
|
||||
<j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
|
||||
<j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
|
||||
<copy todir="${build.test.classes.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
|
||||
<target name="-pre-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
|
||||
<j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
|
||||
<copy todir="${build.test.classes.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT EXECUTION SECTION
|
||||
=======================
|
||||
-->
|
||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
||||
</target>
|
||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target depends="init" if="have.tests" name="test-report"/>
|
||||
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
|
||||
<target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
|
||||
<target depends="init" if="have.tests" name="-pre-test-run-single">
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT DEBUGGING SECTION
|
||||
=======================
|
||||
-->
|
||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
||||
<delete file="${test.report.file}"/>
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
<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}">
|
||||
<customize>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<arg value="${test.class}"/>
|
||||
<arg value="showoutput=true"/>
|
||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
|
||||
<!--
|
||||
=========================
|
||||
APPLET EXECUTION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile-single" name="run-applet">
|
||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||
<j2seproject1:java classname="sun.applet.AppletViewer">
|
||||
<customize>
|
||||
<arg value="${applet.url}"/>
|
||||
</customize>
|
||||
</j2seproject1:java>
|
||||
</target>
|
||||
<!--
|
||||
=========================
|
||||
APPLET DEBUGGING SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
|
||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||
<j2seproject3:debug classname="sun.applet.AppletViewer">
|
||||
<customize>
|
||||
<arg value="${applet.url}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target name="-deps-clean-init" unless="built-clean.properties">
|
||||
<property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
|
||||
<delete file="${built-clean.properties}" quiet="true"/>
|
||||
</target>
|
||||
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
|
||||
<echo level="warn" message="Cycle detected: Winda was already built"/>
|
||||
</target>
|
||||
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<touch file="${built-clean.properties}" verbose="false"/>
|
||||
<property file="${built-clean.properties}" prefix="already.built.clean."/>
|
||||
<antcall target="-warn-already-built-clean"/>
|
||||
<propertyfile file="${built-clean.properties}">
|
||||
<entry key="${basedir}" value=""/>
|
||||
</propertyfile>
|
||||
</target>
|
||||
<target depends="init" name="-do-clean">
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
|
||||
</target>
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
|
||||
<target name="-check-call-dep">
|
||||
<property file="${call.built.properties}" prefix="already.built."/>
|
||||
<condition property="should.call.dep">
|
||||
<not>
|
||||
<isset property="already.built.${call.subproject}"/>
|
||||
</not>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||
<ant antfile="${call.script}" inheritall="false" target="${call.target}">
|
||||
<propertyset>
|
||||
<propertyref prefix="transfer."/>
|
||||
<mapper from="transfer.*" to="*" type="glob"/>
|
||||
</propertyset>
|
||||
</ant>
|
||||
</target>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
build.xml.data.CRC32=a37bb9f5
|
||||
build.xml.script.CRC32=c0e8f582
|
||||
build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=a37bb9f5
|
||||
nbproject/build-impl.xml.script.CRC32=232a7f98
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=229523de@1.38.3.45
|
|
@ -1,67 +0,0 @@
|
|||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.run.all.processors=true
|
||||
application.desc=A simple java desktop application based on Swing Application Framework
|
||||
application.homepage=http://appframework.dev.java.net
|
||||
application.title=Basic Application Example
|
||||
application.vendor=Sun Microsystems Inc.
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
# This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${build.dir}/generated
|
||||
build.generated.sources.dir=${build.dir}/generated-sources
|
||||
# Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
# This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${dist.dir}/Winda.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=
|
||||
excludes=
|
||||
includes=**
|
||||
jar.compress=true
|
||||
javac.classpath=\
|
||||
${libs.swing-app-framework.classpath}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.5
|
||||
javac.target=1.5
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${libs.junit.classpath}:\
|
||||
${libs.junit_4.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
main.class=winda.gui.WindaApp
|
||||
manifest.file=manifest.mf
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
||||
test.src.dir=test
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>Winda</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
<swingapp xmlns="http://www.netbeans.org/ns/form-swingapp/1">
|
||||
<application-class name="winda.gui.WindaApp"/>
|
||||
</swingapp>
|
||||
</configuration>
|
||||
</project>
|
|
@ -1 +0,0 @@
|
|||
winda.WindaApp
|
|
@ -1,156 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.animation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import winda.logic.Pietro;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Przemo
|
||||
*/
|
||||
public class Elevator extends Thread {
|
||||
private ElevatorAnimation ea;
|
||||
|
||||
private int floor_count;
|
||||
private final int floor_size = 50;
|
||||
private int time_for_floor; // Tymczasowo /* Miliseconds */
|
||||
private int actual_floor;
|
||||
private double jump_time;
|
||||
private double speed;
|
||||
private int enter_exit_time;
|
||||
|
||||
private ArrayList<Pietro> pietro;
|
||||
|
||||
private int elevator;
|
||||
|
||||
public Elevator(ElevatorAnimation ea, int floor_count, int elevator){
|
||||
this.setElevatorAnimation(ea);
|
||||
this.floor_count = floor_count;
|
||||
this.elevator = elevator;
|
||||
this.speed = 1;
|
||||
this.init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(){
|
||||
for(int i=0;i<this.pietro.size();i++){
|
||||
this.goToFloor(this.pietro.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
private void init(){
|
||||
this.time_for_floor = 1000;
|
||||
this.actual_floor = 0;
|
||||
this.jump_time = ((double)this.time_for_floor)/((double)(this.floor_size));
|
||||
}
|
||||
|
||||
public void setElevatorAnimation(ElevatorAnimation ea){
|
||||
this.ea = ea;
|
||||
}
|
||||
|
||||
public void goToFloor(Pietro pietro){
|
||||
if(this.actual_floor<pietro.numerPietra)
|
||||
this.goUp(pietro.numerPietra);
|
||||
else if(this.actual_floor>pietro.numerPietra)
|
||||
this.goDown(pietro.numerPietra);
|
||||
this.actual_floor = pietro.numerPietra;
|
||||
|
||||
this.exitElevator(pietro.pasazerowieWysiadajacy.size(), pietro.numerPietra);
|
||||
this.enterElevator(pietro.pasazerowieWsiadający.size(), pietro.numerPietra);
|
||||
}
|
||||
|
||||
private void goUp(int number){
|
||||
while(this.ea.shift>(this.floor_size*(this.floor_count-(number+1)))){
|
||||
try {
|
||||
if(this.elevator==1)
|
||||
this.ea.shift--;
|
||||
else
|
||||
this.ea.shift2--;
|
||||
this.ea.repaint();
|
||||
this.sleep((long) (this.jump_time*this.speed));
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(ElevatorMovement.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void goDown(int number) {
|
||||
while(this.ea.shift<(this.floor_size*(this.floor_count-(number+1)))){
|
||||
try {
|
||||
if(this.elevator==1)
|
||||
this.ea.shift++;
|
||||
else
|
||||
this.ea.shift2++;
|
||||
this.ea.repaint();
|
||||
this.sleep((long) (this.jump_time*this.speed));
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(ElevatorMovement.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void exitElevator(int number, int floor){
|
||||
if(number<=0)
|
||||
return;
|
||||
System.out.println("exitElevator("+number+") elevator_passangers "+this.ea.elevator_passangers);
|
||||
for(int i=0;i<number;i++){
|
||||
try {
|
||||
if(this.elevator == 1)
|
||||
this.ea.elevator_passangers--;
|
||||
else
|
||||
this.ea.second_elevator_passangers--;
|
||||
this.ea.exited_floor_passangers[floor]++;
|
||||
this.ea.repaint();
|
||||
this.sleep((long) (this.enter_exit_time*this.speed));
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(ElevatorMovement.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void enterElevator(int number, int floor){
|
||||
if(number<=0)
|
||||
return;
|
||||
for(int i=0;i<number;i++){
|
||||
try {
|
||||
if(this.elevator == 1)
|
||||
this.ea.elevator_passangers++;
|
||||
else
|
||||
this.ea.second_elevator_passangers++;
|
||||
this.ea.floor_passangers[floor]--;
|
||||
this.ea.repaint();
|
||||
this.sleep((long) (this.enter_exit_time*this.speed));
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(ElevatorMovement.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setTimeForFloor(int time){
|
||||
this.time_for_floor = time;
|
||||
this.jump_time = ((double)time)/((double)(this.floor_size));
|
||||
}
|
||||
|
||||
public void setFloorsCount(int floors){
|
||||
this.floor_count = floors;
|
||||
this.init();
|
||||
}
|
||||
|
||||
public void setEnterExitTime(int time){
|
||||
this.enter_exit_time = time;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed){
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public void setPietro(ArrayList<Pietro> pietro){
|
||||
this.pietro = pietro;
|
||||
}
|
||||
}
|
|
@ -1,196 +0,0 @@
|
|||
package winda.animation;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.geom.Line2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.swing.JApplet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Przemo
|
||||
*/
|
||||
public class ElevatorAnimation extends JApplet {
|
||||
|
||||
private int x_dimension;
|
||||
private int y_dmension;
|
||||
private int floor_count;
|
||||
private boolean secondElevator;
|
||||
|
||||
private final int floor_size = 50;
|
||||
private final int elevator_size_x = 40;
|
||||
private final int elevator_size_y = 50;
|
||||
|
||||
private Font elevator_font;
|
||||
private Font floor_font;
|
||||
|
||||
public int shift;
|
||||
public int shift2;
|
||||
public int elevator_passangers;
|
||||
public int second_elevator_passangers;
|
||||
public int[] floor_passangers;
|
||||
public int[] exited_floor_passangers;
|
||||
public int[] second_exited_floor_passangers;
|
||||
|
||||
public ElevatorAnimation(int floor_count, boolean second_elevator){
|
||||
this.floor_count = floor_count;
|
||||
this.y_dmension = floor_size*this.floor_count;
|
||||
this.elevator_font = new Font("Serif", Font.PLAIN, 30);
|
||||
this.floor_font = new Font("Serif", Font.PLAIN, 16);
|
||||
this.floor_passangers = new int[floor_count];
|
||||
this.exited_floor_passangers = new int[floor_count];
|
||||
this.second_exited_floor_passangers = new int[floor_count];
|
||||
if(second_elevator){
|
||||
this.x_dimension = 300;
|
||||
this.secondElevator = true;
|
||||
}
|
||||
else{
|
||||
this.x_dimension = 200;
|
||||
this.secondElevator = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize(){
|
||||
return new Dimension(this.x_dimension, this.y_dmension);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Graphics g){
|
||||
Graphics2D g2 = (Graphics2D) g;
|
||||
|
||||
g2.drawImage(this.buffImage(), null, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Buforowana klatki
|
||||
*/
|
||||
private BufferedImage buffImage(){
|
||||
BufferedImage buffi = new BufferedImage(this.x_dimension, this.y_dmension, BufferedImage.TYPE_BYTE_GRAY);
|
||||
Graphics2D buffig = (Graphics2D) buffi.getGraphics();
|
||||
Rectangle r = new Rectangle(0,0,this.x_dimension,this.y_dmension);
|
||||
|
||||
buffig.setBackground(Color.WHITE);
|
||||
buffig.setColor(Color.BLACK);
|
||||
buffig.clearRect(0, 0, this.x_dimension, this.y_dmension);
|
||||
|
||||
this.drawElevatorShaft(buffig);
|
||||
this.drawFloors(buffig);
|
||||
this.drawPassangers(buffig);
|
||||
this.drawExitedPassangers(buffig);
|
||||
this.drawElevator(buffig);
|
||||
|
||||
|
||||
/* Druga winda */
|
||||
if(this.secondElevator){
|
||||
this.drawSecondElevatorShaft(buffig);
|
||||
this.drawSecondElevator(buffig);
|
||||
this.drawSecondExitedPassangers(buffig);
|
||||
}
|
||||
|
||||
return buffi;
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie szybu windy
|
||||
*/
|
||||
private void drawElevatorShaft(Graphics2D g2){
|
||||
Line2D left = new Line2D.Double(45, 0, 45, this.y_dmension);
|
||||
Line2D right = new Line2D.Double(95, 0, 95, this.y_dmension);
|
||||
g2.draw(left);
|
||||
g2.draw(right);
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie Pięter z numerami
|
||||
*/
|
||||
private void drawFloors(Graphics2D g2){
|
||||
g2.setFont(this.floor_font);
|
||||
for(int i=1;i<=this.floor_count;i++){
|
||||
int tmp = this.floor_count-i;
|
||||
g2.draw(new Line2D.Double(0, this.floor_size*i, this.x_dimension, this.floor_size*i));
|
||||
g2.drawString(""+tmp, 100, (this.floor_size*i)-5);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie ilosci pasażerów na piętrach
|
||||
*/
|
||||
private void drawPassangers(Graphics2D g2){
|
||||
g2.setFont(this.elevator_font);
|
||||
for(int i=1;i<=this.floor_count;i++){
|
||||
g2.drawString(""+this.floor_passangers[this.floor_count-i], 120 ,(this.floor_size*i)-15);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie ilości pasażerów którzy wysiadli na piętrach
|
||||
*/
|
||||
private void drawExitedPassangers(Graphics2D g2){
|
||||
g2.setFont(this.elevator_font);
|
||||
for(int i=1;i<=this.floor_count;i++)
|
||||
if(this.exited_floor_passangers[this.floor_count-i]>0)
|
||||
g2.drawString(""+this.exited_floor_passangers[this.floor_count-i], 10, (this.floor_size*i)-15);
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie ilości pasażerów którzy wysiadli na piętrach dla drugiej windy
|
||||
*/
|
||||
private void drawSecondExitedPassangers(Graphics2D g2){
|
||||
g2.setFont(this.elevator_font);
|
||||
for(int i=1;i<=this.floor_count;i++)
|
||||
if(this.second_exited_floor_passangers[this.floor_count-i]>0)
|
||||
g2.drawString(""+this.second_exited_floor_passangers[this.floor_count-i], 10+220, (this.floor_size*i)-15);
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie windy
|
||||
*/
|
||||
private void drawElevator(Graphics2D g2){
|
||||
Rectangle2D winda = new Rectangle2D.Double(50, 00, this.elevator_size_x, this.elevator_size_y);
|
||||
|
||||
g2.translate(0, this.shift);
|
||||
g2.clearRect(50, 00, this.elevator_size_x, this.elevator_size_y);
|
||||
g2.draw(winda);
|
||||
|
||||
g2.setFont(this.elevator_font);
|
||||
if(this.elevator_passangers < 10)
|
||||
g2.drawString("0"+this.elevator_passangers, 55, 35);
|
||||
else
|
||||
g2.drawString(""+this.elevator_passangers, 55, 35);
|
||||
g2.translate(0, -this.shift);
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie drugiej windy
|
||||
*/
|
||||
private void drawSecondElevator(Graphics2D g2){
|
||||
Rectangle2D winda = new Rectangle2D.Double(50+120, 00, this.elevator_size_x, this.elevator_size_y);
|
||||
|
||||
g2.translate(0, this.shift2);
|
||||
g2.clearRect(50+120, 00, this.elevator_size_x, this.elevator_size_y);
|
||||
g2.draw(winda);
|
||||
|
||||
g2.setFont(this.elevator_font);
|
||||
if(this.second_elevator_passangers < 10)
|
||||
g2.drawString("0"+this.second_elevator_passangers, 55+120, 35);
|
||||
else
|
||||
g2.drawString(""+this.second_elevator_passangers, 55+120, 35);
|
||||
g2.translate(0, -this.shift2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Rysowanie drugiego szybu windy
|
||||
*/
|
||||
private void drawSecondElevatorShaft(Graphics2D g2){
|
||||
Line2D left = new Line2D.Double(45+120, 0, 45+120, this.y_dmension);
|
||||
Line2D right = new Line2D.Double(95+120, 0, 95+120, this.y_dmension);
|
||||
g2.draw(left);
|
||||
g2.draw(right);
|
||||
}
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
package winda.animation;
|
||||
|
||||
import java.awt.ScrollPane;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import winda.gui.WindaApp;
|
||||
import winda.logic.Pietro;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Przemo
|
||||
*/
|
||||
public class ElevatorMovement extends Thread{
|
||||
private ElevatorAnimation ea;
|
||||
|
||||
Elevator first;
|
||||
Elevator second;
|
||||
|
||||
private int floor_count;
|
||||
private final int floor_size = 50;
|
||||
private int time_for_floor; // Tymczasowo /* Miliseconds */
|
||||
private int actual_floor;
|
||||
private double jump_time;
|
||||
private double speed;
|
||||
private int enter_exit_time;
|
||||
private boolean second_elevator;
|
||||
|
||||
private ArrayList<Pietro> pietro;
|
||||
private ArrayList<Pietro> second_pietro;
|
||||
|
||||
@Override
|
||||
public void run(){
|
||||
this.first.setPietro(this.pietro);
|
||||
this.first.start();
|
||||
if(this.second_elevator){
|
||||
this.second.setPietro(this.second_pietro);
|
||||
this.second.start();
|
||||
}
|
||||
}
|
||||
|
||||
public ElevatorMovement(int floor_count){
|
||||
this.floor_count = floor_count;
|
||||
this.init();
|
||||
this.speed = 1;
|
||||
}
|
||||
|
||||
public ElevatorAnimation getElevatorAnimation(){
|
||||
return this.ea;
|
||||
}
|
||||
|
||||
public void setPassangersOnFloor(int floor, int number){
|
||||
this.ea.floor_passangers[floor]=number;
|
||||
}
|
||||
|
||||
public void setPassangersOnFloors(int []passangers){
|
||||
if(passangers.length == this.ea.floor_passangers.length)
|
||||
this.ea.floor_passangers = passangers;
|
||||
else
|
||||
for(int i=0;i<passangers.length;i++)
|
||||
this.ea.floor_passangers[i] = passangers[i];
|
||||
}
|
||||
|
||||
public void setPassangersInElevator(int passangers){
|
||||
System.out.println("setPassangersInElevator("+passangers+")");
|
||||
this.ea.elevator_passangers = passangers;
|
||||
}
|
||||
|
||||
public int getPassangersInElevator(){
|
||||
return this.ea.elevator_passangers;
|
||||
}
|
||||
|
||||
public int getPassangersOnFloor(int floor){
|
||||
return this.ea.floor_passangers[floor];
|
||||
}
|
||||
|
||||
public void setTimeForFloor(int time){
|
||||
this.time_for_floor = time;
|
||||
this.jump_time = ((double)time)/((double)(this.floor_size));
|
||||
this.first.setTimeForFloor(time);
|
||||
if(this.second_elevator)
|
||||
this.second.setTimeForFloor(time);
|
||||
}
|
||||
|
||||
public double getSpeed(){
|
||||
return this.speed;
|
||||
}
|
||||
|
||||
public void setSpeed(int speed){
|
||||
if(speed == 50)
|
||||
this.speed = 1;
|
||||
else if(speed >50){
|
||||
speed = 100-speed;
|
||||
this.speed = (((double)speed+50)/2)/100;
|
||||
}
|
||||
else{
|
||||
speed = 100-speed;
|
||||
this.speed = (((double)speed+50)*2)/100;
|
||||
}
|
||||
this.first.setSpeed(this.speed);
|
||||
if(this.second_elevator)
|
||||
this.second.setSpeed(this.speed);
|
||||
}
|
||||
|
||||
public void setFloorsCount(int floors){
|
||||
this.floor_count = floors;
|
||||
this.first.setFloorsCount(floors);
|
||||
if(this.second_elevator)
|
||||
this.second.setFloorsCount(floors);
|
||||
this.init();
|
||||
}
|
||||
|
||||
public void setEnterExitTime(int time){
|
||||
this.enter_exit_time = time;
|
||||
this.first.setEnterExitTime(time);
|
||||
if(this.second_elevator)
|
||||
this.second.setEnterExitTime(time);
|
||||
}
|
||||
|
||||
private void init(){
|
||||
this.time_for_floor = 1000;
|
||||
this.actual_floor = 0;
|
||||
this.ea = new ElevatorAnimation(this.floor_count, this.second_elevator);
|
||||
/* Start z parteru */
|
||||
this.ea.shift = this.floor_size * (this.floor_count-1);
|
||||
this.ea.shift2 = this.floor_size * (this.floor_count-1);
|
||||
this.jump_time = ((double)this.time_for_floor)/((double)(this.floor_size));
|
||||
this.second_elevator = false;
|
||||
|
||||
this.first = new Elevator(this.ea, this.floor_count, 1);
|
||||
}
|
||||
|
||||
public void setPietro(ArrayList pietro, int elevator){
|
||||
if(elevator == 1){
|
||||
this.pietro = pietro;
|
||||
this.first.setPietro(pietro);
|
||||
}
|
||||
else{
|
||||
this.second_pietro = pietro;
|
||||
this.second.setPietro(pietro);
|
||||
}
|
||||
}
|
||||
|
||||
public void enableSecondElevator(){
|
||||
this.second_elevator = true;
|
||||
this.second = new Elevator(this.ea, this.floor_count, 2);
|
||||
this.second.setSpeed(this.speed);
|
||||
this.ea.repaint();
|
||||
}
|
||||
|
||||
public void disableSecondElevator(){
|
||||
this.second_elevator = false;
|
||||
this.second.interrupt();
|
||||
this.second = null;
|
||||
this.ea.repaint();
|
||||
}
|
||||
}
|
|
@ -1,379 +0,0 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="3"/>
|
||||
<Property name="name" type="java.lang.String" value="Form" noResource="true"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="897" max="32767" attributes="0"/>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="mainPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="548" max="32767" attributes="0"/>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="mainPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="mainPanel">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="mainPanel" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jPanel2" alignment="1" max="32767" attributes="1"/>
|
||||
<Component id="jPanel3" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jPanel1" alignment="0" max="32767" attributes="1"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator2" min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="327" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="57" max="-2" attributes="0"/>
|
||||
<Component id="jSeparator1" min="-2" pref="11" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="176" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel1" min="-2" pref="135" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="289" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jScrollPane1" alignment="1" pref="486" max="32767" attributes="1"/>
|
||||
<Component id="jSeparator2" alignment="0" pref="486" max="32767" attributes="1"/>
|
||||
<Component id="jSeparator1" alignment="0" pref="486" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="1">
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jPanel2" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jScrollPane1" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator3">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel1" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="119" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSpinner2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jSpinner1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jSpinner2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="24" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner2">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel3.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator1">
|
||||
<Properties>
|
||||
<Property name="orientation" type="int" value="1"/>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator2">
|
||||
<Properties>
|
||||
<Property name="orientation" type="int" value="1"/>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel2" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="122" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSeparator4" alignment="0" min="-2" pref="127" max="-2" attributes="0"/>
|
||||
<Component id="jCheckBox1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="59" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSpinner5" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner4" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jSpinner3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jSpinner4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jSeparator4" min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="8" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jSpinner5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jCheckBox1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel4.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner3">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner4">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner5">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner5" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel5.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel5" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel6.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel6" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator4">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jCheckBox1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jCheckBox1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jCheckBox1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel3" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="276" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="141" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
|
@ -1,325 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ramka.java
|
||||
*
|
||||
* Created on 2011-03-20, 15:34:47
|
||||
*/
|
||||
|
||||
package winda.gui;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Anja
|
||||
*/
|
||||
public class Ramka extends javax.swing.JFrame {
|
||||
|
||||
/** Creates new form Ramka */
|
||||
public Ramka() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
mainPanel = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jSeparator3 = new javax.swing.JSeparator();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jButton2 = new javax.swing.JButton();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jSpinner1 = new javax.swing.JSpinner();
|
||||
jSpinner2 = new javax.swing.JSpinner();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jSeparator1 = new javax.swing.JSeparator();
|
||||
jSeparator2 = new javax.swing.JSeparator();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jSpinner3 = new javax.swing.JSpinner();
|
||||
jSpinner4 = new javax.swing.JSpinner();
|
||||
jSpinner5 = new javax.swing.JSpinner();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jSeparator4 = new javax.swing.JSeparator();
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||
setName("Form"); // NOI18N
|
||||
|
||||
mainPanel.setName("mainPanel"); // NOI18N
|
||||
|
||||
jScrollPane1.setName("jScrollPane1"); // NOI18N
|
||||
|
||||
jSeparator3.setName("jSeparator3"); // NOI18N
|
||||
jScrollPane1.setViewportView(jSeparator3);
|
||||
|
||||
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(winda.gui.WindaApp.class).getContext().getResourceMap(Ramka.class);
|
||||
jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
|
||||
jLabel1.setName("jLabel1"); // NOI18N
|
||||
|
||||
jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
|
||||
jButton1.setName("jButton1"); // NOI18N
|
||||
|
||||
jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
|
||||
jButton2.setName("jButton2"); // NOI18N
|
||||
|
||||
jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
jPanel1.setName("jPanel1"); // NOI18N
|
||||
|
||||
jSpinner1.setName("jSpinner1"); // NOI18N
|
||||
|
||||
jSpinner2.setName("jSpinner2"); // NOI18N
|
||||
|
||||
jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
|
||||
jLabel2.setName("jLabel2"); // NOI18N
|
||||
|
||||
jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
|
||||
jLabel3.setName("jLabel3"); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addGap(19, 19, 19)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(jLabel3))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(28, 28, 28))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel3))
|
||||
.addContainerGap(24, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
|
||||
jSeparator1.setName("jSeparator1"); // NOI18N
|
||||
|
||||
jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
|
||||
jSeparator2.setName("jSeparator2"); // NOI18N
|
||||
|
||||
jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
jPanel2.setName("jPanel2"); // NOI18N
|
||||
|
||||
jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
|
||||
jLabel4.setName("jLabel4"); // NOI18N
|
||||
|
||||
jSpinner3.setName("jSpinner3"); // NOI18N
|
||||
|
||||
jSpinner4.setName("jSpinner4"); // NOI18N
|
||||
|
||||
jSpinner5.setName("jSpinner5"); // NOI18N
|
||||
|
||||
jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
|
||||
jLabel5.setName("jLabel5"); // NOI18N
|
||||
|
||||
jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
|
||||
jLabel6.setName("jLabel6"); // NOI18N
|
||||
|
||||
jSeparator4.setName("jSeparator4"); // NOI18N
|
||||
|
||||
jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
|
||||
jCheckBox1.setName("jCheckBox1"); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||
jPanel2.setLayout(jPanel2Layout);
|
||||
jPanel2Layout.setHorizontalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGap(50, 50, 50)
|
||||
.addComponent(jLabel4)
|
||||
.addContainerGap())
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel5)
|
||||
.addComponent(jLabel6))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 122, Short.MAX_VALUE))
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jCheckBox1))
|
||||
.addGap(59, 59, 59)))
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSpinner5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(27, 27, 27))
|
||||
);
|
||||
jPanel2Layout.setVerticalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLabel4)
|
||||
.addGap(22, 22, 22)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jSpinner4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel6))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jSpinner5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jCheckBox1))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
jPanel3.setName("jPanel3"); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 276, Short.MAX_VALUE)
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 141, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
|
||||
mainPanel.setLayout(mainPanelLayout);
|
||||
mainPanelLayout.setHorizontalGroup(
|
||||
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mainPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mainPanelLayout.createSequentialGroup()
|
||||
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()
|
||||
.addComponent(jButton1)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jButton2)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 327, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(57, 57, 57)
|
||||
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 11, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(176, 176, 176))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(289, 289, 289))))
|
||||
);
|
||||
mainPanelLayout.setVerticalGroup(
|
||||
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mainPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jLabel1)
|
||||
.addGap(26, 26, 26)
|
||||
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
|
||||
.addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
|
||||
.addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButton1)
|
||||
.addComponent(jButton2))
|
||||
.addGap(21, 21, 21)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 897, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 548, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
new Ramka().setVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JButton jButton2;
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JSeparator jSeparator1;
|
||||
private javax.swing.JSeparator jSeparator2;
|
||||
private javax.swing.JSeparator jSeparator3;
|
||||
private javax.swing.JSeparator jSeparator4;
|
||||
private javax.swing.JSpinner jSpinner1;
|
||||
private javax.swing.JSpinner jSpinner2;
|
||||
private javax.swing.JSpinner jSpinner3;
|
||||
private javax.swing.JSpinner jSpinner4;
|
||||
private javax.swing.JSpinner jSpinner5;
|
||||
private javax.swing.JPanel mainPanel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
|
@ -1,232 +0,0 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" resourceKey="title"/>
|
||||
<Property name="modal" type="boolean" value="true"/>
|
||||
<Property name="name" type="java.lang.String" value="aboutBox" noResource="true"/>
|
||||
<Property name="resizable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="imageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="appTitleLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="342" max="32767" attributes="0"/>
|
||||
<Component id="closeButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
||||
<Component id="versionLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="appVersionLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="homepageLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="vendorLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="imageLabel" min="-2" pref="284" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="appTitleLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" pref="29" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
|
||||
<Component id="homepageLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="appVersionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="versionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="20" max="32767" attributes="0"/>
|
||||
<Component id="vendorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="closeButton" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="closeButton">
|
||||
<Properties>
|
||||
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
|
||||
<action class="winda.gui.WindaAboutBox" id="closeAboutBox" methodName="closeAboutBox"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="closeButton" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="appTitleLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="appTitleLabel" property="font" relativeSize="true" size="4"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="Application.title"/>
|
||||
<Property name="name" type="java.lang.String" value="appTitleLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="versionLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="versionLabel" property="font" relativeSize="true" size="0"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="versionLabel.text"/>
|
||||
<Property name="name" type="java.lang.String" value="versionLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="appVersionLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="Application.version"/>
|
||||
<Property name="name" type="java.lang.String" value="appVersionLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="vendorLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="vendorLabel" property="font" relativeSize="true" size="0"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="vendorLabel.text"/>
|
||||
<Property name="name" type="java.lang.String" value="vendorLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="homepageLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="homepageLabel" property="font" relativeSize="true" size="0"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="homepageLabel.text"/>
|
||||
<Property name="name" type="java.lang.String" value="homepageLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="imageLabel">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" resourceKey="imageLabel.icon"/>
|
||||
<Property name="name" type="java.lang.String" value="imageLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="WindaAboutBox_imageLabel"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel3.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel4.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel5.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel5" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel6.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel6" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel7.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel7" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
|
@ -1,175 +0,0 @@
|
|||
/*
|
||||
* WindaAboutBox.java
|
||||
*/
|
||||
|
||||
package winda.gui;
|
||||
|
||||
import org.jdesktop.application.Action;
|
||||
|
||||
public class WindaAboutBox extends javax.swing.JDialog {
|
||||
|
||||
public WindaAboutBox(java.awt.Frame parent) {
|
||||
super(parent);
|
||||
initComponents();
|
||||
getRootPane().setDefaultButton(closeButton);
|
||||
}
|
||||
|
||||
@Action public void closeAboutBox() {
|
||||
dispose();
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
closeButton = new javax.swing.JButton();
|
||||
javax.swing.JLabel appTitleLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel versionLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel appVersionLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel vendorLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel homepageLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel imageLabel = new javax.swing.JLabel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(winda.gui.WindaApp.class).getContext().getResourceMap(WindaAboutBox.class);
|
||||
setTitle(resourceMap.getString("title")); // NOI18N
|
||||
setModal(true);
|
||||
setName("aboutBox"); // NOI18N
|
||||
setResizable(false);
|
||||
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(winda.gui.WindaApp.class).getContext().getActionMap(WindaAboutBox.class, this);
|
||||
closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
|
||||
closeButton.setName("closeButton"); // NOI18N
|
||||
|
||||
appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4));
|
||||
appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N
|
||||
appTitleLabel.setName("appTitleLabel"); // NOI18N
|
||||
|
||||
versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD));
|
||||
versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N
|
||||
versionLabel.setName("versionLabel"); // NOI18N
|
||||
|
||||
appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N
|
||||
appVersionLabel.setName("appVersionLabel"); // NOI18N
|
||||
|
||||
vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD));
|
||||
vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N
|
||||
vendorLabel.setName("vendorLabel"); // NOI18N
|
||||
|
||||
homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD));
|
||||
homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N
|
||||
homepageLabel.setName("homepageLabel"); // NOI18N
|
||||
|
||||
imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon")); // NOI18N
|
||||
imageLabel.setName("imageLabel"); // NOI18N
|
||||
|
||||
jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
|
||||
jLabel1.setName("jLabel1"); // NOI18N
|
||||
|
||||
jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
|
||||
jLabel2.setName("jLabel2"); // NOI18N
|
||||
|
||||
jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
|
||||
jLabel3.setName("jLabel3"); // NOI18N
|
||||
|
||||
jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
|
||||
jLabel4.setName("jLabel4"); // NOI18N
|
||||
|
||||
jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
|
||||
jLabel5.setName("jLabel5"); // NOI18N
|
||||
|
||||
jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
|
||||
jLabel6.setName("jLabel6"); // NOI18N
|
||||
|
||||
jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
|
||||
jLabel7.setName("jLabel7"); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(imageLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel7)
|
||||
.addComponent(appTitleLabel)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(jLabel2)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(jLabel6)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 342, Short.MAX_VALUE)
|
||||
.addComponent(closeButton))
|
||||
.addComponent(jLabel5)
|
||||
.addComponent(jLabel4)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(4, 4, 4)
|
||||
.addComponent(versionLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(appVersionLabel))
|
||||
.addComponent(homepageLabel)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(vendorLabel))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 284, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(appTitleLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(jLabel2)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabel7)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(29, 29, 29)
|
||||
.addComponent(homepageLabel))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(appVersionLabel)
|
||||
.addComponent(versionLabel)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
|
||||
.addComponent(vendorLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel5)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(closeButton)
|
||||
.addComponent(jLabel6))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton closeButton;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JLabel jLabel7;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* WindaApp.java
|
||||
*/
|
||||
|
||||
package winda.gui;
|
||||
|
||||
import org.jdesktop.application.Application;
|
||||
import org.jdesktop.application.SingleFrameApplication;
|
||||
|
||||
/**
|
||||
* The main class of the application.
|
||||
*/
|
||||
public class WindaApp extends SingleFrameApplication {
|
||||
|
||||
/**
|
||||
* At startup create and show the main frame of the application.
|
||||
*/
|
||||
@Override protected void startup() {
|
||||
show(new WindaView(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is to initialize the specified window by injecting resources.
|
||||
* Windows shown in our application come fully initialized from the GUI
|
||||
* builder, so this additional configuration is not needed.
|
||||
*/
|
||||
@Override protected void configureWindow(java.awt.Window root) {
|
||||
}
|
||||
|
||||
/**
|
||||
* A convenient static getter for the application instance.
|
||||
* @return the instance of WindaApp
|
||||
*/
|
||||
public static WindaApp getApplication() {
|
||||
return Application.getInstance(WindaApp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Main method launching the application.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
launch(WindaApp.class, args);
|
||||
}
|
||||
}
|
|
@ -1,900 +0,0 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7">
|
||||
<NonVisualComponents>
|
||||
<Container class="javax.swing.JPanel" name="mainPanel">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="mainPanel" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel1" max="32767" attributes="1"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jButton1" min="-2" pref="81" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jButton2" pref="134" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jPanel2" alignment="0" min="0" pref="225" max="32767" attributes="1"/>
|
||||
<Component id="jPanel3" alignment="0" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator2" min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jButton3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jButton4" min="-2" pref="69" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="label1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="list1" min="-2" pref="152" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="scrollPane1" pref="403" max="32767" attributes="0"/>
|
||||
<Component id="jSlider1" alignment="0" pref="403" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator1" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="jPanel5" max="32767" attributes="1"/>
|
||||
<Component id="jPanel4" alignment="0" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="230" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="419" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jSeparator1" alignment="1" pref="550" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="1">
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="label1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="list1" pref="429" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="scrollPane1" alignment="1" pref="459" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jSlider1" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="jSeparator2" alignment="0" pref="492" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" resourceKey="jLabel1.font"/>
|
||||
<Property name="foreground" type="java.awt.Color" resourceKey="jLabel1.foreground"/>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton1" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton2" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel1" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner1" pref="69" max="32767" attributes="0"/>
|
||||
<EmptySpace min="34" pref="34" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jCheckBox2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="142" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jSpinner1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jCheckBox2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner1" noResource="true"/>
|
||||
<Property name="value" type="java.lang.Object" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="13" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jSpinner1StateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jCheckBox2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jCheckBox2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jCheckBox2" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBox2ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator1">
|
||||
<Properties>
|
||||
<Property name="orientation" type="int" value="1"/>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator2">
|
||||
<Properties>
|
||||
<Property name="orientation" type="int" value="1"/>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel2" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSeparator4" alignment="0" min="-2" pref="127" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jCheckBox1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner5" min="-2" pref="41" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" alignment="1" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="jSpinner4" alignment="1" max="32767" attributes="1"/>
|
||||
<Component id="jSpinner3" alignment="1" pref="40" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="70" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="56" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jSeparator3" alignment="1" pref="248" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButton5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jButton6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="80" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator3" min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jSeparator4" min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jCheckBox1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="25" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jButton5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel4.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator3">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner3">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner4">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner5">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner5" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel5.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel5" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel6.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel6" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator4">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jCheckBox1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jCheckBox1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jCheckBox1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton5.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton5" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton6.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton6" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[70, 23]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel3" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="80" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jSeparator5" alignment="1" pref="221" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jRadioButton1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="142" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jRadioButton2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="94" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator5" min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jRadioButton1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jRadioButton2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="17" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel7.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel7" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator5">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator5" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="jRadioButton1">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jRadioButton1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jRadioButton1" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButton1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="jRadioButton2">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jRadioButton2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jRadioButton2" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButton2ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel4" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel10" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" min="-2" pref="73" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSeparator6" alignment="0" pref="167" max="32767" attributes="0"/>
|
||||
<Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="45" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner6" min="-2" pref="71" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="44" max="-2" attributes="0"/>
|
||||
<Component id="jSpinner7" min="-2" pref="71" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator6" min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel9" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSpinner6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Component id="jLabel10" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSpinner7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel8.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel8" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator6">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator6" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel9">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel9.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel9" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner6">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner6" noResource="true"/>
|
||||
<Property name="value" type="java.lang.Object" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="1000" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jSpinner6StateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel10">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel10.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel10" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="jSpinner7">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSpinner7" noResource="true"/>
|
||||
<Property name="value" type="java.lang.Object" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="1000" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jSpinner7StateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="jButton3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton3.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton3" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jButton4.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jButton4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSlider" name="jSlider1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSlider1" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jSlider1StateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jPanel5" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jSeparator7" pref="167" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="61" max="-2" attributes="0"/>
|
||||
<Component id="jLabel11" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jLabel14" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jTextField1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jLabel12" alignment="0" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel15" pref="165" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jTextField2" pref="165" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jTextField3" pref="165" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel11" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jSeparator7" min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jTextField1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel14" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jTextField2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
<Component id="jLabel15" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jTextField3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="127" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel11">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel11.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel11" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="jSeparator7">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jSeparator7" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel12">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel12.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel12" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextField1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jTextField1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jTextField1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel13">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel13.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel13" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel14">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel14.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel14" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextField2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jTextField2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jTextField2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel15">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jLabel15.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel15" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="jTextField3">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="jTextField3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="java.awt.ScrollPane" name="scrollPane1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="scrollPane1" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="WindaView_scrollPane1"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="129"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.ScrollPaneSupportLayout"/>
|
||||
</Container>
|
||||
<Component class="java.awt.List" name="list1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="list1" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="list1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="java.awt.Label" name="label1">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="label1" noResource="true"/>
|
||||
<Property name="text" type="java.lang.String" resourceKey="label1.text"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JMenuBar" name="menuBar">
|
||||
<Properties>
|
||||
<Property name="name" type="java.lang.String" value="menuBar" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
|
||||
<Property name="useNullLayout" type="boolean" value="true"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Menu class="javax.swing.JMenu" name="fileMenu">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="fileMenu.text"/>
|
||||
<Property name="name" type="java.lang.String" value="fileMenu" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
<SubComponents>
|
||||
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem1">
|
||||
<Properties>
|
||||
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
|
||||
<KeyStroke key="Ctrl+I"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jMenuItem1.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jMenuItem1" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem1ActionPerformed"/>
|
||||
</Events>
|
||||
</MenuItem>
|
||||
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem2">
|
||||
<Properties>
|
||||
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
|
||||
<KeyStroke key="Ctrl+E"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jMenuItem2.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jMenuItem2" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem2ActionPerformed"/>
|
||||
</Events>
|
||||
</MenuItem>
|
||||
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem3">
|
||||
<Properties>
|
||||
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
|
||||
<KeyStroke key="Ctrl+W"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" resourceKey="jMenuItem3.text"/>
|
||||
<Property name="name" type="java.lang.String" value="jMenuItem3" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem3ActionPerformed"/>
|
||||
</Events>
|
||||
</MenuItem>
|
||||
<MenuItem class="javax.swing.JMenuItem" name="exitMenuItem">
|
||||
<Properties>
|
||||
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
|
||||
<action class="org.jdesktop.application.Application" id="quit" methodName="quit"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="exitMenuItem" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</MenuItem>
|
||||
</SubComponents>
|
||||
</Menu>
|
||||
<Menu class="javax.swing.JMenu" name="helpMenu">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" resourceKey="helpMenu.text"/>
|
||||
<Property name="name" type="java.lang.String" value="helpMenu" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
<SubComponents>
|
||||
<MenuItem class="javax.swing.JMenuItem" name="aboutMenuItem">
|
||||
<Properties>
|
||||
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
|
||||
<action class="winda.gui.WindaView" id="showAboutBox" methodName="showAboutBox"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="aboutMenuItem" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</MenuItem>
|
||||
</SubComponents>
|
||||
</Menu>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup1">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup2">
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="component" type="javax.swing.JComponent" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="mainPanel"/>
|
||||
</Property>
|
||||
<Property name="menuBar" type="javax.swing.JMenuBar" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="menuBar"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<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,2,61,0,0,5,13"/>
|
||||
</AuxValues>
|
||||
</Form>
|
|
@ -1,12 +0,0 @@
|
|||
# To change this template, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
jLabel1.text=Winda do przewozu os\u00f3b
|
||||
jCheckBox1.text=Zwielokrotnij podane dane
|
||||
jLabel6.text=Pietro koncowe
|
||||
jLabel5.text=Pietro pocz\u0105tkowe
|
||||
jLabel4.text=DANE PASA\u017bERA
|
||||
jLabel3.text=podaj ilo\u015b\u0107 wind
|
||||
jLabel2.text=podaj ilo\u015b\u0107 pi\u0119ter
|
||||
jButton2.text=NOWY PROJEKT
|
||||
jButton1.text=DEMO
|
|
@ -1,18 +0,0 @@
|
|||
title = About: ${Application.title} ${Application.version}
|
||||
|
||||
closeAboutBox.Action.text = &Close
|
||||
|
||||
versionLabel.text=versja
|
||||
|
||||
vendorLabel.text=Wykonali:
|
||||
|
||||
homepageLabel.text=
|
||||
#NOI18N
|
||||
imageLabel.icon=winda3 kopia.jpg
|
||||
jLabel1.text=Projekt powsta\u0142 w ramach zaliczenia przedmiotu "Systemy wbudowane czasu rzeczywistego "
|
||||
jLabel2.text=pod nadzorem dr in\u017c. Ryszarda \u0141agody.
|
||||
jLabel3.text=Przemys\u0142aw Grondek
|
||||
jLabel4.text=Micha\u0142 Ogrodowski
|
||||
jLabel5.text=Tomek Piechucki
|
||||
jLabel6.text=Ania K\u0142os
|
||||
jLabel7.text=
|
|
@ -1,11 +0,0 @@
|
|||
# Application global resources
|
||||
|
||||
Application.name = Winda
|
||||
Application.title = WINDA DO PRZEWOZU OS\u00d3B
|
||||
Application.version = 1.0
|
||||
Application.vendor = Sun Microsystems Inc.
|
||||
Application.homepage = http\://appframework.dev.java.net/
|
||||
Application.description = A simple Java desktop application based on Swing Application Framework.
|
||||
Application.vendorId = Sun
|
||||
Application.id = ${Application.name}
|
||||
Application.lookAndFeel = system
|
|
@ -1,66 +0,0 @@
|
|||
# Resources for the WindaView class
|
||||
|
||||
# top-level menus
|
||||
|
||||
fileMenu.text = File
|
||||
helpMenu.text = Help
|
||||
|
||||
# @Action resources
|
||||
|
||||
showAboutBox.Action.text = &About...
|
||||
showAboutBox.Action.shortDescription = Show the application's information dialog
|
||||
|
||||
# status bar resources
|
||||
|
||||
StatusBar.messageTimeout = 5000
|
||||
StatusBar.busyAnimationRate = 30
|
||||
StatusBar.idleIcon = busyicons/idle-icon.png
|
||||
StatusBar.busyIcons[0] = busyicons/busy-icon0.png
|
||||
StatusBar.busyIcons[1] = busyicons/busy-icon1.png
|
||||
StatusBar.busyIcons[2] = busyicons/busy-icon2.png
|
||||
StatusBar.busyIcons[3] = busyicons/busy-icon3.png
|
||||
StatusBar.busyIcons[4] = busyicons/busy-icon4.png
|
||||
StatusBar.busyIcons[5] = busyicons/busy-icon5.png
|
||||
StatusBar.busyIcons[6] = busyicons/busy-icon6.png
|
||||
StatusBar.busyIcons[7] = busyicons/busy-icon7.png
|
||||
StatusBar.busyIcons[8] = busyicons/busy-icon8.png
|
||||
StatusBar.busyIcons[9] = busyicons/busy-icon9.png
|
||||
StatusBar.busyIcons[10] = busyicons/busy-icon10.png
|
||||
StatusBar.busyIcons[11] = busyicons/busy-icon11.png
|
||||
StatusBar.busyIcons[12] = busyicons/busy-icon12.png
|
||||
StatusBar.busyIcons[13] = busyicons/busy-icon13.png
|
||||
StatusBar.busyIcons[14] = busyicons/busy-icon14.png
|
||||
jLabel1.text=WINDA DO PRZEWOZU OS\u00d3B
|
||||
jButton1.text=DEMO
|
||||
jButton2.text=NOWY PROJEKT
|
||||
jLabel2.text=podaj ilo\u015b\u0107 pi\u0119ter
|
||||
jLabel4.text=DANE PASA\u017bERA
|
||||
jLabel5.text=Pietro pocz\u0105tkowe
|
||||
jLabel6.text=Pietro koncowe
|
||||
jCheckBox1.text=zwielokrotnij dane
|
||||
jLabel7.text=ALGORYTM WINDY
|
||||
jRadioButton1.text=g\u00f3ra / d\u00f3\u0142
|
||||
jRadioButton2.text=najbli\u017csze wezwanie
|
||||
jButton3.text=START
|
||||
jButton4.text=STOP
|
||||
jLabel8.text=PARAMETRY
|
||||
jLabel9.text=czas jazdy przez pi\u0119tra ( ms) :
|
||||
jLabel10.text=czas wej / wy jednej osoby (ms):
|
||||
jLabel11.text=WYNIKI
|
||||
jLabel12.text=czas przejazdu windy (ms):
|
||||
jTextField1.text=
|
||||
jLabel13.text=
|
||||
jButton5.text=DODAJ
|
||||
jButton6.text=USU\u0143
|
||||
jMenuItem1.text=Wczytaj Pasa\u017cer\u00f3w
|
||||
jMenuItem2.text=Zapisz Pasa\u017cer\u00f3w
|
||||
jMenuItem3.text=Zapisz Log
|
||||
jLabel14.text=\u015bredni czas obs\u0142ugi pasa\u017cera (ms):
|
||||
jTextField2.text=
|
||||
jCheckBox2.text=dwie windy
|
||||
jLabel15.text=czas / pietro (ms):
|
||||
label1.text=Pasa\u017cerowie
|
||||
#NOI18N
|
||||
jLabel1.font=Tahoma-Bold-24
|
||||
#NOI18N
|
||||
jLabel1.foreground=255, 102, 255
|
Before Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 66 KiB |
|
@ -1,169 +0,0 @@
|
|||
package winda.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import sun.misc.Sort;
|
||||
|
||||
/**
|
||||
* Algortym poruszania się windą przy wsiadaniu pasażerów
|
||||
* jadących tylko w kierunku w którym porusza się winda.
|
||||
*
|
||||
* Napisane nie testowane
|
||||
*
|
||||
* @author Przemo
|
||||
*/
|
||||
public class AlgorytmGoraDol implements IAlgorytm {
|
||||
private int start_floor;
|
||||
private int floor_count;
|
||||
private ArrayList<Pietro> floors;
|
||||
private List<Pasazer> pasazerowie;
|
||||
private int acctual_floor;
|
||||
|
||||
public AlgorytmGoraDol(){
|
||||
this.start_floor = 0;
|
||||
this.floor_count = 0;
|
||||
this.floors = new ArrayList();
|
||||
}
|
||||
|
||||
public AlgorytmGoraDol(int floor_count){
|
||||
this.start_floor = 0;
|
||||
this.floor_count = floor_count;
|
||||
this.floors = new ArrayList();
|
||||
}
|
||||
|
||||
public AlgorytmGoraDol(int floor_count, int start_floor){
|
||||
this.floor_count = floor_count;
|
||||
this.start_floor = start_floor;
|
||||
this.floors = new ArrayList();
|
||||
}
|
||||
|
||||
public void setStartFloor(int start_floor){
|
||||
this.start_floor = start_floor;
|
||||
}
|
||||
|
||||
public int getStartFloor(){
|
||||
return this.start_floor;
|
||||
}
|
||||
|
||||
public void setFloorCount(int floor_count){
|
||||
System.out.println("setFloorCount ("+floor_count+")");
|
||||
this.floor_count = floor_count;
|
||||
}
|
||||
|
||||
public int getFloorCount(){
|
||||
return this.floor_count;
|
||||
}
|
||||
|
||||
private void goUp(){
|
||||
int i =0;
|
||||
ArrayList<Pietro> pietra = this.setupPietra();
|
||||
while(this.pasazerowie.get(i).GetStart()<this.acctual_floor)
|
||||
i++;
|
||||
while(i<this.pasazerowie.size()){
|
||||
if( this.pasazerowie.get(i).GetStart()<this.pasazerowie.get(i).GetStop()){
|
||||
pietra.get(this.pasazerowie.get(i).GetStart()).pasazerowieWsiadający.add(this.pasazerowie.get(i));
|
||||
pietra.get(this.pasazerowie.get(i).GetStop()).pasazerowieWysiadajacy.add(this.pasazerowie.get(i));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
this.clearPietra(pietra);
|
||||
|
||||
if(!pietra.isEmpty())
|
||||
this.floors.addAll(pietra);
|
||||
}
|
||||
|
||||
private void goDown(){
|
||||
int i =0;
|
||||
ArrayList<Pietro> pietra = this.setupPietra();
|
||||
// while(this.pasazerowie.get(i).GetStart()<this.acctual_floor)
|
||||
// i++;
|
||||
while(i<this.pasazerowie.size()){
|
||||
if( this.pasazerowie.get(i).GetStart()>this.pasazerowie.get(i).GetStop()){
|
||||
pietra.get(this.pasazerowie.get(i).GetStart()).pasazerowieWsiadający.add(this.pasazerowie.get(i));
|
||||
pietra.get(this.pasazerowie.get(i).GetStop()).pasazerowieWysiadajacy.add(this.pasazerowie.get(i));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
this.clearPietra(pietra);
|
||||
pietra = this.mirrorPietra(pietra);
|
||||
if(!pietra.isEmpty())
|
||||
this.floors.addAll(pietra);
|
||||
}
|
||||
|
||||
private ArrayList mirrorPietra(ArrayList<Pietro> pietro){
|
||||
ArrayList<Pietro> mirror = new ArrayList();
|
||||
for(int i = pietro.size()-1;i>=0;i--)
|
||||
mirror.add(pietro.get(i));
|
||||
return mirror;
|
||||
}
|
||||
|
||||
private void clearPietra(ArrayList<Pietro> pietro){
|
||||
for(int i=pietro.size()-1;i >= 0;i--){
|
||||
if(pietro.get(i).pasazerowieWsiadający.isEmpty() && pietro.get(i).pasazerowieWysiadajacy.isEmpty())
|
||||
pietro.remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Pietro> setCourse(){
|
||||
this.calculateFloors();
|
||||
|
||||
PasazerSort sort = new PasazerSort(this.pasazerowie);
|
||||
sort.sortByStart();
|
||||
this.acctual_floor = this.start_floor;
|
||||
|
||||
this.goUp();
|
||||
this.goDown();
|
||||
return this.floors;
|
||||
}
|
||||
|
||||
public List<Pietro> Trasa(List<Pasazer> pasazerowie) {
|
||||
this.pasazerowie = pasazerowie;
|
||||
return this.setCourse();
|
||||
}
|
||||
|
||||
public void SetMaxPietro(int maxPietro) {
|
||||
this.setFloorCount(floor_count+1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fix for wrong number of floors
|
||||
*/
|
||||
private void calculateFloors(){
|
||||
for(int i=0;i<this.pasazerowie.size();i++){
|
||||
if(this.pasazerowie.get(i).GetStart()>this.floor_count)
|
||||
this.floor_count = this.pasazerowie.get(i).GetStart();
|
||||
if(this.pasazerowie.get(i).GetStop()>this.floor_count)
|
||||
this.floor_count = this.pasazerowie.get(i).GetStop();
|
||||
}
|
||||
this.floor_count++;
|
||||
}
|
||||
|
||||
private ArrayList<Pietro> setupPietra(){
|
||||
ArrayList<Pietro> pietra = new ArrayList();
|
||||
for(int i=0;i<this.floor_count;i++){
|
||||
Pietro tmp = new Pietro();
|
||||
tmp.numerPietra = i;
|
||||
pietra.add(tmp);
|
||||
}
|
||||
return pietra;
|
||||
}
|
||||
|
||||
public List<List<Pietro>> TrasaDwieWindy(List<Pasazer> pasazerowie) {
|
||||
//Zakładam że winda pierwsza (index 0 w List<List<Pietro>> trasa) stoi na dole i jedzie w górę,
|
||||
//a winda druga (index 1 w List<List<Pietro>> trasa) stoi na górze i jedzie na dół
|
||||
List<List<Pietro>> trasa = new ArrayList<List<Pietro>>();
|
||||
List<Pasazer> pasazerowieJadacyWGore = new ArrayList<Pasazer>();
|
||||
List<Pasazer> pasazerowieJadacyWDol = new ArrayList<Pasazer>();
|
||||
|
||||
for(Pasazer p : pasazerowie)
|
||||
if(p.GetStart() < p.GetStop())
|
||||
pasazerowieJadacyWGore.add(p);
|
||||
else
|
||||
pasazerowieJadacyWDol.add(p);
|
||||
|
||||
trasa.add(this.Trasa(pasazerowieJadacyWGore));
|
||||
trasa.add(this.Trasa(pasazerowieJadacyWDol));
|
||||
|
||||
return trasa;
|
||||
}
|
||||
}
|
|
@ -1,311 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
|
||||
public class AlgorytmNajblizszeWezwanie implements IAlgorytm{
|
||||
private int aktualnePietro = 0;
|
||||
private int maxPietro;
|
||||
private boolean kierunekJazdy = true; //true - gora, false - dol
|
||||
private List<Pasazer> pasazerowie;
|
||||
private List<Pasazer> pozostaliPasazerowie = new ArrayList<Pasazer>();
|
||||
private List<Pietro> trasa = new ArrayList<Pietro>();
|
||||
|
||||
public List<Pietro> Trasa(List<Pasazer> pasazerowie) {
|
||||
this.pasazerowie = pasazerowie;
|
||||
for (Pasazer p : pasazerowie)
|
||||
this.pozostaliPasazerowie.add(new Pasazer(p.GetName(), p.GetStart(), p.GetStop()));
|
||||
|
||||
while (this.pozostaliPasazerowie.size() > 0) {
|
||||
Pietro pietro = new Pietro();
|
||||
pietro.numerPietra = this.aktualnePietro;
|
||||
List<Pasazer> tmpPasazerowie = new ArrayList<Pasazer>();
|
||||
|
||||
for(Pasazer p : this.pasazerowie)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
{
|
||||
boolean isIn = false;
|
||||
for(Pietro pi : this.trasa)
|
||||
for(Pasazer pw : pi.pasazerowieWsiadający)
|
||||
if(pw.GetName() == p.GetName())
|
||||
isIn = true;
|
||||
if(!isIn && p.GetName() == pp.GetName() && p.GetStart() == this.aktualnePietro)
|
||||
tmpPasazerowie.add(p);
|
||||
}
|
||||
|
||||
pietro.pasazerowieWsiadający = tmpPasazerowie;
|
||||
|
||||
tmpPasazerowie = new ArrayList<Pasazer>();
|
||||
List<Pasazer> doUsuniecia = new ArrayList<Pasazer>();
|
||||
for(Pietro p : this.trasa)
|
||||
for(Pasazer pasazer : p.pasazerowieWsiadający)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(pasazer.GetName() == pp.GetName() && pasazer.GetStop() == this.aktualnePietro) {
|
||||
tmpPasazerowie.add(pasazer);
|
||||
doUsuniecia.add(pp);
|
||||
}
|
||||
|
||||
pietro.pasazerowieWysiadajacy = tmpPasazerowie;
|
||||
this.pozostaliPasazerowie.removeAll(doUsuniecia);
|
||||
this.trasa.add(pietro);
|
||||
int nastepnePietro;
|
||||
boolean pustaWinda = true;
|
||||
if(this.kierunekJazdy)
|
||||
nastepnePietro = this.maxPietro;
|
||||
else
|
||||
nastepnePietro = 0;
|
||||
for(Pietro p : this.trasa)
|
||||
for(Pasazer pasazer : p.pasazerowieWsiadający)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(pasazer.GetName() == pp.GetName()){
|
||||
pustaWinda = false;
|
||||
if(this.kierunekJazdy && pasazer.GetStop() > this.aktualnePietro && pasazer.GetStop() < nastepnePietro)
|
||||
nastepnePietro = pasazer.GetStop();
|
||||
else if(!this.kierunekJazdy && pasazer.GetStop() < this.aktualnePietro && pasazer.GetStop() > nastepnePietro)
|
||||
nastepnePietro = pasazer.GetStop();
|
||||
}
|
||||
|
||||
if(pustaWinda){
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(this.kierunekJazdy && pp.GetStart() > this.aktualnePietro && pp.GetStart() < nastepnePietro)
|
||||
nastepnePietro = pp.GetStart();
|
||||
else if(!this.kierunekJazdy && pp.GetStart() < this.aktualnePietro && pp.GetStart() > nastepnePietro)
|
||||
nastepnePietro = pp.GetStart();
|
||||
}
|
||||
this.aktualnePietro = nastepnePietro;
|
||||
if(this.aktualnePietro == this.maxPietro)
|
||||
this.kierunekJazdy = false;
|
||||
else if(this.aktualnePietro == 0)
|
||||
this.kierunekJazdy = true;
|
||||
}
|
||||
for(int i = 1; i < trasa.size()-1; i++){
|
||||
if(trasa.get(i).pasazerowieWsiadający.isEmpty() && trasa.get(i).pasazerowieWysiadajacy.isEmpty()){
|
||||
trasa.remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
return trasa;
|
||||
}
|
||||
|
||||
public void SetMaxPietro(int maxPietro) {
|
||||
this.maxPietro = maxPietro;
|
||||
}
|
||||
|
||||
public static void main(String [] args){
|
||||
List<Pasazer> pasazerowie = new ArrayList();
|
||||
Parser p = new Parser();
|
||||
//pasazerowie = p.Wczytaj("c:\\DemoDane.txt");
|
||||
AlgorytmNajblizszeWezwanie anw = new AlgorytmNajblizszeWezwanie();
|
||||
anw.SetMaxPietro(12);
|
||||
|
||||
Pasazer p1=new Pasazer(1,2,7);
|
||||
Pasazer p2=new Pasazer(2,8,2);
|
||||
Pasazer p3=new Pasazer(3,6,3);
|
||||
Pasazer p4=new Pasazer(4,2,6);
|
||||
Pasazer p5=new Pasazer(5,11,5);
|
||||
Pasazer p6=new Pasazer(6,10,2);
|
||||
pasazerowie.add(p1);pasazerowie.add(p2);pasazerowie.add(p3);
|
||||
pasazerowie.add(p4);pasazerowie.add(p5);pasazerowie.add(p6);
|
||||
AlgorytmNajblizszeWezwanie nw = new AlgorytmNajblizszeWezwanie();
|
||||
nw.trasa = anw.Trasa(pasazerowie);
|
||||
nw.SetMaxPietro(12);
|
||||
|
||||
for(int i = 0; i<nw.trasa.size(); i++){
|
||||
System.out.println("P: "+nw.trasa.get(i).numerPietra);
|
||||
for(int j=0; j < nw.trasa.get(i).pasazerowieWsiadający.size();j++){
|
||||
System.out.print("Ws: "+nw.trasa.get(i).pasazerowieWsiadający.get(j).GetName());
|
||||
}
|
||||
for(int j=0; j < nw.trasa.get(i).pasazerowieWysiadajacy.size();j++){
|
||||
System.out.print("Wy: "+nw.trasa.get(i).pasazerowieWysiadajacy.get(j).GetName());
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
List<List<Pietro>> tr = nw.TrasaDwieWindy(pasazerowie);
|
||||
}
|
||||
|
||||
public List<List<Pietro>> TrasaDwieWindy(List<Pasazer> pasazerowie) {
|
||||
this.pasazerowie = pasazerowie;
|
||||
List<List<Pietro>> tr = new ArrayList<List<Pietro>>();
|
||||
List<Pietro> trasa1 = new ArrayList<Pietro>(); //trasa windy pierwszej
|
||||
List<Pietro> trasa2 = new ArrayList<Pietro>(); //trasa windy drugiej
|
||||
List<Pasazer> pozostaliPasazerowie1 = new ArrayList<Pasazer>();
|
||||
List<Pasazer> pozostaliPasazerowie2 = new ArrayList<Pasazer>();
|
||||
int aktualnePietro1 = 0;
|
||||
int aktualnePietro2 = 0;
|
||||
boolean kierunekJazdy1 = true;
|
||||
boolean kierunekJazdy2 = true;
|
||||
|
||||
|
||||
for (Pasazer p : pasazerowie)
|
||||
this.pozostaliPasazerowie.add(new Pasazer(p.GetName(), p.GetStart(), p.GetStop()));
|
||||
for (Pasazer p : pasazerowie)
|
||||
pozostaliPasazerowie1.add(new Pasazer(p.GetName(), p.GetStart(), p.GetStop()));
|
||||
for (Pasazer p : pasazerowie)
|
||||
pozostaliPasazerowie2.add(new Pasazer(p.GetName(), p.GetStart(), p.GetStop()));
|
||||
|
||||
while (this.pozostaliPasazerowie.size() > 0) {
|
||||
Pietro pietro1 = new Pietro();
|
||||
pietro1.numerPietra = aktualnePietro1;
|
||||
List<Pasazer> tmpPasazerowie1 = new ArrayList<Pasazer>();
|
||||
|
||||
List<Pasazer> weszli1 = new ArrayList<Pasazer>();
|
||||
for(Pasazer p : this.pasazerowie)
|
||||
for (Pasazer pp1 : pozostaliPasazerowie1)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
{
|
||||
boolean isIn = false;
|
||||
for(Pietro pi : trasa1)
|
||||
for(Pasazer pw : pi.pasazerowieWsiadający)
|
||||
if(pw.GetName() == p.GetName())
|
||||
isIn = true;
|
||||
if(!isIn && p.GetName() == pp.GetName() && p.GetName() == pp1.GetName() && p.GetStart() == aktualnePietro1)
|
||||
tmpPasazerowie1.add(p);
|
||||
}
|
||||
|
||||
for (Pasazer pp : pozostaliPasazerowie2)
|
||||
for (Pasazer p : tmpPasazerowie1)
|
||||
if(p.GetName() == pp.GetName())
|
||||
weszli1.add(pp);
|
||||
pietro1.pasazerowieWsiadający = tmpPasazerowie1;
|
||||
pozostaliPasazerowie2.removeAll(weszli1);
|
||||
|
||||
tmpPasazerowie1 = new ArrayList<Pasazer>();
|
||||
List<Pasazer> doUsuniecia1 = new ArrayList<Pasazer>();
|
||||
for(Pietro p : trasa1)
|
||||
for(Pasazer pasazer : p.pasazerowieWsiadający)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(pasazer.GetName() == pp.GetName() && pasazer.GetStop() == aktualnePietro1) {
|
||||
tmpPasazerowie1.add(pasazer);
|
||||
doUsuniecia1.add(pp);
|
||||
}
|
||||
|
||||
pietro1.pasazerowieWysiadajacy = tmpPasazerowie1;
|
||||
this.pozostaliPasazerowie.removeAll(doUsuniecia1);
|
||||
trasa1.add(pietro1);
|
||||
int nastepnePietro1;
|
||||
boolean pustaWinda1 = true;
|
||||
if(kierunekJazdy1)
|
||||
nastepnePietro1 = this.maxPietro;
|
||||
else
|
||||
nastepnePietro1 = 0;
|
||||
for(Pietro p : trasa1)
|
||||
for(Pasazer pasazer : p.pasazerowieWsiadający)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(pasazer.GetName() == pp.GetName()){
|
||||
pustaWinda1 = false;
|
||||
if(kierunekJazdy1 && pasazer.GetStop() > aktualnePietro1 && pasazer.GetStop() < nastepnePietro1)
|
||||
nastepnePietro1 = pasazer.GetStop();
|
||||
else if(!kierunekJazdy1 && pasazer.GetStop() < aktualnePietro1 && pasazer.GetStop() > nastepnePietro1)
|
||||
nastepnePietro1 = pasazer.GetStop();
|
||||
}
|
||||
|
||||
if(pustaWinda1){
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(kierunekJazdy1 && pp.GetStart() > aktualnePietro1 && pp.GetStart() < nastepnePietro1)
|
||||
nastepnePietro1 = pp.GetStart();
|
||||
else if(!kierunekJazdy1 && pp.GetStart() < aktualnePietro1 && pp.GetStart() > nastepnePietro1)
|
||||
nastepnePietro1 = pp.GetStart();
|
||||
}
|
||||
aktualnePietro1 = nastepnePietro1;
|
||||
if(aktualnePietro1 == this.maxPietro)
|
||||
kierunekJazdy1 = false;
|
||||
else if(aktualnePietro1 == 0)
|
||||
kierunekJazdy1 = true;
|
||||
|
||||
Pietro pietro2 = new Pietro();
|
||||
pietro2.numerPietra = aktualnePietro2;
|
||||
List<Pasazer> tmpPasazerowie2 = new ArrayList<Pasazer>();
|
||||
|
||||
for(Pasazer p : this.pasazerowie)
|
||||
for(Pasazer pp2 : pozostaliPasazerowie2)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
{
|
||||
boolean isIn = false;
|
||||
for(Pietro pi : trasa2)
|
||||
for(Pasazer pw : pi.pasazerowieWsiadający)
|
||||
if(pw.GetName() == p.GetName())
|
||||
isIn = true;
|
||||
if(!isIn && p.GetName() == pp.GetName() && p.GetName() == pp2.GetName() && p.GetStart() == aktualnePietro2)
|
||||
tmpPasazerowie2.add(p);
|
||||
}
|
||||
|
||||
List<Pasazer> weszli2 = new ArrayList<Pasazer>();
|
||||
for (Pasazer pp : pozostaliPasazerowie2)
|
||||
for (Pasazer p : tmpPasazerowie1)
|
||||
if(p.GetName() == pp.GetName())
|
||||
weszli2.add(pp);
|
||||
pietro2.pasazerowieWsiadający = tmpPasazerowie2;
|
||||
pozostaliPasazerowie1.removeAll(weszli2);
|
||||
|
||||
tmpPasazerowie2 = new ArrayList<Pasazer>();
|
||||
List<Pasazer> doUsuniecia2 = new ArrayList<Pasazer>();
|
||||
for(Pietro p : trasa2)
|
||||
for(Pasazer pasazer : p.pasazerowieWsiadający)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(pasazer.GetName() == pp.GetName() && pasazer.GetStop() == aktualnePietro2) {
|
||||
tmpPasazerowie2.add(pasazer);
|
||||
doUsuniecia2.add(pp);
|
||||
}
|
||||
|
||||
pietro2.pasazerowieWysiadajacy = tmpPasazerowie2;
|
||||
this.pozostaliPasazerowie.removeAll(doUsuniecia2);
|
||||
trasa2.add(pietro2);
|
||||
int nastepnePietro2;
|
||||
boolean pustaWinda2 = true;
|
||||
if(kierunekJazdy2)
|
||||
nastepnePietro2 = this.maxPietro;
|
||||
else
|
||||
nastepnePietro2 = 0;
|
||||
for(Pietro p : trasa2)
|
||||
for(Pasazer pasazer : p.pasazerowieWsiadający)
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(pasazer.GetName() == pp.GetName()){
|
||||
pustaWinda2 = false;
|
||||
if(kierunekJazdy2 && pasazer.GetStop() > aktualnePietro2 && pasazer.GetStop() < nastepnePietro2)
|
||||
nastepnePietro2 = pasazer.GetStop();
|
||||
else if(!kierunekJazdy2 && pasazer.GetStop() < aktualnePietro2 && pasazer.GetStop() > nastepnePietro2)
|
||||
nastepnePietro2 = pasazer.GetStop();
|
||||
}
|
||||
|
||||
if(pustaWinda2){
|
||||
for(Pasazer pp : this.pozostaliPasazerowie)
|
||||
if(kierunekJazdy2 && pp.GetStart() > aktualnePietro2 && pp.GetStart() < nastepnePietro2)
|
||||
nastepnePietro2 = pp.GetStart();
|
||||
else if(!kierunekJazdy2 && pp.GetStart() < aktualnePietro2 && pp.GetStart() > nastepnePietro2)
|
||||
nastepnePietro2 = pp.GetStart();
|
||||
}
|
||||
aktualnePietro2 = nastepnePietro2;
|
||||
if(aktualnePietro2 == this.maxPietro)
|
||||
kierunekJazdy2 = false;
|
||||
else if(aktualnePietro2 == 0)
|
||||
kierunekJazdy2 = true;
|
||||
}
|
||||
List<Pietro> toRemove1 = new ArrayList<Pietro>();
|
||||
for(int i = 1; i < trasa1.size()-1; i++)
|
||||
if(trasa1.get(i).pasazerowieWsiadający.isEmpty() && trasa1.get(i).pasazerowieWysiadajacy.isEmpty())
|
||||
toRemove1.add(trasa1.get(i));
|
||||
List<Pietro> toRemove2 = new ArrayList<Pietro>();
|
||||
for(int i = 1; i < trasa2.size()-1; i++)
|
||||
if(trasa2.get(i).pasazerowieWsiadający.isEmpty() && trasa2.get(i).pasazerowieWysiadajacy.isEmpty())
|
||||
toRemove2.add(trasa2.get(i));
|
||||
|
||||
trasa1.removeAll(toRemove1);
|
||||
trasa2.removeAll(toRemove2);
|
||||
|
||||
tr.add(trasa1);
|
||||
tr.add(trasa2);
|
||||
|
||||
return tr;
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
public interface IAlgorytm {
|
||||
public List<Pietro> Trasa(List<Pasazer> pasazerowie);
|
||||
public List<List<Pietro>> TrasaDwieWindy(List<Pasazer> pasazerowie);
|
||||
public void SetMaxPietro(int maxPietro);
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
public class Logger {
|
||||
public Logger (List<Pietro> trasa){
|
||||
for(Pietro pietro : trasa)
|
||||
{
|
||||
for(Pasazer pasazer : pietro.pasazerowieWysiadajacy)
|
||||
log.add("Na Piętrze " + pietro.numerPietra + " wysiadł pasażer " + pasazer.GetName());
|
||||
for(Pasazer pasazer : pietro.pasazerowieWsiadający)
|
||||
log.add("Na Piętrze " + pietro.numerPietra + " wsiadł pasażer " + pasazer.GetName());
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveLog(String filename){
|
||||
FileWriter fw = null;
|
||||
try {
|
||||
fw = new FileWriter(filename);
|
||||
for (String s : log)
|
||||
fw.write(s+'\r'+'\n');
|
||||
fw.close();
|
||||
} catch (IOException ex) {
|
||||
java.util.logging.Logger.getLogger(Parser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> log = new ArrayList<String>();
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
public class Parser {
|
||||
|
||||
public List<Pasazer> Wczytaj(String filename){
|
||||
try {
|
||||
List<Pasazer> pasazerowie = new ArrayList<Pasazer>();
|
||||
FileReader fr = new FileReader(filename);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
String s;
|
||||
|
||||
while((s = br.readLine()) != null){
|
||||
String [] st = null;
|
||||
st = s.split(" ");
|
||||
pasazerowie.add(new Pasazer(pasazerowie.size()+1, Integer.parseInt(st[0]), Integer.parseInt(st[1])));
|
||||
}
|
||||
|
||||
fr.close();
|
||||
return pasazerowie;
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Parser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Zapisz(String filename, List<Pasazer> pasazerowie){
|
||||
FileWriter fw = null;
|
||||
try {
|
||||
fw = new FileWriter(filename);
|
||||
for (Pasazer ps : pasazerowie) {
|
||||
fw.write(ps.GetStart() + " " + ps.GetStop() + '\r'+'\n');
|
||||
}
|
||||
fw.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Parser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
try {
|
||||
fw.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Parser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//Do testów
|
||||
//plik odczytu z args
|
||||
//Przykładowy plik dodałem do svn w głównym katalogu projektu
|
||||
//nazywa się DemoDane.txt
|
||||
//Składnia pliku to:
|
||||
//Pietro_startowe spacja pietro_koncowe koniec lini
|
||||
System.out.println("Wczytywanie pliku " + args[0]);
|
||||
Parser p = new Parser();
|
||||
List<Pasazer> pasazerowie = null;
|
||||
pasazerowie = p.Wczytaj(args[0]);
|
||||
System.out.println(pasazerowie.size());
|
||||
for(Pasazer ps: pasazerowie){
|
||||
System.out.println("Pasazer " + ps.GetName() + ": " + ps.GetStart() + " " + ps.GetStop());
|
||||
}
|
||||
|
||||
System.out.println("Zapisywanie do pliku test.txt");
|
||||
p.Zapisz("test.txt", pasazerowie);
|
||||
pasazerowie = p.Wczytaj("test.txt");
|
||||
System.out.println(pasazerowie.size());
|
||||
for(Pasazer ps: pasazerowie){
|
||||
System.out.println("Pasazer " + ps.GetName() + ": " + ps.GetStart() + " " + ps.GetStop());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
public class Pasazer {
|
||||
private int start;
|
||||
private int stop;
|
||||
private int name;
|
||||
|
||||
public Pasazer(int name, int start, int stop) {
|
||||
this.name = name;
|
||||
this.start = start;
|
||||
this.stop = stop;
|
||||
}
|
||||
|
||||
public int GetName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public int GetStart() {
|
||||
return this.start;
|
||||
}
|
||||
|
||||
public int GetStop() {
|
||||
return this.stop;
|
||||
}
|
||||
|
||||
public void SetStart(int start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public void SetStop(int stop) {
|
||||
this.stop = stop;
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Sortowanie pasażerów oparta o quicksort
|
||||
* @author nerull7
|
||||
*/
|
||||
public class PasazerSort {
|
||||
List<Pasazer> array;
|
||||
|
||||
public PasazerSort(List<Pasazer> array){
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
private int splitByStart(int start, int end){
|
||||
int i,j;
|
||||
|
||||
for( i = 1+ (j = start);i<end;i++)
|
||||
if(this.array.get(i).GetStart()<this.array.get(start).GetStart()){
|
||||
Pasazer tmp = this.array.get(++j);
|
||||
this.array.set(j, this.array.get(i));
|
||||
this.array.set(i, tmp);
|
||||
}
|
||||
|
||||
Pasazer tmp = this.array.get(start);
|
||||
this.array.set(start, this.array.get(j));
|
||||
this.array.set(j, tmp);
|
||||
|
||||
return j;
|
||||
}
|
||||
|
||||
private void mksortByStart(int start, int end){
|
||||
if( start < end ){
|
||||
int tmp = this.splitByStart( start, end );
|
||||
this.mksortByStart( start, tmp );
|
||||
this.mksortByStart( tmp+1, end );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* QuickSort pasażerów po numerze piętra na którym wsiadają.
|
||||
*/
|
||||
|
||||
public void sortByStart(){
|
||||
this.mksortByStart( 0, this.array.size()-1 );
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
public class Pietro {
|
||||
public List<Pasazer> pasazerowieWsiadający = new ArrayList();
|
||||
public List<Pasazer> pasazerowieWysiadajacy = new ArrayList();
|
||||
public int numerPietra;
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package winda.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Tomek
|
||||
*/
|
||||
public class Winda {
|
||||
private IAlgorytm AlgorytmWindy;
|
||||
private double CzasJazdyPietro;
|
||||
private double CzasJazdy;
|
||||
private double CzasWeWyOsoby;
|
||||
private double CzasSredniObslugi;
|
||||
private double CzasPietra;
|
||||
private int IloscPieter;
|
||||
private int IloscPasazerow;
|
||||
private List<Pasazer> pasazerowieCollection = new ArrayList<Pasazer>();
|
||||
private Parser parser = new Parser();
|
||||
private List<Pietro> Trasa;
|
||||
private List<Pietro> TrasaDwa;
|
||||
private boolean DwieWindy = false;
|
||||
private Logger log;
|
||||
|
||||
public Winda(){
|
||||
AlgorytmWindy = new AlgorytmGoraDol();
|
||||
CzasJazdyPietro = 1000;
|
||||
CzasWeWyOsoby = 1000;
|
||||
IloscPieter = 12;
|
||||
AlgorytmWindy.SetMaxPietro(IloscPieter);
|
||||
pasazerowieCollection = parser.Wczytaj("c:\\DemoDane.txt");
|
||||
IloscPasazerow = pasazerowieCollection.size();
|
||||
this.Trasa = new ArrayList();
|
||||
}
|
||||
|
||||
public void SetCzasJazdyPietro(double czas){
|
||||
this.CzasJazdyPietro = czas;
|
||||
}
|
||||
|
||||
public void SetDwieWindy (){
|
||||
this.DwieWindy = true;
|
||||
}
|
||||
|
||||
public void SetJednaWindy (){
|
||||
this.DwieWindy = false;
|
||||
}
|
||||
|
||||
public void SetCzasWeWyOsoby(double czas){
|
||||
this.CzasWeWyOsoby = czas;
|
||||
}
|
||||
|
||||
public void SetGoraDol(){
|
||||
this.AlgorytmWindy = new AlgorytmGoraDol();
|
||||
}
|
||||
|
||||
public void SetNajblizszeWzwanie(){
|
||||
this.AlgorytmWindy = new AlgorytmNajblizszeWezwanie();
|
||||
}
|
||||
|
||||
public void SetIloscPieter(int iloscPieter){
|
||||
this.IloscPieter = iloscPieter;
|
||||
}
|
||||
|
||||
public void SetNowyProjekt(){
|
||||
this.pasazerowieCollection = new ArrayList<Pasazer>();
|
||||
IloscPasazerow = 0;
|
||||
}
|
||||
|
||||
public void AddPasazer(int start, int stop){
|
||||
IloscPasazerow++;
|
||||
this.getPasazerowieCollection().add(new Pasazer(IloscPasazerow, start, stop));
|
||||
}
|
||||
|
||||
public double GetCzasJazdy(){
|
||||
return this.CzasJazdy;
|
||||
}
|
||||
|
||||
public double GetCzasSredniObslugi(){
|
||||
return this.CzasSredniObslugi;
|
||||
}
|
||||
|
||||
public double GetCzasPietra(){
|
||||
return this.CzasPietra;
|
||||
}
|
||||
|
||||
public List<Pietro> GetTrasa(){
|
||||
return this.Trasa;
|
||||
}
|
||||
|
||||
public List<Pietro> GetTrasaDwa(){
|
||||
return this.TrasaDwa;
|
||||
}
|
||||
|
||||
public void ZapiszPasazerow(String filename){
|
||||
parser.Zapisz(filename, getPasazerowieCollection());
|
||||
}
|
||||
|
||||
public void WczytajPasazerow(String filename){
|
||||
this.pasazerowieCollection = new ArrayList<Pasazer>();
|
||||
pasazerowieCollection = parser.Wczytaj(filename);
|
||||
IloscPasazerow = getPasazerowieCollection().size();
|
||||
}
|
||||
|
||||
public void ZapiszLog(String filename){
|
||||
log.SaveLog(filename);
|
||||
}
|
||||
|
||||
public void Start(){
|
||||
AlgorytmWindy.SetMaxPietro(IloscPieter);
|
||||
Trasa.clear();
|
||||
if (DwieWindy){
|
||||
List<List<Pietro>> trasy = AlgorytmWindy.TrasaDwieWindy(pasazerowieCollection);
|
||||
this.Trasa = trasy.get(0);
|
||||
this.TrasaDwa = trasy.get(1);
|
||||
} else {
|
||||
Trasa = AlgorytmWindy.Trasa(getPasazerowieCollection());
|
||||
}
|
||||
CzasJazdy = Trasa.size()*CzasJazdyPietro+IloscPasazerow*CzasWeWyOsoby*2;
|
||||
CzasSredniObslugi = CzasJazdy / IloscPasazerow;
|
||||
CzasPietra = CzasJazdy / IloscPieter;
|
||||
log = new Logger(this.Trasa);
|
||||
}
|
||||
|
||||
public void UsunOstatniegoPasazera(){
|
||||
this.getPasazerowieCollection().remove(this.getPasazerowieCollection().size()-1);
|
||||
this.IloscPasazerow --;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Winda w = new Winda();
|
||||
//w.SetNajblizszeWzwanie();
|
||||
w.Start();
|
||||
List<Pietro> trasa = w.GetTrasa();
|
||||
for(int i = 0;i<trasa.size();i++)
|
||||
System.out.print(trasa.get(i).numerPietra + " ");
|
||||
System.out.print('\n');
|
||||
System.out.println("Czas jazdy = " + w.GetCzasJazdy());
|
||||
System.out.println("Średni czas obsługi jednego pasażera = " + w.GetCzasSredniObslugi());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pasazerowieCollection
|
||||
*/
|
||||
public List<Pasazer> getPasazerowieCollection() {
|
||||
return pasazerowieCollection;
|
||||
}
|
||||
}
|