Skip to content

Commit

Permalink
Add c++ version of the convertor to the UI application.
Browse files Browse the repository at this point in the history
  • Loading branch information
javadev committed Apr 11, 2015
1 parent 3937df4 commit a246559
Show file tree
Hide file tree
Showing 8 changed files with 676 additions and 10 deletions.
Binary file modified moneytostr.jar
Binary file not shown.
Binary file modified moneytostr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified moneytostr2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified moneytostr3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.github</groupId>
<artifactId>moneytostr</artifactId>
<packaging>jar</packaging>
<version>1.13</version>
<version>1.14</version>
<name>moneytostr</name>
<description>The utility class to convert amount to words in Russian/Ukrainian/English languages</description>

Expand Down
37 changes: 33 additions & 4 deletions src/main/java/com/github/moneytostr/MoneyToStrApp.form
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jTextField1" pref="570" max="32767" attributes="0"/>
<Component id="jTextField1" pref="636" max="32767" attributes="0"/>
</Group>
<Component id="jTabbedPane1" alignment="0" max="32767" attributes="1"/>
</Group>
Expand Down Expand Up @@ -507,7 +507,7 @@
<Component id="jComboBox5" max="32767" attributes="0"/>
<Component id="jComboBox2" max="32767" attributes="1"/>
<Component id="jComboBox3" alignment="1" max="32767" attributes="1"/>
<Component id="jComboBox4" alignment="1" pref="592" max="32767" attributes="0"/>
<Component id="jComboBox4" alignment="1" pref="658" max="32767" attributes="0"/>
<Component id="jComboBox1" max="32767" attributes="1"/>
<Component id="jComboBox6" alignment="0" max="32767" attributes="0"/>
</Group>
Expand All @@ -530,7 +530,7 @@
<Component id="jTextField5" max="32767" attributes="0"/>
<Component id="jTextField4" max="32767" attributes="0"/>
<Component id="jTextField2" max="32767" attributes="0"/>
<Component id="jTextField3" pref="593" max="32767" attributes="0"/>
<Component id="jTextField3" pref="659" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jComboBox8" min="-2" max="-2" attributes="0"/>
Expand Down Expand Up @@ -902,7 +902,7 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jTabbedPane7" alignment="0" pref="759" max="32767" attributes="0"/>
<Component id="jTabbedPane7" alignment="0" pref="825" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
Expand Down Expand Up @@ -948,6 +948,35 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane17">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="c++">
<Property name="tabTitle" type="java.lang.String" value="c++"/>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextPane" name="jTextPane12">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="SansSerif" size="14" style="0"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane16">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
Expand Down
24 changes: 19 additions & 5 deletions src/main/java/com/github/moneytostr/MoneyToStrApp.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* $Id$
*
* Copyright 2014 Valentyn Kolesnikov
* Copyright 2015 Valentyn Kolesnikov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -306,6 +306,7 @@ public void windowClosing(WindowEvent winEvt) {
convertStreamToString(jTextPane7, "MoneyToStr.rb");
convertStreamToString(jTextPane8, "MoneyToStr.scala");
convertStreamToString(jTextPane9, "moneytostr.ts");
convertStreamToString(jTextPane12, "MoneyToStr.cpp");
}

private void convertStreamToString(JTextPane jTextPane, String fileName) {
Expand Down Expand Up @@ -393,6 +394,8 @@ private void initComponents() {
jTabbedPane7 = new javax.swing.JTabbedPane();
jScrollPane1 = new javax.swing.JScrollPane();
jTextPane1 = new javax.swing.JTextPane();
jScrollPane17 = new javax.swing.JScrollPane();
jTextPane12 = new javax.swing.JTextPane();
jScrollPane16 = new javax.swing.JScrollPane();
jTextPane11 = new javax.swing.JTextPane();
jScrollPane2 = new javax.swing.JScrollPane();
Expand Down Expand Up @@ -558,7 +561,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2Layout.createSequentialGroup()
.add(jLabel2)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jTextField1, 0, 570, Short.MAX_VALUE))
.add(jTextField1, 0, 636, Short.MAX_VALUE))
.add(org.jdesktop.layout.GroupLayout.LEADING, jTabbedPane1))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
Expand Down Expand Up @@ -759,7 +762,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.add(jComboBox5, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jComboBox2, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBox3, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBox4, 0, 592, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBox4, 0, 658, Short.MAX_VALUE)
.add(jComboBox1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jComboBox6, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.add(jPanel1Layout.createSequentialGroup()
Expand All @@ -779,7 +782,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.add(jTextField5)
.add(jTextField4)
.add(jTextField2)
.add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 593, Short.MAX_VALUE)
.add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 659, Short.MAX_VALUE)
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jComboBox8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
Expand Down Expand Up @@ -862,6 +865,15 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

jTabbedPane7.addTab("c#", jScrollPane1);

jScrollPane17.setBorder(null);

jTextPane12.setEditable(false);
jTextPane12.setBorder(null);
jTextPane12.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
jScrollPane17.setViewportView(jTextPane12);

jTabbedPane7.addTab("c++", jScrollPane17);

jScrollPane16.setBorder(null);

jTextPane11.setEditable(false);
Expand Down Expand Up @@ -956,7 +968,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jTabbedPane7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 759, Short.MAX_VALUE)
.add(jTabbedPane7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
Expand Down Expand Up @@ -1235,6 +1247,7 @@ public void run() {
private javax.swing.JScrollPane jScrollPane14;
private javax.swing.JScrollPane jScrollPane15;
private javax.swing.JScrollPane jScrollPane16;
private javax.swing.JScrollPane jScrollPane17;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
Expand Down Expand Up @@ -1265,6 +1278,7 @@ public void run() {
private javax.swing.JTextPane jTextPane1;
private javax.swing.JTextPane jTextPane10;
private javax.swing.JTextPane jTextPane11;
private javax.swing.JTextPane jTextPane12;
private javax.swing.JTextPane jTextPane2;
private javax.swing.JTextPane jTextPane3;
private javax.swing.JTextPane jTextPane4;
Expand Down
Loading

0 comments on commit a246559

Please sign in to comment.