[Japi-cvs] SF.net SVN: japi:[788] progs/pffhtrain/trunk
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2009-02-01 18:30:12
|
Revision: 788
http://japi.svn.sourceforge.net/japi/?rev=788&view=rev
Author: christianhujer
Date: 2009-02-01 18:30:07 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Add PffhTrain tool.
Modified Paths:
--------------
progs/pffhtrain/trunk/pffhtrain.iml
Added Paths:
-----------
progs/pffhtrain/trunk/src/prj/net/
progs/pffhtrain/trunk/src/prj/net/sf/
progs/pffhtrain/trunk/src/prj/net/sf/japi/
progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/
progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/Material.java
progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/MaterialType.java
progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/PffhTrain.java
progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/action.properties
progs/pffhtrain/trunk/src/tst/test/
progs/pffhtrain/trunk/src/tst/test/net/
progs/pffhtrain/trunk/src/tst/test/net/sf/
progs/pffhtrain/trunk/src/tst/test/net/sf/japi/
progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/
progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTest.java
progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTypeTest.java
progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/PffhTrainTest.java
Modified: progs/pffhtrain/trunk/pffhtrain.iml
===================================================================
--- progs/pffhtrain/trunk/pffhtrain.iml 2009-02-01 18:18:59 UTC (rev 787)
+++ progs/pffhtrain/trunk/pffhtrain.iml 2009-02-01 18:30:07 UTC (rev 788)
@@ -27,6 +27,8 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module" module-name="libs-argparser" />
+ <orderEntry type="module" module-name="libs-swing-action" />
</component>
</module>
Added: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/Material.java
===================================================================
--- progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/Material.java (rev 0)
+++ progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/Material.java 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,99 @@
+package net.sf.japi.pffhtrain;
+
+import org.jetbrains.annotations.Nullable;
+
+/** A material.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class Material {
+
+ /** The type of this material. */
+ @Nullable private MaterialType type;
+
+ /** The id of this material. */
+ @Nullable private String id;
+
+ /** The title of this material. */
+ @Nullable private String title;
+
+ /** The month in which this material should be learned. */
+ @Nullable private Integer month;
+
+ /** The package number in which this material was delivered. */
+ @Nullable private Integer pckg;
+
+ /** Creates a new Material. */
+ public Material() {
+ }
+
+ /** Sets the type of this material.
+ * @param type The type of this material.
+ */
+ public void setType(@Nullable final MaterialType type) {
+ this.type = type;
+ }
+
+ /** Returns the type of this material.
+ * @return The type of this material.
+ */
+ @Nullable public MaterialType getType() {
+ return type;
+ }
+
+ /** Sets the id of this material.
+ * @param id The id of this material.
+ */
+ public void setId(@Nullable final String id) {
+ this.id = id;
+ }
+
+ /** Returns the id of this material.
+ * @return The id of this material.
+ */
+ @Nullable public String getId() {
+ return id;
+ }
+
+ /** Sets the title of this material.
+ * @param title The title of this material.
+ */
+ public void setTitle(@Nullable final String title) {
+ this.title = title;
+ }
+
+ /** Returns the title of this material.
+ * @return The title of this material.
+ */
+ @Nullable public String getTitle() {
+ return title;
+ }
+
+ /** Sets the month of this material.
+ * @param month The month of this material.
+ */
+ public void setMonth(@Nullable final Integer month) {
+ this.month = month;
+ }
+
+ /** Returns the month of this material.
+ * @return the month of this material.
+ */
+ @Nullable public Integer getMonth() {
+ return month;
+ }
+
+ /** Sets the package of this material.
+ * @param pckg The package of this material.
+ */
+ public void setPckg(@Nullable final Integer pckg) {
+ this.pckg = pckg;
+ }
+
+ /** Returns the package of this material.
+ * @return The package of this material.
+ */
+ @Nullable public Integer getPckg() {
+ return pckg;
+ }
+
+}
Property changes on: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/Material.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/MaterialType.java
===================================================================
--- progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/MaterialType.java (rev 0)
+++ progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/MaterialType.java 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,30 @@
+package net.sf.japi.pffhtrain;
+
+import org.jetbrains.annotations.Nullable;
+
+/** A MaterialType.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class MaterialType {
+
+ /** The name of this MaterialType. */
+ @Nullable private String name;
+
+ /** Creates a new MaterialType. */
+ public MaterialType() {
+ }
+
+ /** Sets the name of this MaterialType.
+ * @param name The name of this MaterialType.
+ */
+ public void setName(@Nullable final String name) {
+ this.name = name;
+ }
+
+ /** Returns the name of this MaterialType.
+ * @return The name of this MaterialType.
+ */
+ @Nullable public String getName() {
+ return name;
+ }
+}
Property changes on: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/MaterialType.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/PffhTrain.java
===================================================================
--- progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/PffhTrain.java (rev 0)
+++ progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/PffhTrain.java 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,41 @@
+package net.sf.japi.pffhtrain;
+
+import java.util.List;
+import javax.swing.JFrame;
+import javax.swing.WindowConstants;
+import net.sf.japi.io.args.ArgParser;
+import net.sf.japi.io.args.BasicCommand;
+import net.sf.japi.swing.ActionBuilder;
+import net.sf.japi.swing.ActionBuilderFactory;
+import org.jetbrains.annotations.NotNull;
+
+/** PffhTrain main program.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class PffhTrain extends BasicCommand {
+
+ private static final ActionBuilder actionBuilder = ActionBuilderFactory.getInstance().getActionBuilder(PffhTrain.class);
+
+ private final JFrame frame;
+
+ /** Creates an instance of PffhTrain. */
+ public PffhTrain() {
+ frame = new JFrame("PffhTrain");
+ frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+ frame.setJMenuBar(actionBuilder.createMenuBar(true, "main", this));
+ }
+
+ /** Main program.
+ * @param args Command line arguments (try --help).
+ */
+ public static void main(final String... args) {
+ ArgParser.simpleParseAndRun(new PffhTrain(), args);
+ }
+
+ /** {@inheritDoc} */
+ public int run(@NotNull final List<String> args) throws Exception {
+ frame.setVisible(true);
+ return 0;
+ }
+
+}
Property changes on: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/PffhTrain.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/action.properties
===================================================================
--- progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/action.properties (rev 0)
+++ progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/action.properties 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,11 @@
+main.menubar=file help
+
+file.menu=open save saveas close quit
+file.text=File
+file.mnemonic=F
+
+open.text=Open
+close.text=Close
+
+help.menu=about
+help.text=Help
Property changes on: progs/pffhtrain/trunk/src/prj/net/sf/japi/pffhtrain/action.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTest.java
===================================================================
--- progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTest.java (rev 0)
+++ progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTest.java 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,47 @@
+package test.net.sf.japi.pffhtrain;
+
+import net.sf.japi.pffhtrain.Material;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Test for {@link Material}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>.
+ */
+public class MaterialTest {
+
+ /** Tests that the field id is initially null. */
+ @Test
+ public void testNewMaterialHasNullId() {
+ final Material oUT = new Material();
+ Assert.assertNull("Expecting newly created Material to have null id", oUT.getId());
+ }
+
+ /** Tests that the field month is initially null. */
+ @Test
+ public void testNewMaterialHasNullMonth() {
+ final Material oUT = new Material();
+ Assert.assertNull("Expecting newly created Material to have null month", oUT.getMonth());
+ }
+
+ /** Tests that the field pckg is initially null. */
+ @Test
+ public void testNewMaterialHasNullPckg() {
+ final Material oUT = new Material();
+ Assert.assertNull("Expecting newly created Material to have null pckg", oUT.getPckg());
+ }
+
+ /** Tests that the field title is initially null. */
+ @Test
+ public void testNewMaterialHasNullTitle() {
+ final Material oUT = new Material();
+ Assert.assertNull("Expecting newly created Material to have null title", oUT.getTitle());
+ }
+
+ /** Tests that the field type is initially null. */
+ @Test
+ public void testNewMaterialHasNullType() {
+ final Material oUT = new Material();
+ Assert.assertNull("Expecting newly created Material to have null type", oUT.getType());
+ }
+
+}
Property changes on: progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTypeTest.java
===================================================================
--- progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTypeTest.java (rev 0)
+++ progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTypeTest.java 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,19 @@
+package test.net.sf.japi.pffhtrain;
+
+import net.sf.japi.pffhtrain.MaterialType;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Test for {@link MaterialType}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class MaterialTypeTest {
+
+ /** Tests that the field name is initially null. */
+ @Test
+ public void testNewMaterialTypeHasNullName() {
+ final MaterialType oUT = new MaterialType();
+ Assert.assertNull("Expecting newly created Material to have null id", oUT.getName());
+ }
+
+}
Property changes on: progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/MaterialTypeTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/PffhTrainTest.java
===================================================================
--- progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/PffhTrainTest.java (rev 0)
+++ progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/PffhTrainTest.java 2009-02-01 18:30:07 UTC (rev 788)
@@ -0,0 +1,10 @@
+package test.net.sf.japi.pffhtrain;
+
+import net.sf.japi.pffhtrain.PffhTrain;
+
+/** Test for {@link PffhTrain}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class PffhTrainTest {
+
+}
Property changes on: progs/pffhtrain/trunk/src/tst/test/net/sf/japi/pffhtrain/PffhTrainTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|