Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dumoulin Nicolas
OhOui
Commits
f78e12e3
Commit
f78e12e3
authored
Feb 08, 2011
by
Dumoulin Nicolas
Browse files
[maven-release-plugin] copy for tag ohoui-0.1.1
parent
32e7a959
Changes
4
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
f78e12e3
...
...
@@ -8,7 +8,7 @@
<groupId>
fr.cemagref
</groupId>
<artifactId>
ohoui
</artifactId>
<version>
0.1.1
-SNAPSHOT
</version>
<version>
0.1.1
</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>
...
...
@@ -57,8 +57,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
.1
</connection>
<url>
http://trac.clermont.cemagref.fr/projets/LISC/browser/OhOUI/
tags/ohoui-0.1
.1
</url>
</scm>
<build>
<plugins>
...
...
src/main/java/demo/OhOUIDemo.java
View file @
f78e12e3
...
...
@@ -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"
);
}
}
}
src/main/java/demo/Test1.java
View file @
f78e12e3
...
...
@@ -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
);
}
}
}
}
src/main/java/demo/Test2.java
View file @
f78e12e3
package
demo
;
public
class
Test2
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment