Commit 39c0518e authored by Dumoulin Nicolas's avatar Dumoulin Nicolas
Browse files

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

parent 32e7a959
......@@ -8,7 +8,7 @@
<groupId>fr.cemagref</groupId>
<artifactId>ohoui</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.1.2</version>
<dependencies>
<dependency>
......@@ -20,7 +20,7 @@
<dependency>
<groupId>fr.cemagref</groupId>
<artifactId>lisc-commons</artifactId>
<version>0.1</version>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
......@@ -42,6 +42,11 @@
<description />
<url>http://trac.clermont.cemagref.fr/projets/LISC/wiki/JavaObservation</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.license>gpl30</netbeans.hint.license>
</properties>
<licenses>
<license>
<name>GPL</name>
......@@ -57,8 +62,8 @@
<packaging>jar</packaging>
<scm>
<connection>scm:svn:http://trac.clermont.cemagref.fr/svn/LISC/OhOUI/branches/0.1</connection>
<url>http://trac.clermont.cemagref.fr/projets/LISC/browser/OhOUI/branches/0.1</url>
<connection>scm:svn:http://trac.clermont.cemagref.fr/svn/LISC/OhOUI/tags/ohoui-0.1.2</connection>
<url>http://trac.clermont.cemagref.fr/projets/LISC/browser/OhOUI/tags/ohoui-0.1.2</url>
</scm>
<build>
<plugins>
......
......@@ -5,7 +5,6 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import fr.cemagref.commons.modulesloader.ModulesLoader;
import fr.cemagref.ohoui.annotations.Anchor;
import fr.cemagref.ohoui.annotations.Description;
import fr.cemagref.ohoui.annotations.Link;
......@@ -18,13 +17,6 @@ public class OhOUIDemo {
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();
// Run the GUI
......@@ -33,19 +25,20 @@ public class OhOUIDemo {
dialog.pack();
dialog.setVisible(true);
}
// launch the method defined by the abstract class Algo
if (maclasse.algo != null)
maclasse.algo.process();
if (maclasse.algo != null) {
maclasse.algo.process();
}
if (maclasse.init != null)
maclasse.init.doProcess();
if (maclasse.init != null) {
maclasse.init.doProcess();
}
// print the complete state of the object after edition
//System.out.println((new XStream(new DomDriver())).toXML(maclasse));
}
public static class MyModel<A extends Algo> {
public MyModel() {
......@@ -54,37 +47,27 @@ public class OhOUIDemo {
listAlgo.add(new AlgoFaster());
//listAlgo2 = new ArrayList<AlgoAccurate>();
}
Test1 test1;
Test2 test2;
@Description(name = "A number", tooltip = "Here, you can add some indications")
private Integer aNumber = 1;
@Description(name = "Use color ?", tooltip = "Use the checkbox")
@Link(action="enable", target="color")
@Link(action = "enable", target = "color")
boolean b = true;
@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);
// without metadata
private String aString;
InitOpinionIncertitude init;
private Algo algo;
@Description(name = "List of processes", tooltip = "Used to compute your solution")
@XStreamable(load = true, save = true)
private List<Algo> listAlgo;
/*@XStreamable(load = true, save = true)
private List<? extends Algo> listAlgo2;*/
private List<A> listAlgo3;
//private List listAlgo4;
/*@Description(name = "Process", tooltip = "Used to compute your solution")
......@@ -93,23 +76,23 @@ public class OhOUIDemo {
}
public static abstract class Algo {
@Description(name = "Input data", tooltip = "")
File input;
abstract void process();
}
public static class AlgoFaster extends Algo {
// some params that you may need for your algo
public double param1;
public double param2;
@Override
void process() {
// Here your process
System.out.println("fast "+param1);
System.out.println("fast " + param1);
}
}
......@@ -117,28 +100,27 @@ public class OhOUIDemo {
public int param;
InitOpinionIncertitude trux;
@Override
void process() {
System.out.println("accurate");
System.out.println("accurate");
// Here your process
}
}
public interface InitOpinionIncertitude {
void doProcess();
}
public class InitOpinionIncertitudeRandom implements InitOpinionIncertitude {
public InitOpinionIncertitudeRandom() {
System.out.println("*********************PLOP***************");
}
public void doProcess() {
System.out.println("Init Random");
System.out.println("Init Random");
}
}
}
......@@ -2,29 +2,22 @@ package demo;
import java.util.List;
import fr.cemagref.commons.modulesloader.ModulesLoader;
import fr.cemagref.ohoui.filters.NoTransientField;
import fr.cemagref.ohoui.swing.OhOUI;
import fr.cemagref.ohoui.swing.OhOUIDialog;
public class Test1 {
int truc;
List<Integer> list;
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");
int truc;
List<Integer> list;
public static void main(String[] args) throws Exception {
// Run the GUI
OhOUIDialog dialog = OhOUI.getDialog(null, new Test1(), new NoTransientField());
if (dialog != null) {
dialog.pack();
dialog.setVisible(true);
}
}
}
}
package demo;
public class Test2 {
}
package fr.cemagref.ohoui.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation is used for skipping a field during the introspection of a class.
* @author dumoulin
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SkipField {
}
/*
* Copyright (C) 2012 dumoulin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.cemagref.ohoui.filters;
import fr.cemagref.ohoui.annotations.SkipField;
import java.lang.reflect.Field;
/**
*
* @author dumoulin
*/
public class SkipFieldFilter implements FieldFilter {
@Override
public boolean accept(Field field) {
return !field.isAnnotationPresent(SkipField.class);
}
}
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