File tree Expand file tree Collapse file tree 10 files changed +87
-13
lines changed
src/main/java/org/javamoney/examples/console
src/main/java/net/java/javamoney/fxdemo/exchange Expand file tree Collapse file tree 10 files changed +87
-13
lines changed Original file line number Diff line number Diff line change 11javamoney-examples
22==================
33
4- JSR 354 Examples
4+ JSR 354 Examples
5+
6+ The current project structure is as follows:
7+
8+ ---------
9+ * console: Console examples
10+ * javafx: JavaFX examples
11+ ** money-fxdemo: JavaFX Demo application
12+ ** money-javafx-binding: JavaFX binding examples
13+ * web: Web examples
14+ ** javamoney-payment-cdi-event: Demo for CDI 1.0 Events with the Money and Currency API
Original file line number Diff line number Diff line change 1+ /target
2+ /.settings
3+ /.classpath
4+ /.project
Original file line number Diff line number Diff line change 1+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2+ <modelVersion >4.0.0</modelVersion >
3+ <parent >
4+ <groupId >org.javamoney</groupId >
5+ <artifactId >javamoney-examples</artifactId >
6+ <version >0.6-SNAPSHOT</version >
7+ </parent >
8+ <artifactId >javamoney-examples-console</artifactId >
9+
10+ <dependencies >
11+ <dependency >
12+ <groupId >org.slf4j</groupId >
13+ <artifactId >slf4j-api</artifactId >
14+ </dependency >
15+
16+ <dependency >
17+ <groupId >org.slf4j</groupId >
18+ <artifactId >jul-to-slf4j</artifactId >
19+ </dependency >
20+
21+ <dependency >
22+ <groupId >net.java.javamoney</groupId >
23+ <artifactId >money-ri</artifactId >
24+ <version >${javamoney.ri.version} </version >
25+ </dependency >
26+ <dependency >
27+ <groupId >net.java.javamoney</groupId >
28+ <artifactId >money-java-se</artifactId >
29+ <version >${javamoney.ri.version} </version >
30+ </dependency >
31+
32+ </dependencies >
33+ </project >
Original file line number Diff line number Diff line change 1+ /**
2+ *
3+ */
4+ package org .javamoney .examples .console ;
5+
6+ import javax .money .Money ;
7+
8+ import net .java .javamoney .ri .IntegralMoney ;
9+
10+ /**
11+ * @author Werner Keil
12+ *
13+ */
14+ public class IntegralDemo {
15+
16+ /**
17+ * @param args
18+ */
19+ public static void main (String [] args ) {
20+ Money amt1 = Money .of ("USD" , 10.1234556123456789 );
21+ IntegralMoney amt2 = IntegralMoney .of ("USD" , 123456789 );
22+ Money total = amt1 .add (amt2 );
23+ System .out .println (total );
24+ }
25+
26+ }
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >org.javamoney</groupId >
77 <artifactId >javamoney-examples-javafx</artifactId >
8- <version >0.5 -SNAPSHOT</version >
8+ <version >0.6 -SNAPSHOT</version >
99 </parent >
1010
1111
Original file line number Diff line number Diff line change 2222import net .java .javamoney .fxdemo .widgets .AmountEntry ;
2323import net .java .javamoney .fxdemo .widgets .CurrencySelector ;
2424import net .java .javamoney .fxdemo .widgets .ExchangeRateTypeSelector ;
25- import net .java .javamoney .ri .convert .provider .EZBConversionProvider ;
25+ import net .java .javamoney .ri .convert .provider .EZBCurrentConversionProvider ;
2626
2727/**
2828 * @author Anatole Tresch
@@ -60,9 +60,9 @@ public void changed(
6060 + (newERT !=null ? " New ERT: " + newERT : "" ));
6161
6262 if (newERT != null ) {
63- if (EZBConversionProvider .RATE_TYPE .equals (newERT )) {
63+ if (EZBCurrentConversionProvider .RATE_TYPE .equals (newERT )) {
6464 logger .debug ("got ECB" );
65- amountBox .getCodeBox ().setValue (EZBConversionProvider .BASE_CURRENCY .getCurrencyCode ());
65+ amountBox .getCodeBox ().setValue (EZBCurrentConversionProvider .BASE_CURRENCY .getCurrencyCode ());
6666 amountBox .getCodeBox ().setDisable (true );
6767 } else {
6868 amountBox .getCodeBox ().setDisable (false );
Original file line number Diff line number Diff line change 2121import net .java .javamoney .fxdemo .widgets .AbstractSingleSamplePane ;
2222import net .java .javamoney .fxdemo .widgets .CurrencySelector ;
2323import net .java .javamoney .fxdemo .widgets .ExchangeRateTypeSelector ;
24- import net .java .javamoney .ri .convert .provider .EZBConversionProvider ;
24+ import net .java .javamoney .ri .convert .provider .EZBCurrentConversionProvider ;
2525
2626/**
2727 * @author Werner Keil
@@ -61,9 +61,9 @@ public void changed(
6161 + (newERT !=null ? " New ERT: " + newERT : "" ));
6262
6363 if (newERT != null ) {
64- if (EZBConversionProvider .RATE_TYPE .equals (newERT )) {
64+ if (EZBCurrentConversionProvider .RATE_TYPE .equals (newERT )) {
6565 logger .debug ("got ECB" );
66- currencySelector1 .setCurrency (EZBConversionProvider .BASE_CURRENCY );
66+ currencySelector1 .setCurrency (EZBCurrentConversionProvider .BASE_CURRENCY );
6767 currencySelector1 .setDisable (true );
6868 swapButton .setDisable (true );
6969 } else {
Original file line number Diff line number Diff line change 66 <parent >
77 <artifactId >javamoney-examples-javafx</artifactId >
88 <groupId >org.javamoney</groupId >
9- <version >0.5 -SNAPSHOT</version >
9+ <version >0.6 -SNAPSHOT</version >
1010 </parent >
1111
1212 <artifactId >money-javafx-binding</artifactId >
Original file line number Diff line number Diff line change 33 <parent >
44 <artifactId >javamoney-examples</artifactId >
55 <groupId >org.javamoney</groupId >
6- <version >0.5 -SNAPSHOT</version >
6+ <version >0.6 -SNAPSHOT</version >
77 <relativePath >..</relativePath >
88 </parent >
99 <artifactId >javamoney-examples-javafx</artifactId >
Original file line number Diff line number Diff line change 33 <modelVersion >4.0.0</modelVersion >
44 <groupId >org.javamoney</groupId >
55 <artifactId >javamoney-examples</artifactId >
6- <version >0.5 -SNAPSHOT</version >
6+ <version >0.6 -SNAPSHOT</version >
77 <packaging >pom</packaging >
88 <name >Java Money and Currency Examples</name >
99 <modules >
1010 <module >web</module >
1111 <!-- module>javafx</module -->
1212 <!-- TODO add profiles for Java 8/FX -->
13+ <module >console</module >
1314 </modules >
1415 <properties >
1516 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
2122 <junit .version>4.8.2</junit .version>
2223 <slf4j .version>1.6.1</slf4j .version>
2324 <!-- JSR versions -->
24- <javamoney .version>0.5 -SNAPSHOT</javamoney .version>
25- <javamoney .ri.version>0.5 -SNAPSHOT</javamoney .ri.version>
25+ <javamoney .version>0.6 -SNAPSHOT</javamoney .version>
26+ <javamoney .ri.version>0.6 -SNAPSHOT</javamoney .ri.version>
2627 </properties >
2728 <dependencyManagement >
2829 <dependencies >
You can’t perform that action at this time.
0 commit comments