Commit f78e12e3 authored by Dumoulin Nicolas's avatar Dumoulin Nicolas
Browse files

[maven-release-plugin] copy for tag ohoui-0.1.1

parent 32e7a959
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<groupId>fr.cemagref</groupId> <groupId>fr.cemagref</groupId>
<artifactId>ohoui</artifactId> <artifactId>ohoui</artifactId>
<version>0.1.1-SNAPSHOT</version> <version>0.1.1</version>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<dependency> <dependency>
<groupId>fr.cemagref</groupId> <groupId>fr.cemagref</groupId>
<artifactId>lisc-commons</artifactId> <artifactId>lisc-commons</artifactId>
<version>0.1</version> <version>0.1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.thoughtworks.xstream</groupId> <groupId>com.thoughtworks.xstream</groupId>
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<scm> <scm>
<connection>scm:svn:http://trac.clermont.cemagref.fr/svn/LISC/OhOUI/branches/0.1</connection> <connection>scm:svn:http://trac.clermont.cemagref.fr/svn/LISC/OhOUI/tags/ohoui-0.1.1</connection>
<url>http://trac.clermont.cemagref.fr/projets/LISC/browser/OhOUI/branches/0.1</url> <url>http://trac.clermont.cemagref.fr/projets/LISC/browser/OhOUI/tags/ohoui-0.1.1</url>
</scm> </scm>
<build> <build>
<plugins> <plugins>
......
...@@ -5,7 +5,6 @@ import java.io.File; ...@@ -5,7 +5,6 @@ import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import fr.cemagref.commons.modulesloader.ModulesLoader;
import fr.cemagref.ohoui.annotations.Anchor; import fr.cemagref.ohoui.annotations.Anchor;
import fr.cemagref.ohoui.annotations.Description; import fr.cemagref.ohoui.annotations.Description;
import fr.cemagref.ohoui.annotations.Link; import fr.cemagref.ohoui.annotations.Link;
...@@ -18,13 +17,6 @@ public class OhOUIDemo { ...@@ -18,13 +17,6 @@ public class OhOUIDemo {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// Init the engine
//ModulesLoader.addModulesPackage("demo");
//ModulesLoader.setLogStream(System.err);
ModulesLoader.addModulesJAR("rt.jar");
ModulesLoader.addModulesPackageForJar("rt.jar","java.util");
ModulesLoader.addModulesPackageForJar("rt.jar","java.lang");
ModulesLoader.addModulesPackageForJar("rt.jar","java.io");
MyModel maclasse = new MyModel(); MyModel maclasse = new MyModel();
// Run the GUI // Run the GUI
...@@ -33,19 +25,20 @@ public class OhOUIDemo { ...@@ -33,19 +25,20 @@ public class OhOUIDemo {
dialog.pack(); dialog.pack();
dialog.setVisible(true); dialog.setVisible(true);
} }
// launch the method defined by the abstract class Algo // launch the method defined by the abstract class Algo
if (maclasse.algo != null) if (maclasse.algo != null) {
maclasse.algo.process(); maclasse.algo.process();
}
if (maclasse.init != null) if (maclasse.init != null) {
maclasse.init.doProcess(); maclasse.init.doProcess();
}
// print the complete state of the object after edition // print the complete state of the object after edition
//System.out.println((new XStream(new DomDriver())).toXML(maclasse)); //System.out.println((new XStream(new DomDriver())).toXML(maclasse));
} }
public static class MyModel<A extends Algo> { public static class MyModel<A extends Algo> {
public MyModel() { public MyModel() {
...@@ -54,37 +47,27 @@ public class OhOUIDemo { ...@@ -54,37 +47,27 @@ public class OhOUIDemo {
listAlgo.add(new AlgoFaster()); listAlgo.add(new AlgoFaster());
//listAlgo2 = new ArrayList<AlgoAccurate>(); //listAlgo2 = new ArrayList<AlgoAccurate>();
} }
Test1 test1; Test1 test1;
Test2 test2; Test2 test2;
@Description(name = "A number", tooltip = "Here, you can add some indications") @Description(name = "A number", tooltip = "Here, you can add some indications")
private Integer aNumber = 1; private Integer aNumber = 1;
@Description(name = "Use color ?", tooltip = "Use the checkbox") @Description(name = "Use color ?", tooltip = "Use the checkbox")
@Link(action="enable", target="color") @Link(action = "enable", target = "color")
boolean b = true; boolean b = true;
@Description(name = "The color of the sky ", tooltip = "Please, change this color") @Description(name = "The color of the sky ", tooltip = "Please, change this color")
@Anchor(id="color") @Anchor(id = "color")
Color color = new Color(150, 150, 150); Color color = new Color(150, 150, 150);
// without metadata // without metadata
private String aString; private String aString;
InitOpinionIncertitude init; InitOpinionIncertitude init;
private Algo algo; private Algo algo;
@Description(name = "List of processes", tooltip = "Used to compute your solution") @Description(name = "List of processes", tooltip = "Used to compute your solution")
@XStreamable(load = true, save = true) @XStreamable(load = true, save = true)
private List<Algo> listAlgo; private List<Algo> listAlgo;
/*@XStreamable(load = true, save = true) /*@XStreamable(load = true, save = true)
private List<? extends Algo> listAlgo2;*/ private List<? extends Algo> listAlgo2;*/
private List<A> listAlgo3; private List<A> listAlgo3;
//private List listAlgo4; //private List listAlgo4;
/*@Description(name = "Process", tooltip = "Used to compute your solution") /*@Description(name = "Process", tooltip = "Used to compute your solution")
...@@ -93,23 +76,23 @@ public class OhOUIDemo { ...@@ -93,23 +76,23 @@ public class OhOUIDemo {
} }
public static abstract class Algo { public static abstract class Algo {
@Description(name = "Input data", tooltip = "") @Description(name = "Input data", tooltip = "")
File input; File input;
abstract void process(); abstract void process();
} }
public static class AlgoFaster extends Algo { public static class AlgoFaster extends Algo {
// some params that you may need for your algo // some params that you may need for your algo
public double param1; public double param1;
public double param2; public double param2;
@Override @Override
void process() { void process() {
// Here your process // Here your process
System.out.println("fast "+param1); System.out.println("fast " + param1);
} }
} }
...@@ -117,28 +100,27 @@ public class OhOUIDemo { ...@@ -117,28 +100,27 @@ public class OhOUIDemo {
public int param; public int param;
InitOpinionIncertitude trux; InitOpinionIncertitude trux;
@Override @Override
void process() { void process() {
System.out.println("accurate"); System.out.println("accurate");
// Here your process // Here your process
} }
} }
public interface InitOpinionIncertitude { public interface InitOpinionIncertitude {
void doProcess(); void doProcess();
} }
public class InitOpinionIncertitudeRandom implements InitOpinionIncertitude { public class InitOpinionIncertitudeRandom implements InitOpinionIncertitude {
public InitOpinionIncertitudeRandom() { public InitOpinionIncertitudeRandom() {
System.out.println("*********************PLOP***************"); System.out.println("*********************PLOP***************");
} }
public void doProcess() { public void doProcess() {
System.out.println("Init Random"); System.out.println("Init Random");
} }
} }
} }
...@@ -2,29 +2,22 @@ package demo; ...@@ -2,29 +2,22 @@ package demo;
import java.util.List; import java.util.List;
import fr.cemagref.commons.modulesloader.ModulesLoader;
import fr.cemagref.ohoui.filters.NoTransientField; import fr.cemagref.ohoui.filters.NoTransientField;
import fr.cemagref.ohoui.swing.OhOUI; import fr.cemagref.ohoui.swing.OhOUI;
import fr.cemagref.ohoui.swing.OhOUIDialog; import fr.cemagref.ohoui.swing.OhOUIDialog;
public class Test1 { public class Test1 {
int truc;
List<Integer> list;
public static void main(String[] args) throws Exception {
// Init the engine int truc;
//ModulesLoader.addModulesPackage("demo"); List<Integer> list;
//ModulesLoader.setLogStream(System.err);
ModulesLoader.addModulesJAR("rt.jar"); public static void main(String[] args) throws Exception {
ModulesLoader.addModulesPackageForJar("rt.jar","java.util");
ModulesLoader.addModulesPackageForJar("rt.jar","java.lang");
ModulesLoader.addModulesPackageForJar("rt.jar","java.io");
// Run the GUI // Run the GUI
OhOUIDialog dialog = OhOUI.getDialog(null, new Test1(), new NoTransientField()); OhOUIDialog dialog = OhOUI.getDialog(null, new Test1(), new NoTransientField());
if (dialog != null) { if (dialog != null) {
dialog.pack(); dialog.pack();
dialog.setVisible(true); dialog.setVisible(true);
} }
} }
} }
package demo; package demo;
public class Test2 { public class Test2 {
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment