diff --git a/.classpath b/.classpath
index b1b539df..b9fe85f4 100644
--- a/.classpath
+++ b/.classpath
@@ -3,7 +3,5 @@
-
-
diff --git a/build-mac.sh b/build-mac.sh
new file mode 100755
index 00000000..fc50458c
--- /dev/null
+++ b/build-mac.sh
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+############################################
+# Created by @Pega88 && @Jon_S_Layton #
+# v1.0.0 16 Feb 2018 #
+############################################
+
+echo "***************************"
+echo "|| Checking dependencies ||"
+echo "***************************"
+echo ""
+
+#fetch + install jar2app
+if [ -e /usr/local/bin/jar2app ]
+then
+ echo "jar2app already installed - OK"
+else
+ git clone https://github.com/Jorl17/jar2app
+ cd jar2app
+ chmod +x install.sh uninstall.sh
+ sudo ./install.sh /usr/local/bin
+ cd ..
+ rm -rf jar2app
+fi
+
+#fetch + install dylibbundler
+if [ -e /usr/local/bin/dylibbundler ]
+then
+ echo "dylibbundler already installed - OK"
+else
+ git clone https://github.com/auriamg/macdylibbundler
+ cd macdylibbundler
+ sudo make install
+ cd ..
+ rm -rf macdylibbundler
+fi
+
+if [ ! -e ./zcld ]
+then
+ echo "please provide zcld in the root directory"
+else
+ echo "found zcld - OK"
+fi
+
+if [ ! -e ./zcl-cli ]
+then
+ echo "please provide zcl-cli in the root directory"
+else
+ echo "found zcl-cli - OK"
+fi
+echo ""
+echo "******************"
+echo "|| building JAR ||"
+echo "******************"
+echo ""
+
+#build the jar from source
+ant jar -f src/build/build.xml
+
+echo ""
+echo "*******************"
+echo "|| Packaging App ||"
+echo "*******************"
+echo ""
+#package jar to app
+jar2app build/jars/ZclassicSwingWallet.jar -i ./src/resources/images/zclassic-logo.icns
+
+#add zcld and zcl-cli into the required Contents folder of the App
+cp ./zcld ./ZclassicSwingWallet.app/Contents/zcld
+cp ./zcl-cli ./ZclassicSwingWallet.app/Contents/zcl-cli
+
+
+chmod +x ./ZclassicSwingWallet.app/Contents/zcld
+chmod +x ./ZclassicSwingWallet.app/Contents/zcl-cli
+echo ""
+echo "**********************************"
+echo "|| Statically linking libraries ||"
+echo "**********************************"
+echo ""
+
+#statically build required libraries
+dylibbundler -od -b -x ./ZclassicSwingWallet.app/Contents/zcld \
+ -x ./ZclassicSwingWallet.app/Contents/zcl-cli \
+ -d ./ZclassicSwingWallet.app/Contents/libs \
+ -p @executable_path/libs
\ No newline at end of file
diff --git a/src/java/com/vaklinov/zcashui/AboutDialog.java b/src/java/com/vaklinov/zcashui/AboutDialog.java
index 4399102a..290c15c9 100644
--- a/src/java/com/vaklinov/zcashui/AboutDialog.java
+++ b/src/java/com/vaklinov/zcashui/AboutDialog.java
@@ -46,7 +46,10 @@
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JTextPane;
import javax.swing.border.EtchedBorder;
+import javax.swing.text.Highlighter;
/**
@@ -68,173 +71,22 @@ public AboutDialog(JFrame parent)
this.setModal(true);
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
- JTabbedPane tabs = new JTabbedPane();
-
- JPanel copyrightPanel = new JPanel();
- copyrightPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
- copyrightPanel.setLayout(new BorderLayout(3, 3));
- JLabel copyrightLabel = new JLabel();
-
- copyrightLabel.setText(new String(new byte[] {
- (byte)0x3c,(byte)0x68,(byte)0x74,(byte)0x6d,(byte)0x6c,(byte)0x3e,(byte)0x3c,(byte)0x62,(byte)0x6f,(byte)0x64,
- (byte)0x79,(byte)0x3e,(byte)0x3c,(byte)0x73,(byte)0x70,(byte)0x61,(byte)0x6e,(byte)0x20,(byte)0x73,(byte)0x74,
- (byte)0x79,(byte)0x6c,(byte)0x65,(byte)0x3d,(byte)0x22,(byte)0x66,(byte)0x6f,(byte)0x6e,(byte)0x74,(byte)0x2d,
- (byte)0x77,(byte)0x65,(byte)0x69,(byte)0x67,(byte)0x68,(byte)0x74,(byte)0x3a,(byte)0x62,(byte)0x6f,(byte)0x6c,
- (byte)0x64,(byte)0x22,(byte)0x3e,(byte)0x5a,(byte)0x45,(byte)0x4e,(byte)0x43,(byte)0x61,(byte)0x73,(byte)0x68,
- (byte)0x20,(byte)0x53,(byte)0x77,(byte)0x69,(byte)0x6e,(byte)0x67,(byte)0x20,(byte)0x57,(byte)0x61,(byte)0x6c,
- (byte)0x6c,(byte)0x65,(byte)0x74,(byte)0x20,(byte)0x55,(byte)0x49,(byte)0x3c,(byte)0x2f,(byte)0x73,(byte)0x70,
- (byte)0x61,(byte)0x6e,(byte)0x3e,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x3c,(byte)0x62,
- (byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x43,(byte)0x6f,(byte)0x70,(byte)0x79,(byte)0x72,(byte)0x69,(byte)0x67,
- (byte)0x68,(byte)0x74,(byte)0x3a,(byte)0x20,(byte)0x49,(byte)0x76,(byte)0x61,(byte)0x6e,(byte)0x20,(byte)0x56,
- (byte)0x61,(byte)0x6b,(byte)0x6c,(byte)0x69,(byte)0x6e,(byte)0x6f,(byte)0x76,(byte)0x20,(byte)0x26,(byte)0x6c,
- (byte)0x74,(byte)0x3b,(byte)0x69,(byte)0x76,(byte)0x61,(byte)0x6e,(byte)0x40,(byte)0x76,(byte)0x61,(byte)0x6b,
- (byte)0x6c,(byte)0x69,(byte)0x6e,(byte)0x6f,(byte)0x76,(byte)0x2e,(byte)0x63,(byte)0x6f,(byte)0x6d,(byte)0x26,
- (byte)0x67,(byte)0x74,(byte)0x3b,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x3c,(byte)0x62,
- (byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x54,(byte)0x68,(byte)0x69,(byte)0x73,(byte)0x20,(byte)0x70,(byte)0x72,
- (byte)0x6f,(byte)0x67,(byte)0x72,(byte)0x61,(byte)0x6d,(byte)0x20,(byte)0x69,(byte)0x73,(byte)0x20,(byte)0x69,
- (byte)0x6e,(byte)0x74,(byte)0x65,(byte)0x6e,(byte)0x64,(byte)0x65,(byte)0x64,(byte)0x20,(byte)0x74,(byte)0x6f,
- (byte)0x20,(byte)0x6d,(byte)0x61,(byte)0x6b,(byte)0x65,(byte)0x20,(byte)0x69,(byte)0x74,(byte)0x20,(byte)0x65,
- (byte)0x61,(byte)0x73,(byte)0x79,(byte)0x20,(byte)0x74,(byte)0x6f,(byte)0x20,(byte)0x77,(byte)0x6f,(byte)0x72,
- (byte)0x6b,(byte)0x20,(byte)0x77,(byte)0x69,(byte)0x74,(byte)0x68,(byte)0x20,(byte)0x74,(byte)0x68,(byte)0x65,
- (byte)0x20,(byte)0x5a,(byte)0x45,(byte)0x4e,(byte)0x43,(byte)0x61,(byte)0x73,(byte)0x68,(byte)0x20,(byte)0x63,
- (byte)0x6c,(byte)0x69,(byte)0x65,(byte)0x6e,(byte)0x74,(byte)0x20,(byte)0x74,(byte)0x6f,(byte)0x6f,(byte)0x6c,
- (byte)0x73,(byte)0x20,(byte)0x62,(byte)0x79,(byte)0x20,(byte)0x70,(byte)0x72,(byte)0x6f,(byte)0x76,(byte)0x69,
- (byte)0x64,(byte)0x69,(byte)0x6e,(byte)0x67,(byte)0x20,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,
- (byte)0x61,(byte)0x20,(byte)0x47,(byte)0x72,(byte)0x61,(byte)0x70,(byte)0x68,(byte)0x69,(byte)0x63,(byte)0x61,
- (byte)0x6c,(byte)0x20,(byte)0x55,(byte)0x73,(byte)0x65,(byte)0x72,(byte)0x20,(byte)0x49,(byte)0x6e,(byte)0x74,
- (byte)0x65,(byte)0x72,(byte)0x66,(byte)0x61,(byte)0x63,(byte)0x65,(byte)0x20,(byte)0x28,(byte)0x47,(byte)0x55,
- (byte)0x49,(byte)0x29,(byte)0x20,(byte)0x74,(byte)0x68,(byte)0x61,(byte)0x74,(byte)0x20,(byte)0x61,(byte)0x63,
- (byte)0x74,(byte)0x73,(byte)0x20,(byte)0x61,(byte)0x73,(byte)0x20,(byte)0x61,(byte)0x20,(byte)0x77,(byte)0x72,
- (byte)0x61,(byte)0x70,(byte)0x70,(byte)0x65,(byte)0x72,(byte)0x20,(byte)0x61,(byte)0x6e,(byte)0x64,(byte)0x20,
- (byte)0x70,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x65,(byte)0x6e,(byte)0x74,(byte)0x73,(byte)0x20,(byte)0x74,
- (byte)0x68,(byte)0x65,(byte)0x20,(byte)0x69,(byte)0x6e,(byte)0x66,(byte)0x6f,(byte)0x72,(byte)0x6d,(byte)0x61,
- (byte)0x74,(byte)0x69,(byte)0x6f,(byte)0x6e,(byte)0x20,(byte)0x69,(byte)0x6e,(byte)0x20,(byte)0x61,(byte)0x20,
- (byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x75,(byte)0x73,(byte)0x65,(byte)0x72,(byte)0x2d,
- (byte)0x66,(byte)0x72,(byte)0x69,(byte)0x65,(byte)0x6e,(byte)0x64,(byte)0x6c,(byte)0x79,(byte)0x20,(byte)0x6d,
- (byte)0x61,(byte)0x6e,(byte)0x6e,(byte)0x65,(byte)0x72,(byte)0x2e,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,
- (byte)0x3e,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x41,(byte)0x63,(byte)0x6b,(byte)0x6e,
- (byte)0x6f,(byte)0x77,(byte)0x6c,(byte)0x65,(byte)0x64,(byte)0x67,(byte)0x65,(byte)0x6d,(byte)0x65,(byte)0x6e,
- (byte)0x74,(byte)0x73,(byte)0x3a,(byte)0x20,(byte)0x54,(byte)0x68,(byte)0x69,(byte)0x73,(byte)0x20,(byte)0x70,
- (byte)0x72,(byte)0x6f,(byte)0x67,(byte)0x72,(byte)0x61,(byte)0x6d,(byte)0x20,(byte)0x69,(byte)0x6e,(byte)0x63,
- (byte)0x6c,(byte)0x75,(byte)0x64,(byte)0x65,(byte)0x73,(byte)0x20,(byte)0x73,(byte)0x6f,(byte)0x66,(byte)0x74,
- (byte)0x77,(byte)0x61,(byte)0x72,(byte)0x65,(byte)0x20,(byte)0x66,(byte)0x6f,(byte)0x72,(byte)0x20,(byte)0x4a,
- (byte)0x53,(byte)0x4f,(byte)0x4e,(byte)0x20,(byte)0x70,(byte)0x72,(byte)0x6f,(byte)0x63,(byte)0x65,(byte)0x73,
- (byte)0x73,(byte)0x69,(byte)0x6e,(byte)0x67,(byte)0x20,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,
- (byte)0x28,(byte)0x68,(byte)0x74,(byte)0x74,(byte)0x70,(byte)0x73,(byte)0x3a,(byte)0x2f,(byte)0x2f,(byte)0x67,
- (byte)0x69,(byte)0x74,(byte)0x68,(byte)0x75,(byte)0x62,(byte)0x2e,(byte)0x63,(byte)0x6f,(byte)0x6d,(byte)0x2f,
- (byte)0x72,(byte)0x61,(byte)0x6c,(byte)0x66,(byte)0x73,(byte)0x74,(byte)0x78,(byte)0x2f,(byte)0x6d,(byte)0x69,
- (byte)0x6e,(byte)0x69,(byte)0x6d,(byte)0x61,(byte)0x6c,(byte)0x2d,(byte)0x6a,(byte)0x73,(byte)0x6f,(byte)0x6e,
- (byte)0x29,(byte)0x20,(byte)0x74,(byte)0x68,(byte)0x61,(byte)0x74,(byte)0x20,(byte)0x69,(byte)0x73,(byte)0x20,
- (byte)0x43,(byte)0x6f,(byte)0x70,(byte)0x79,(byte)0x72,(byte)0x69,(byte)0x67,(byte)0x68,(byte)0x74,(byte)0x20,
- (byte)0x28,(byte)0x63,(byte)0x29,(byte)0x20,(byte)0x32,(byte)0x30,(byte)0x31,(byte)0x35,(byte)0x2c,(byte)0x20,
- (byte)0x32,(byte)0x30,(byte)0x31,(byte)0x36,(byte)0x20,(byte)0x45,(byte)0x63,(byte)0x6c,(byte)0x69,(byte)0x70,
- (byte)0x73,(byte)0x65,(byte)0x53,(byte)0x6f,(byte)0x75,(byte)0x72,(byte)0x63,(byte)0x65,(byte)0x2e,(byte)0x3c,
- (byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x3c,
- (byte)0x2f,(byte)0x62,(byte)0x6f,(byte)0x64,(byte)0x79,(byte)0x3e,(byte)0x3c,(byte)0x2f,(byte)0x68,(byte)0x74,
- (byte)0x6d,(byte)0x6c,(byte)0x3e
- }, "UTF-8")
- );
- copyrightLabel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
- copyrightPanel.add(copyrightLabel, BorderLayout.NORTH);
-
-
- JPanel PD = new JPanel();
- PD.setLayout(new BorderLayout(3, 3));
- PD.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
- JLabel l1 = new JLabel(new String(new byte[] {
- (byte)0x3c,(byte)0x68,(byte)0x74,(byte)0x6d,(byte)0x6c,(byte)0x3e,(byte)0x3c,(byte)0x62,(byte)0x6f,(byte)0x64,
- (byte)0x79,(byte)0x3e,(byte)0x3c,(byte)0x73,(byte)0x70,(byte)0x61,(byte)0x6e,(byte)0x20,(byte)0x73,(byte)0x74,
- (byte)0x79,(byte)0x6c,(byte)0x65,(byte)0x3d,(byte)0x22,(byte)0x66,(byte)0x6f,(byte)0x6e,(byte)0x74,(byte)0x2d,
- (byte)0x77,(byte)0x65,(byte)0x69,(byte)0x67,(byte)0x68,(byte)0x74,(byte)0x3a,(byte)0x62,(byte)0x6f,(byte)0x6c,
- (byte)0x64,(byte)0x22,(byte)0x3e,(byte)0x44,(byte)0x6f,(byte)0x6e,(byte)0x61,(byte)0x74,(byte)0x69,(byte)0x6f,
- (byte)0x6e,(byte)0x73,(byte)0x20,(byte)0x61,(byte)0x63,(byte)0x63,(byte)0x65,(byte)0x70,(byte)0x74,(byte)0x65,
- (byte)0x64,(byte)0x3a,(byte)0x3c,(byte)0x2f,(byte)0x73,(byte)0x70,(byte)0x61,(byte)0x6e,(byte)0x3e,(byte)0x20,
- (byte)0x54,(byte)0x68,(byte)0x69,(byte)0x73,(byte)0x20,(byte)0x5a,(byte)0x43,(byte)0x61,(byte)0x73,(byte)0x68,
- (byte)0x20,(byte)0x47,(byte)0x55,(byte)0x49,(byte)0x20,(byte)0x77,(byte)0x61,(byte)0x6c,(byte)0x6c,(byte)0x65,
- (byte)0x74,(byte)0x20,(byte)0x68,(byte)0x61,(byte)0x73,(byte)0x20,(byte)0x62,(byte)0x65,(byte)0x65,(byte)0x6e,
- (byte)0x20,(byte)0x62,(byte)0x72,(byte)0x6f,(byte)0x75,(byte)0x67,(byte)0x68,(byte)0x74,(byte)0x20,(byte)0x74,
- (byte)0x6f,(byte)0x20,(byte)0x79,(byte)0x6f,(byte)0x75,(byte)0x20,(byte)0x74,(byte)0x68,(byte)0x6f,(byte)0x75,
- (byte)0x72,(byte)0x67,(byte)0x68,(byte)0x20,(byte)0x74,(byte)0x68,(byte)0x65,(byte)0x20,(byte)0x65,(byte)0x66,
- (byte)0x66,(byte)0x6f,(byte)0x72,(byte)0x74,(byte)0x73,(byte)0x20,(byte)0x6f,(byte)0x66,(byte)0x20,(byte)0x63,
- (byte)0x6f,(byte)0x6d,(byte)0x6d,(byte)0x75,(byte)0x6e,(byte)0x69,(byte)0x74,(byte)0x79,(byte)0x20,(byte)0x76,
- (byte)0x6f,(byte)0x6c,(byte)0x75,(byte)0x6e,(byte)0x74,(byte)0x65,(byte)0x65,(byte)0x72,(byte)0x73,(byte)0x2e,
- (byte)0x20,(byte)0x49,(byte)0x66,(byte)0x20,(byte)0x79,(byte)0x6f,(byte)0x75,(byte)0x20,(byte)0x66,(byte)0x69,
- (byte)0x6e,(byte)0x64,(byte)0x20,(byte)0x69,(byte)0x74,(byte)0x20,(byte)0x75,(byte)0x73,(byte)0x65,(byte)0x66,
- (byte)0x75,(byte)0x6c,(byte)0x20,(byte)0x70,(byte)0x6c,(byte)0x65,(byte)0x61,(byte)0x73,(byte)0x65,(byte)0x20,
- (byte)0x63,(byte)0x6f,(byte)0x6e,(byte)0x73,(byte)0x69,(byte)0x64,(byte)0x65,(byte)0x72,(byte)0x20,(byte)0x6d,
- (byte)0x61,(byte)0x6b,(byte)0x69,(byte)0x6e,(byte)0x67,(byte)0x20,(byte)0x61,(byte)0x20,(byte)0x64,(byte)0x6f,
- (byte)0x6e,(byte)0x61,(byte)0x74,(byte)0x69,(byte)0x6f,(byte)0x6e,(byte)0x20,(byte)0x66,(byte)0x6f,(byte)0x72,
- (byte)0x20,(byte)0x69,(byte)0x74,(byte)0x73,(byte)0x20,(byte)0x66,(byte)0x75,(byte)0x72,(byte)0x74,(byte)0x68,
- (byte)0x65,(byte)0x72,(byte)0x20,(byte)0x64,(byte)0x65,(byte)0x76,(byte)0x65,(byte)0x6c,(byte)0x6f,(byte)0x70,
- (byte)0x6d,(byte)0x65,(byte)0x6e,(byte)0x74,(byte)0x2e,(byte)0x20,(byte)0x44,(byte)0x6f,(byte)0x6e,(byte)0x61,
- (byte)0x74,(byte)0x69,(byte)0x6f,(byte)0x6e,(byte)0x73,(byte)0x20,(byte)0x6f,(byte)0x66,(byte)0x20,(byte)0x3c,
- (byte)0x73,(byte)0x70,(byte)0x61,(byte)0x6e,(byte)0x20,(byte)0x73,(byte)0x74,(byte)0x79,(byte)0x6c,(byte)0x65,
- (byte)0x3d,(byte)0x22,(byte)0x66,(byte)0x6f,(byte)0x6e,(byte)0x74,(byte)0x2d,(byte)0x77,(byte)0x65,(byte)0x69,
- (byte)0x67,(byte)0x68,(byte)0x74,(byte)0x3a,(byte)0x62,(byte)0x6f,(byte)0x6c,(byte)0x64,(byte)0x22,(byte)0x3e,
- (byte)0x61,(byte)0x6e,(byte)0x79,(byte)0x20,(byte)0x73,(byte)0x69,(byte)0x7a,(byte)0x65,(byte)0x3c,(byte)0x2f,
- (byte)0x73,(byte)0x70,(byte)0x61,(byte)0x6e,(byte)0x3e,(byte)0x20,(byte)0x61,(byte)0x72,(byte)0x65,(byte)0x20,
- (byte)0x61,(byte)0x63,(byte)0x63,(byte)0x65,(byte)0x70,(byte)0x74,(byte)0x65,(byte)0x64,(byte)0x20,(byte)0x74,
- (byte)0x6f,(byte)0x20,(byte)0x74,(byte)0x68,(byte)0x65,(byte)0x20,(byte)0x66,(byte)0x6f,(byte)0x6c,(byte)0x6c,
- (byte)0x6f,(byte)0x77,(byte)0x69,(byte)0x6e,(byte)0x67,(byte)0x20,(byte)0x5a,(byte)0x43,(byte)0x61,(byte)0x73,
- (byte)0x68,(byte)0x20,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x3a,
- (byte)0x3c,(byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x3c,(byte)0x2f,(byte)0x62,(byte)0x6f,(byte)0x64,
- (byte)0x79,(byte)0x3e,(byte)0x3c,(byte)0x2f,(byte)0x68,(byte)0x74,(byte)0x6d,(byte)0x6c,(byte)0x3e,
- }, "UTF-8")
- );
- PD.add(l1, BorderLayout.NORTH);
- JPanel PD2 = new JPanel();
- PD2.setLayout(new BorderLayout(3, 3));
- final JTextArea tar = new JTextArea();
- tar.setEditable(false);
- tar.setLineWrap(true);
- tar.setText(new String(new byte[] {
- (byte)0x74,(byte)0x31,(byte)0x55,(byte)0x4d,(byte)0x47,(byte)0x6a,(byte)0x4c,(byte)0x44,(byte)0x69,(byte)0x70,
- (byte)0x64,(byte)0x66,(byte)0x75,(byte)0x43,(byte)0x64,(byte)0x4e,(byte)0x77,(byte)0x78,(byte)0x55,(byte)0x5a,
- (byte)0x54,(byte)0x56,(byte)0x34,(byte)0x46,(byte)0x68,(byte)0x4d,(byte)0x33,(byte)0x34,(byte)0x46,(byte)0x4a,
- (byte)0x58,(byte)0x67,(byte)0x4d,(byte)0x38,(byte)0x72,
- }, "UTF-8")
- );
- PD2.add(tar, BorderLayout.CENTER);
- JPanel PD3 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
- final JButton jb1 = new JButton(new String(new byte[] {
- (byte)0x3c,(byte)0x68,(byte)0x74,(byte)0x6d,(byte)0x6c,(byte)0x3e,(byte)0x3c,(byte)0x62,(byte)0x6f,(byte)0x64,
- (byte)0x79,(byte)0x3e,(byte)0x3c,(byte)0x73,(byte)0x70,(byte)0x61,(byte)0x6e,(byte)0x20,(byte)0x73,(byte)0x74,
- (byte)0x79,(byte)0x6c,(byte)0x65,(byte)0x3d,(byte)0x22,(byte)0x66,(byte)0x6f,(byte)0x6e,(byte)0x74,(byte)0x2d,
- (byte)0x73,(byte)0x69,(byte)0x7a,(byte)0x65,(byte)0x3a,(byte)0x38,(byte)0x70,(byte)0x78,(byte)0x3b,(byte)0x66,
- (byte)0x6f,(byte)0x6e,(byte)0x74,(byte)0x2d,(byte)0x77,(byte)0x65,(byte)0x69,(byte)0x67,(byte)0x68,(byte)0x74,
- (byte)0x3a,(byte)0x62,(byte)0x6f,(byte)0x6c,(byte)0x64,(byte)0x22,(byte)0x3e,(byte)0x43,(byte)0x6f,(byte)0x70,
- (byte)0x79,(byte)0x20,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x3c,
- (byte)0x62,(byte)0x72,(byte)0x2f,(byte)0x3e,(byte)0x74,(byte)0x6f,(byte)0x20,(byte)0x63,(byte)0x6c,(byte)0x69,
- (byte)0x70,(byte)0x62,(byte)0x6f,(byte)0x61,(byte)0x72,(byte)0x64,(byte)0x3c,(byte)0x2f,(byte)0x73,(byte)0x70,
- (byte)0x61,(byte)0x6e,(byte)0x3e,(byte)0x3c,(byte)0x2f,(byte)0x68,(byte)0x74,(byte)0x6d,(byte)0x6c,(byte)0x3e,
- (byte)0x3c,(byte)0x2f,(byte)0x62,(byte)0x6f,(byte)0x64,(byte)0x79,(byte)0x3e,
- }, "UTF-8"));
- PD3.add(jb1);
- jb1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
- clipboard.setContents(new StringSelection(tar.getText()), null);
- }
- });
- PD2.add(PD3, BorderLayout.EAST);
- PD.add(PD2, BorderLayout.CENTER);
- //copyrightPanel.add(PD, BorderLayout.CENTER);
-
-
- tabs.add("About", copyrightPanel);
-
JPanel licensePanel = new JPanel();
licensePanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
licensePanel.setLayout(new BorderLayout(3, 3));
- JLabel licenseLabel = new JLabel();
+ JTextArea licenseLabel = new JTextArea();
licenseLabel.setText(
- "
" +
- " Copyright (c) 2018 Jon Layton <me@jonl.io> \n" +
- " Donate ZCL: zcF3db2JwLNHa917NfbfFR2EJWXgowFmQ4bvouJEvGmPjLPcH7hyAhpSAFUhm7ANiBJfzMpJHMkp363r7M3GEC8g8oQXJ5n " +
- "\n" +
- "\n" +
- " Copyright (c) 2016-2017 Ivan Vaklinov <ivan@vaklinov.com> \n" +
+ "" +
+ " Copyright (c) 2018 -Zclassic Team\n\n"
+ + "Jon Layton "
+ + "\n"
+ + "Donate ZCL: zcF3db2JwLNHa917NfbfFR2EJWXgowFmQ4bvouJEvGmPjLPcH7hyAhpSAFUhm7ANiBJfzMpJHMkp363r7M3GEC8g8oQXJ5n "
+ +"\n\n"
+ + "Niels Buekers \n"
+ + "Donate ZCL: zcgUYH2iKgYJvLP2xnxK3pDa8CFoAAd3qbx1pvnjMbwhLfC89D6UuVPjztKsqz7m2y9vmM2xKxk7WHmuonLrWUL9aitPXBe "
+ +"\n\n\n\n"
+ +"Forked from ZEN wallet\n"
+ + "Copyright (c) 2016-2017 Ivan Vaklinov \n" +
"\n" +
" Permission is hereby granted, free of charge, to any person obtaining a copy\n" +
" of this software and associated documentation files (the \"Software\"), to deal\n" +
@@ -252,15 +104,12 @@ public void actionPerformed(ActionEvent e) {
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" +
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" +
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n" +
- " THE SOFTWARE. \n" +
- "
");
+ " THE SOFTWARE. \n");
licenseLabel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
licensePanel.add(licenseLabel, BorderLayout.NORTH);
- tabs.add("License", licensePanel);
-
this.getContentPane().setLayout(new BorderLayout(0, 0));
- this.getContentPane().add(tabs, BorderLayout.NORTH);
+ this.getContentPane().add(licensePanel, BorderLayout.NORTH);
JPanel closePanel = new JPanel();
closePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 3, 3));
diff --git a/src/java/com/vaklinov/zcashui/AddressBookPanel.java b/src/java/com/vaklinov/zcashui/AddressBookPanel.java
index 459cebb0..4909e5c1 100644
--- a/src/java/com/vaklinov/zcashui/AddressBookPanel.java
+++ b/src/java/com/vaklinov/zcashui/AddressBookPanel.java
@@ -73,7 +73,7 @@ private JPanel buildButtonsPanel() {
panel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
panel.setLayout(new FlowLayout(FlowLayout.CENTER, 3, 3));
- JButton newContactButton = new JButton("New contact...");
+ JButton newContactButton = new JButton("New contact");
newContactButton.addActionListener(new NewContactActionListener());
panel.add(newContactButton);
@@ -316,8 +316,8 @@ public int getColumnCount() {
@Override
public String getColumnName(int columnIndex) {
switch(columnIndex) {
- case 0 : return "name";
- case 1 : return "address";
+ case 0 : return "Name";
+ case 1 : return "Address";
default:
throw new IllegalArgumentException("invalid column "+columnIndex);
}
diff --git a/src/java/com/vaklinov/zcashui/AddressTable.java b/src/java/com/vaklinov/zcashui/AddressTable.java
index 06deab29..c6d279a5 100644
--- a/src/java/com/vaklinov/zcashui/AddressTable.java
+++ b/src/java/com/vaklinov/zcashui/AddressTable.java
@@ -55,8 +55,8 @@ public AddressTable(final Object[][] rowData, final Object[] columnNames,
super(rowData, columnNames);
int accelaratorKeyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
- JMenuItem obtainPrivateKey = new JMenuItem("Obtain private key...");
- obtainPrivateKey.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, accelaratorKeyMask));
+ JMenuItem obtainPrivateKey = new JMenuItem("Obtain private key");
+ //obtainPrivateKey.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, accelaratorKeyMask));
popupMenu.add(obtainPrivateKey);
obtainPrivateKey.addActionListener(new ActionListener()
diff --git a/src/java/com/vaklinov/zcashui/DashboardPanel.java b/src/java/com/vaklinov/zcashui/DashboardPanel.java
index ff620528..7a50279a 100644
--- a/src/java/com/vaklinov/zcashui/DashboardPanel.java
+++ b/src/java/com/vaklinov/zcashui/DashboardPanel.java
@@ -36,6 +36,7 @@
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
+import java.text.DateFormat;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
@@ -66,46 +67,46 @@
* @author Ivan Vaklinov
*/
public class DashboardPanel
- extends WalletTabPanel
+extends WalletTabPanel
{
private JFrame parentFrame;
private ZCashInstallationObserver installationObserver;
private ZCashClientCaller clientCaller;
private StatusUpdateErrorReporter errorReporter;
private BackupTracker backupTracker;
-
- private JLabel networkAndBlockchainLabel = null;
+
+ //private JLabel networkAndBlockchainLabel = null;
private DataGatheringThread netInfoGatheringThread = null;
private Boolean walletIsEncrypted = null;
private Integer blockchainPercentage = null;
-
+
private String OSInfo = null;
private JLabel daemonStatusLabel = null;
private DataGatheringThread daemonInfoGatheringThread = null;
-
+
private JLabel walletBalanceLabel = null;
private DataGatheringThread walletBalanceGatheringThread = null;
-
+
private JTable transactionsTable = null;
private JScrollPane transactionsTablePane = null;
private String[][] lastTransactionsData = null;
private DataGatheringThread transactionGatheringThread = null;
-
+
public DashboardPanel(JFrame parentFrame,
- ZCashInstallationObserver installationObserver,
- ZCashClientCaller clientCaller,
- StatusUpdateErrorReporter errorReporter,
- BackupTracker backupTracker)
- throws IOException, InterruptedException, WalletCallException
+ ZCashInstallationObserver installationObserver,
+ ZCashClientCaller clientCaller,
+ StatusUpdateErrorReporter errorReporter,
+ BackupTracker backupTracker)
+ throws IOException, InterruptedException, WalletCallException
{
this.parentFrame = parentFrame;
this.installationObserver = installationObserver;
this.clientCaller = clientCaller;
this.errorReporter = errorReporter;
this.backupTracker = backupTracker;
-
+
this.timers = new ArrayList();
this.threads = new ArrayList>();
@@ -118,11 +119,10 @@ public DashboardPanel(JFrame parentFrame,
JPanel balanceStatusPanel = new JPanel();
// Use border layout to have balances to the left
balanceStatusPanel.setLayout(new BorderLayout(3, 3));
- //balanceStatusPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
-
+
JPanel tempPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 9));
JLabel logoLabel = new JLabel(new ImageIcon(
- this.getClass().getClassLoader().getResource("images/zclassic-logo-small.png")));
+ this.getClass().getClassLoader().getResource("images/zclassic-logo-small.png")));
tempPanel.add(logoLabel);
// TODO: use relative size
JLabel zcLabel = new JLabel(" Zclassic Wallet ");
@@ -131,64 +131,59 @@ public DashboardPanel(JFrame parentFrame,
tempPanel.setToolTipText("Powered by Zclassic");
balanceStatusPanel.add(tempPanel, BorderLayout.WEST);
// TODO: use relative size - only!
+ /*
JLabel transactionHeadingLabel = new JLabel(
- "
Transactions:");
+ "
Transactions:");
tempPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 1, 1));
transactionHeadingLabel.setFont(new Font("Helvetica", Font.BOLD, 19));
tempPanel.add(transactionHeadingLabel);
+ */
balanceStatusPanel.add(tempPanel, BorderLayout.CENTER);
-
- PresentationPanel walletBalancePanel = new PresentationPanel();
- walletBalancePanel.add(walletBalanceLabel = new JLabel());
- balanceStatusPanel.add(walletBalancePanel, BorderLayout.EAST);
-
+
+ balanceStatusPanel.add(walletBalanceLabel = new JLabel(), BorderLayout.EAST);
+
dashboard.add(balanceStatusPanel, BorderLayout.NORTH);
// Table of transactions
lastTransactionsData = getTransactionsDataFromWallet();
dashboard.add(transactionsTablePane = new JScrollPane(
- transactionsTable = this.createTransactionsTable(lastTransactionsData)),
- BorderLayout.CENTER);
+ transactionsTable = this.createTransactionsTable(lastTransactionsData)),
+ BorderLayout.CENTER);
// Lower panel with installation status
JPanel installationStatusPanel = new JPanel();
- installationStatusPanel.setLayout(new BorderLayout(3, 3));
- //installationStatusPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
- PresentationPanel daemonStatusPanel = new PresentationPanel();
- daemonStatusPanel.add(daemonStatusLabel = new JLabel());
- installationStatusPanel.add(daemonStatusPanel, BorderLayout.WEST);
-
- PresentationPanel networkAndBlockchainPanel = new PresentationPanel();
- networkAndBlockchainPanel.add(networkAndBlockchainLabel = new JLabel());
- installationStatusPanel.add(networkAndBlockchainPanel, BorderLayout.EAST);
-
+ installationStatusPanel.setLayout(new BorderLayout());
+ //PresentationPanel daemonStatusPanel = new PresentationPanel();
+ //daemonStatusPanel.add(daemonStatusLabel = new JLabel());
+ installationStatusPanel.add(daemonStatusLabel = new JLabel(), BorderLayout.WEST);
+
dashboard.add(installationStatusPanel, BorderLayout.SOUTH);
// Thread and timer to update the daemon status
this.daemonInfoGatheringThread = new DataGatheringThread(
- new DataGatheringThread.DataGatherer()
- {
- public DaemonInfo gatherData()
- throws Exception
+ new DataGatheringThread.DataGatherer()
{
- long start = System.currentTimeMillis();
- DaemonInfo daemonInfo = DashboardPanel.this.installationObserver.getDaemonInfo();
- long end = System.currentTimeMillis();
- Log.info("Gathering of dashboard daemon status data done in " + (end - start) + "ms." );
-
- return daemonInfo;
- }
- },
- this.errorReporter, 2000, true);
+ public DaemonInfo gatherData()
+ throws Exception
+ {
+ long start = System.currentTimeMillis();
+ DaemonInfo daemonInfo = DashboardPanel.this.installationObserver.getDaemonInfo();
+ long end = System.currentTimeMillis();
+ Log.info("Gathering of dashboard daemon status data done in " + (end - start) + "ms." );
+
+ return daemonInfo;
+ }
+ },
+ this.errorReporter, 2000, true);
this.threads.add(this.daemonInfoGatheringThread);
-
+
ActionListener alDeamonStatus = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e)
{
try
{
- DashboardPanel.this.updateDaemonStatusLabel();
+ DashboardPanel.this.updateStatusLabels();
} catch (Exception ex)
{
Log.error("Unexpected error: ", ex);
@@ -199,33 +194,33 @@ public void actionPerformed(ActionEvent e)
Timer t = new Timer(1000, alDeamonStatus);
t.start();
this.timers.add(t);
-
+
// Thread and timer to update the wallet balance
this.walletBalanceGatheringThread = new DataGatheringThread(
- new DataGatheringThread.DataGatherer()
- {
- public WalletBalance gatherData()
- throws Exception
+ new DataGatheringThread.DataGatherer()
{
- long start = System.currentTimeMillis();
- WalletBalance balance = DashboardPanel.this.clientCaller.getWalletInfo();
- long end = System.currentTimeMillis();
-
- // TODO: move this call to a dedicated one-off gathering thread - this is the wrong place
- // it works but a better design is needed.
- if (DashboardPanel.this.walletIsEncrypted == null)
+ public WalletBalance gatherData()
+ throws Exception
{
- DashboardPanel.this.walletIsEncrypted = DashboardPanel.this.clientCaller.isWalletEncrypted();
+ long start = System.currentTimeMillis();
+ WalletBalance balance = DashboardPanel.this.clientCaller.getWalletInfo();
+ long end = System.currentTimeMillis();
+
+ // TODO: move this call to a dedicated one-off gathering thread - this is the wrong place
+ // it works but a better design is needed.
+ if (DashboardPanel.this.walletIsEncrypted == null)
+ {
+ DashboardPanel.this.walletIsEncrypted = DashboardPanel.this.clientCaller.isWalletEncrypted();
+ }
+
+ Log.info("Gathering of dashboard wallet balance data done in " + (end - start) + "ms." );
+
+ return balance;
}
-
- Log.info("Gathering of dashboard wallet balance data done in " + (end - start) + "ms." );
-
- return balance;
- }
- },
- this.errorReporter, 8000, true);
+ },
+ this.errorReporter, 8000, true);
this.threads.add(this.walletBalanceGatheringThread);
-
+
ActionListener alWalletBalance = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e)
@@ -247,22 +242,22 @@ public void actionPerformed(ActionEvent e)
// Thread and timer to update the transactions table
this.transactionGatheringThread = new DataGatheringThread(
- new DataGatheringThread.DataGatherer()
- {
- public String[][] gatherData()
- throws Exception
+ new DataGatheringThread.DataGatherer()
{
- long start = System.currentTimeMillis();
- String[][] data = DashboardPanel.this.getTransactionsDataFromWallet();
- long end = System.currentTimeMillis();
- Log.info("Gathering of dashboard wallet transactions table data done in " + (end - start) + "ms." );
-
- return data;
- }
- },
- this.errorReporter, 20000);
+ public String[][] gatherData()
+ throws Exception
+ {
+ long start = System.currentTimeMillis();
+ String[][] data = DashboardPanel.this.getTransactionsDataFromWallet();
+ long end = System.currentTimeMillis();
+ Log.info("Gathering of dashboard wallet transactions table data done in " + (end - start) + "ms." );
+
+ return data;
+ }
+ },
+ this.errorReporter, 20000);
this.threads.add(this.transactionGatheringThread);
-
+
ActionListener alTransactions = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e)
@@ -283,29 +278,29 @@ public void actionPerformed(ActionEvent e)
// Thread and timer to update the network and blockchain details
this.netInfoGatheringThread = new DataGatheringThread(
- new DataGatheringThread.DataGatherer()
- {
- public NetworkAndBlockchainInfo gatherData()
- throws Exception
+ new DataGatheringThread.DataGatherer()
{
- long start = System.currentTimeMillis();
- NetworkAndBlockchainInfo data = DashboardPanel.this.clientCaller.getNetworkAndBlockchainInfo();
- long end = System.currentTimeMillis();
- Log.info("Gathering of network and blockchain info data done in " + (end - start) + "ms." );
-
- return data;
- }
- },
- this.errorReporter, 10000, true);
+ public NetworkAndBlockchainInfo gatherData()
+ throws Exception
+ {
+ long start = System.currentTimeMillis();
+ NetworkAndBlockchainInfo data = DashboardPanel.this.clientCaller.getNetworkAndBlockchainInfo();
+ long end = System.currentTimeMillis();
+ Log.info("Gathering of network and blockchain info data done in " + (end - start) + "ms." );
+
+ return data;
+ }
+ },
+ this.errorReporter, 10000, true);
this.threads.add(this.netInfoGatheringThread);
-
+
ActionListener alNetAndBlockchain = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e)
{
try
{
- DashboardPanel.this.updateNetworkAndBlockchainLabel();
+ DashboardPanel.this.updateStatusLabels();
} catch (Exception ex)
{
Log.error("Unexpected error: ", ex);
@@ -318,109 +313,47 @@ public void actionPerformed(ActionEvent e)
netAndBlockchainTimer.start();
this.timers.add(netAndBlockchainTimer);
}
-
-
+
+
// May be null!
public Integer getBlockchainPercentage()
{
return this.blockchainPercentage;
}
-
- private void updateDaemonStatusLabel()
- throws IOException, InterruptedException, WalletCallException
+ private void updateStatusLabels()
+ throws IOException, InterruptedException
{
+ NetworkAndBlockchainInfo info = this.netInfoGatheringThread.getLastData();
+
+ // It is possible there has been no gathering initially
+ if (info == null)
+ {
+ return;
+ }
+
DaemonInfo daemonInfo = this.daemonInfoGatheringThread.getLastData();
-
+
// It is possible there has been no gathering initially
if (daemonInfo == null)
{
return;
}
-
+
String daemonStatus = "RUNNING";
if (daemonInfo.status != DAEMON_STATUS.RUNNING)
{
daemonStatus = "NOT RUNNING";
System.out.print(daemonInfo.status);
}
-
- String runtimeInfo = "";
-
- // If the virtual size/CPU are 0 - do not show them
- String virtual = "";
- if (daemonInfo.virtualSizeMB > 0)
- {
- virtual = ", Virtual: " + daemonInfo.virtualSizeMB + " MB";
- }
-
- String cpuPercentage = "";
- if (daemonInfo.cpuPercentage > 0)
- {
- cpuPercentage = ", CPU: " + daemonInfo.cpuPercentage + "%";
- }
-
- if (daemonInfo.status == DAEMON_STATUS.RUNNING)
- {
- runtimeInfo = "" +
- "Resident: " + daemonInfo.residentSizeMB + " MB" + virtual +
- cpuPercentage + "";
- }
- // TODO: what if ZCash directory is non-default...
- File walletDAT = new File(OSUtil.getBlockchainDirectory() + "/wallet.dat");
- if (this.installationObserver.isOnTestNet())
- {
- walletDAT = new File(OSUtil.getBlockchainDirectory() + "/testnet3" + "/wallet.dat");
- }
-
- if (this.OSInfo == null)
- {
- this.OSInfo = OSUtil.getSystemInfo();
- }
-
- String walletEncryption = "";
- // TODO: Use a one-off data gathering thread - better design
- if (this.walletIsEncrypted != null)
- {
- walletEncryption =
- "" +
- " (" + (this.walletIsEncrypted ? "" : "not ") + "encrypted)" +
- "";
- }
-
- String text =
- "zcld status: " +
- daemonStatus + ", " + runtimeInfo + "
" +
- "Wallet: " + walletDAT.getCanonicalPath() + "" +
- walletEncryption + "
" +
- "
" +
- "" +
- "Installation: " + OSUtil.getProgramDirectory() + ", " +
- "Blockchain: " + OSUtil.getBlockchainDirectory() + "
" +
- "System: " + this.OSInfo + " ";
- this.daemonStatusLabel.setText(text);
- }
-
-
- private void updateNetworkAndBlockchainLabel()
- throws IOException, InterruptedException
- {
- NetworkAndBlockchainInfo info = this.netInfoGatheringThread.getLastData();
-
- // It is possible there has been no gathering initially
- if (info == null)
- {
- return;
- }
-
// TODO: Get the start date right after ZCash release - from first block!!!
final Date startDate = new Date("06 Nov 2016 02:00:00 GMT");
final Date nowDate = new Date(System.currentTimeMillis());
-
+
long fullTime = nowDate.getTime() - startDate.getTime();
long remainingTime = nowDate.getTime() - info.lastBlockDate.getTime();
-
+
String percentage = "100";
if (remainingTime > 20 * 60 * 1000) // After 20 min we report 100% anyway
{
@@ -432,88 +365,100 @@ private void updateNetworkAndBlockchainLabel()
{
dPercentage = 100d;
}
-
+
DecimalFormat df = new DecimalFormat("##0.##");
percentage = df.format(dPercentage);
-
+
// Also set a member that may be queried
this.blockchainPercentage = new Integer((int)dPercentage);
} else
{
this.blockchainPercentage = 100;
}
-
+
// Just in case early on the call returns some junk date
if (info.lastBlockDate.before(startDate))
{
// TODO: write log that we fix minimum date! - this condition should not occur
info.lastBlockDate = startDate;
}
-
- String connections = " \u26D7";
+
+ //String connections = " \u26D7";
String tickSymbol = " \u2705";
OS_TYPE os = OSUtil.getOSType();
// Handling special symbols on Mac OS/Windows
// TODO: isolate OS-specific symbol stuff in separate code
if ((os == OS_TYPE.MAC_OS) || (os == OS_TYPE.WINDOWS))
{
- connections = " \u21D4";
+ //connections = " \u21D4";
tickSymbol = " \u2606";
}
-
+
String tick = "";
if (percentage.equals("100"))
{
tick = "" + tickSymbol + "";
}
-
+
String netColor = "red";
if (info.numConnections > 0)
{
netColor = "#cc3300";
}
-
+
if (info.numConnections > 2)
{
netColor = "black";
}
-
+
if (info.numConnections > 6)
{
netColor = "green";
- }
-
+ }
+ DateFormat formatter = DateFormat.getDateTimeInstance();
+ String lastBlockDate = formatter.format(info.lastBlockDate);
+
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("");
+ stringBuilder.append("Daemon status: ");
+ stringBuilder.append(daemonStatus);
+ stringBuilder.append(" - Network: ");
+ stringBuilder.append("");
+ stringBuilder.append(info.numConnections);
+ stringBuilder.append(" connections ");
+ stringBuilder.append(" - Blockchain synchronized: ");
+ stringBuilder.append(percentage);
+ stringBuilder.append("%");
+ stringBuilder.append(tick);
+ stringBuilder.append(" (latest block: ");
+ stringBuilder.append(lastBlockDate );
+ stringBuilder.append(")");
String text =
- " " +
- "Blockchain synchronized: " +
- percentage + "% " + tick + "
" +
- "Up to: " +
- info.lastBlockDate.toLocaleString() + "
" +
- "
" +
- "Network: " + info.numConnections + " connections" +
- "" + connections + "";
- this.networkAndBlockchainLabel.setText(text);
+ stringBuilder.toString();
+ this.daemonStatusLabel.setText(text);
}
-
+
private void updateWalletStatusLabel()
- throws WalletCallException, IOException, InterruptedException
+ throws WalletCallException, IOException, InterruptedException
{
WalletBalance balance = this.walletBalanceGatheringThread.getLastData();
-
+
// It is possible there has been no gathering initially
if (balance == null)
{
return;
}
-
+
// Format double numbers - else sometimes we get exponential notation 1E-4 ZEN
DecimalFormat df = new DecimalFormat("########0.00######");
-
+
String transparentBalance = df.format(balance.transparentBalance);
String privateBalance = df.format(balance.privateBalance);
String totalBalance = df.format(balance.totalBalance);
-
+
String transparentUCBalance = df.format(balance.transparentUnconfirmedBalance);
String privateUCBalance = df.format(balance.privateUnconfirmedBalance);
String totalUCBalance = df.format(balance.totalUnconfirmedBalance);
@@ -521,36 +466,36 @@ private void updateWalletStatusLabel()
String color1 = transparentBalance.equals(transparentUCBalance) ? "" : "color:#cc3300;";
String color2 = privateBalance.equals(privateUCBalance) ? "" : "color:#cc3300;";
String color3 = totalBalance.equals(totalUCBalance) ? "" : "color:#cc3300;";
-
+
String text =
- "" +
- "Transparent balance: " +
- transparentUCBalance + " ZCL
" +
- "Private (Z) balance: " +
- privateUCBalance + " ZCL
" +
- "Total (Z+T) balance: " +
- totalUCBalance + " ZCL " +
- "
";
-
+ "" +
+ "Transparent (T) balance: " +
+ transparentUCBalance + " ZCL
" +
+ "Private (Z) balance: " +
+ privateUCBalance + " ZCL
" +
+ "Total (Z+T) balance: " +
+ totalUCBalance + " ZCL "
+ + "
";
+
this.walletBalanceLabel.setText(text);
-
+
String toolTip = null;
if ((!transparentBalance.equals(transparentUCBalance)) ||
- (!privateBalance.equals(privateUCBalance)) ||
- (!totalBalance.equals(totalUCBalance)))
+ (!privateBalance.equals(privateUCBalance)) ||
+ (!totalBalance.equals(totalUCBalance)))
{
toolTip = "" +
- "Unconfirmed (unspendable) balance is being shown due to an
" +
- "ongoing transaction! Actual confirmed (spendable) balance is:
" +
- "
" +
- "Transparent: " + transparentBalance + " ZCL
" +
- "Private ( Z ): " + privateBalance + " ZCL
" +
- "Total ( Z+T ): " + totalBalance + " ZCL" +
- "";
+ "Unconfirmed (unspendable) balance is being shown due to an
" +
+ "ongoing transaction! Actual confirmed (spendable) balance is:
" +
+ "
" +
+ "Transparent: " + transparentBalance + " ZCL
" +
+ "Private ( Z ): " + privateBalance + " ZCL
" +
+ "Total ( Z+T ): " + totalBalance + " ZCL" +
+ "";
}
-
+
this.walletBalanceLabel.setToolTipText(toolTip);
-
+
if (this.parentFrame.isVisible())
{
this.backupTracker.handleWalletBalanceUpdate(balance.totalBalance);
@@ -559,23 +504,23 @@ private void updateWalletStatusLabel()
private void updateWalletTransactionsTable()
- throws WalletCallException, IOException, InterruptedException
+ throws WalletCallException, IOException, InterruptedException
{
String[][] newTransactionsData = this.transactionGatheringThread.getLastData();
-
+
// May be null - not even gathered once
if (newTransactionsData == null)
{
return;
}
-
+
if (Util.arraysAreDifferent(lastTransactionsData, newTransactionsData))
{
Log.info("Updating table of transactions...");
this.remove(transactionsTablePane);
this.add(transactionsTablePane = new JScrollPane(
- transactionsTable = this.createTransactionsTable(newTransactionsData)),
- BorderLayout.CENTER);
+ transactionsTable = this.createTransactionsTable(newTransactionsData)),
+ BorderLayout.CENTER);
}
lastTransactionsData = newTransactionsData;
@@ -586,25 +531,25 @@ private void updateWalletTransactionsTable()
private JTable createTransactionsTable(String rowData[][])
- throws WalletCallException, IOException, InterruptedException
+ throws WalletCallException, IOException, InterruptedException
{
String columnNames[] = { "Type", "Direction", "Confirmed?", "Amount", "Date", "Destination Address"};
- JTable table = new TransactionTable(
- rowData, columnNames, this.parentFrame, this.clientCaller, this.installationObserver);
- table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
- table.getColumnModel().getColumn(0).setPreferredWidth(190);
- table.getColumnModel().getColumn(1).setPreferredWidth(145);
- table.getColumnModel().getColumn(2).setPreferredWidth(170);
- table.getColumnModel().getColumn(3).setPreferredWidth(210);
- table.getColumnModel().getColumn(4).setPreferredWidth(405);
- table.getColumnModel().getColumn(5).setPreferredWidth(800);
-
- return table;
+ JTable table = new TransactionTable(
+ rowData, columnNames, this.parentFrame, this.clientCaller, this.installationObserver);
+ table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
+ table.getColumnModel().getColumn(0).setPreferredWidth(190);
+ table.getColumnModel().getColumn(1).setPreferredWidth(145);
+ table.getColumnModel().getColumn(2).setPreferredWidth(170);
+ table.getColumnModel().getColumn(3).setPreferredWidth(210);
+ table.getColumnModel().getColumn(4).setPreferredWidth(405);
+ table.getColumnModel().getColumn(5).setPreferredWidth(800);
+
+ return table;
}
private String[][] getTransactionsDataFromWallet()
- throws WalletCallException, IOException, InterruptedException
+ throws WalletCallException, IOException, InterruptedException
{
// Get available public+private transactions and unify them.
String[][] publicTransactions = this.clientCaller.getWalletPublicTransactions();
@@ -623,7 +568,7 @@ private String[][] getTransactionsDataFromWallet()
{
allTransactions[i++] = t;
}
-
+
// Sort transactions by date
Arrays.sort(allTransactions, new Comparator() {
public int compare(String[] o1, String[] o2)
@@ -649,12 +594,12 @@ public int compare(String[] o1, String[] o2)
}
}
});
-
-
+
+
// Confirmation symbols
String confirmed = "\u2690";
String notConfirmed = "\u2691";
-
+
// Windows does not support the flag symbol (Windows 7 by default)
// TODO: isolate OS-specific symbol codes in a separate class
OS_TYPE os = OSUtil.getOSType();
@@ -665,7 +610,7 @@ public int compare(String[] o1, String[] o2)
}
DecimalFormat df = new DecimalFormat("########0.00######");
-
+
// Change the direction and date etc. attributes for presentation purposes
for (String[] trans : allTransactions)
{
@@ -689,7 +634,7 @@ public int compare(String[] o1, String[] o2)
{
trans[4] = new Date(Long.valueOf(trans[4]).longValue() * 1000L).toLocaleString();
}
-
+
// Amount
try
{
@@ -702,24 +647,24 @@ public int compare(String[] o1, String[] o2)
} catch (NumberFormatException nfe)
{
Log.error("Error occurred while formatting amount: " + trans[3] +
- " - " + nfe.getMessage() + "!");
+ " - " + nfe.getMessage() + "!");
}
-
+
// Confirmed?
try
{
boolean isConfirmed = !trans[2].trim().equals("0");
-
+
trans[2] = isConfirmed ? ("Yes " + confirmed) : ("No " + notConfirmed);
} catch (NumberFormatException nfe)
{
Log.error("Error occurred while formatting confirmations: " + trans[2] +
- " - " + nfe.getMessage() + "!");
+ " - " + nfe.getMessage() + "!");
}
}
return allTransactions;
}
-
+
} // End class
diff --git a/src/java/com/vaklinov/zcashui/DataTable.java b/src/java/com/vaklinov/zcashui/DataTable.java
index 9c52dee8..1891ab70 100644
--- a/src/java/com/vaklinov/zcashui/DataTable.java
+++ b/src/java/com/vaklinov/zcashui/DataTable.java
@@ -82,7 +82,7 @@ public DataTable(final Object[][] rowData, final Object[] columnNames)
JMenuItem copy = new JMenuItem("Copy value");
popupMenu.add(copy);
- copy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, accelaratorKeyMask));
+ //copy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, accelaratorKeyMask));
copy.addActionListener(new ActionListener()
{
@Override
@@ -102,9 +102,9 @@ public void actionPerformed(ActionEvent e)
});
- JMenuItem exportToCSV = new JMenuItem("Export data to CSV...");
+ JMenuItem exportToCSV = new JMenuItem("Export data to CSV");
popupMenu.add(exportToCSV);
- exportToCSV.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, accelaratorKeyMask));
+ //exportToCSV.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, accelaratorKeyMask));
exportToCSV.addActionListener(new ActionListener()
{
@Override
@@ -192,7 +192,7 @@ private void exportToCSV()
final String ENCODING = "UTF-8";
JFileChooser fileChooser = new JFileChooser();
- fileChooser.setDialogTitle("Export data to CSV file...");
+ fileChooser.setDialogTitle("Export data to CSV file");
fileChooser.setFileFilter(new FileNameExtensionFilter("CSV Files (*.csv)", "csv"));
int result = fileChooser.showSaveDialog(this.getRootPane().getParent());
diff --git a/src/java/com/vaklinov/zcashui/PasswordDialog.java b/src/java/com/vaklinov/zcashui/PasswordDialog.java
index 77268166..bb60d9dc 100644
--- a/src/java/com/vaklinov/zcashui/PasswordDialog.java
+++ b/src/java/com/vaklinov/zcashui/PasswordDialog.java
@@ -71,7 +71,7 @@ public PasswordDialog(JFrame parent)
{
super(parent);
- this.setTitle("Password...");
+ this.setTitle("Password");
this.setLocation(parent.getLocation().x + 50, parent.getLocation().y + 50);
this.setModal(true);
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
@@ -161,6 +161,7 @@ protected void processOK()
{
JOptionPane.showMessageDialog(
PasswordDialog.this.getParent(),
+
"The password is empty. Please enter it into the text field.", "Empty...",
JOptionPane.ERROR_MESSAGE);
return;
diff --git a/src/java/com/vaklinov/zcashui/SingleKeyImportDialog.java b/src/java/com/vaklinov/zcashui/SingleKeyImportDialog.java
index 5cabb2ec..0e4cef18 100644
--- a/src/java/com/vaklinov/zcashui/SingleKeyImportDialog.java
+++ b/src/java/com/vaklinov/zcashui/SingleKeyImportDialog.java
@@ -77,7 +77,7 @@ public SingleKeyImportDialog(JFrame parent, ZCashClientCaller caller)
super(parent);
this.caller = caller;
- this.setTitle("Enter private key...");
+ this.setTitle("Enter private key");
this.setLocation(parent.getLocation().x + 50, parent.getLocation().y + 50);
this.setModal(true);
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
diff --git a/src/java/com/vaklinov/zcashui/TransactionTable.java b/src/java/com/vaklinov/zcashui/TransactionTable.java
index a33ee1a3..04cda327 100644
--- a/src/java/com/vaklinov/zcashui/TransactionTable.java
+++ b/src/java/com/vaklinov/zcashui/TransactionTable.java
@@ -69,8 +69,8 @@ public TransactionTable(final Object[][] rowData, final Object[] columnNames, fi
super(rowData, columnNames);
int accelaratorKeyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
- JMenuItem showDetails = new JMenuItem("Show details...");
- showDetails.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, accelaratorKeyMask));
+ JMenuItem showDetails = new JMenuItem("Show details");
+ //showDetails.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, accelaratorKeyMask));
popupMenu.add(showDetails);
showDetails.addActionListener(new ActionListener() {
@@ -98,7 +98,7 @@ public void actionPerformed(ActionEvent e) {
});
JMenuItem showInExplorer = new JMenuItem("Show in block explorer");
- showInExplorer.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, accelaratorKeyMask));
+ //showInExplorer.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, accelaratorKeyMask));
popupMenu.add(showInExplorer);
showInExplorer.addActionListener(new ActionListener() {
@@ -129,7 +129,7 @@ public void actionPerformed(ActionEvent e) {
});
JMenuItem showMemoField = new JMenuItem("Get transaction memo");
- showMemoField.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, accelaratorKeyMask));
+ //showMemoField.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, accelaratorKeyMask));
popupMenu.add(showMemoField);
showMemoField.addActionListener(new ActionListener() {
@@ -191,7 +191,7 @@ public void actionPerformed(ActionEvent e) {
private static class DetailsDialog extends JDialog {
public DetailsDialog(JFrame parent, Map details) throws UnsupportedEncodingException {
- this.setTitle("Transaction details...");
+ this.setTitle("Transaction details");
this.setSize(600, 310);
this.setLocation(100, 100);
this.setLocationRelativeTo(parent);
diff --git a/src/java/com/vaklinov/zcashui/Util.java b/src/java/com/vaklinov/zcashui/Util.java
index e63d2b59..4ba1cdfc 100644
--- a/src/java/com/vaklinov/zcashui/Util.java
+++ b/src/java/com/vaklinov/zcashui/Util.java
@@ -44,7 +44,6 @@
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonObject;
-import org.bitcoinj.core.Base58;
/**
* Utilities - generally reusable across classes.
@@ -436,12 +435,4 @@ public static byte[] loadFileInMemory(File f)
}
}
}
-
- public static String wifToHex(String wifKey) throws Exception {
- byte[] bytes = Base58.decode(wifKey);
- String pk = Util.encodeHexArray(bytes);
- pk = pk.substring(2, pk.length() - 10);
- return pk;
- }
-
}
diff --git a/src/java/com/vaklinov/zcashui/WalletOperations.java b/src/java/com/vaklinov/zcashui/WalletOperations.java
index b259c5a4..7d98bf37 100644
--- a/src/java/com/vaklinov/zcashui/WalletOperations.java
+++ b/src/java/com/vaklinov/zcashui/WalletOperations.java
@@ -436,7 +436,7 @@ public void importSinglePrivateKey()
/**
* export to Arizen wallet
- */
+ *
public void exportToArizenWallet()
{
final JDialog dialog = new JDialog(this.parent, "Exporting Arizen wallet");
@@ -586,7 +586,7 @@ public void run() {
errorReporter.reportError(ex, false);
}
}
-
+*/
private void issueBackupDirectoryWarning()
diff --git a/src/java/com/vaklinov/zcashui/ZCashUI.java b/src/java/com/vaklinov/zcashui/ZCashUI.java
index af81ccf4..bc42f03e 100644
--- a/src/java/com/vaklinov/zcashui/ZCashUI.java
+++ b/src/java/com/vaklinov/zcashui/ZCashUI.java
@@ -150,7 +150,7 @@ public ZCashUI(StartupProgressDialog progressDialog)
tabs.setFont(newTabFont);
BackupTracker backupTracker = new BackupTracker(this);
- tabs.addTab("Overview ",
+ tabs.addTab("Transactions ",
new ImageIcon(cl.getResource("images/overview.png")),
dashboard = new DashboardPanel(this, installationObserver, clientCaller,
errorReporter, backupTracker));
@@ -189,7 +189,7 @@ public ZCashUI(StartupProgressDialog progressDialog)
JMenu file = new JMenu("Main");
file.setMnemonic(KeyEvent.VK_M);
int accelaratorKeyMask = Toolkit.getDefaultToolkit ().getMenuShortcutKeyMask();
- file.add(menuItemAbout = new JMenuItem("About...", KeyEvent.VK_T));
+ file.add(menuItemAbout = new JMenuItem("About", KeyEvent.VK_T));
menuItemAbout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, accelaratorKeyMask));
file.addSeparator();
file.add(menuItemExit = new JMenuItem("Quit", KeyEvent.VK_Q));
@@ -198,17 +198,17 @@ public ZCashUI(StartupProgressDialog progressDialog)
JMenu wallet = new JMenu("Wallet");
wallet.setMnemonic(KeyEvent.VK_W);
- wallet.add(menuItemBackup = new JMenuItem("Backup...", KeyEvent.VK_B));
+ wallet.add(menuItemBackup = new JMenuItem("Backup", KeyEvent.VK_B));
menuItemBackup.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, accelaratorKeyMask));
- wallet.add(menuItemEncrypt = new JMenuItem("Encrypt...", KeyEvent.VK_E));
+ wallet.add(menuItemEncrypt = new JMenuItem("Encrypt", KeyEvent.VK_E));
menuItemEncrypt.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, accelaratorKeyMask));
- wallet.add(menuItemExportKeys = new JMenuItem("Export private keys...", KeyEvent.VK_K));
+ wallet.add(menuItemExportKeys = new JMenuItem("Export Private Keys", KeyEvent.VK_K));
menuItemExportKeys.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_K, accelaratorKeyMask));
- wallet.add(menuItemImportKeys = new JMenuItem("Import private keys...", KeyEvent.VK_I));
+ wallet.add(menuItemImportKeys = new JMenuItem("Import Private Keys", KeyEvent.VK_I));
menuItemImportKeys.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, accelaratorKeyMask));
- wallet.add(menuItemShowPrivateKey = new JMenuItem("Show private key...", KeyEvent.VK_P));
+ wallet.add(menuItemShowPrivateKey = new JMenuItem("Show Private Key", KeyEvent.VK_P));
menuItemShowPrivateKey.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, accelaratorKeyMask));
- wallet.add(menuItemImportOnePrivateKey = new JMenuItem("Import one private key...", KeyEvent.VK_N));
+ wallet.add(menuItemImportOnePrivateKey = new JMenuItem("Import One Private Key", KeyEvent.VK_N));
menuItemImportOnePrivateKey.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, accelaratorKeyMask));
/*
@@ -219,17 +219,17 @@ public ZCashUI(StartupProgressDialog progressDialog)
JMenu messaging = new JMenu("Messaging");
messaging.setMnemonic(KeyEvent.VK_S);
- messaging.add(menuItemOwnIdentity = new JMenuItem("My Identity...", KeyEvent.VK_D));
+ messaging.add(menuItemOwnIdentity = new JMenuItem("My Identity", KeyEvent.VK_D));
menuItemOwnIdentity.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, accelaratorKeyMask));
- messaging.add(menuItemExportOwnIdentity = new JMenuItem("Export my identity...", KeyEvent.VK_X));
+ messaging.add(menuItemExportOwnIdentity = new JMenuItem("Export My Identity", KeyEvent.VK_X));
menuItemExportOwnIdentity.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, accelaratorKeyMask));
- messaging.add(menuItemAddMessagingGroup = new JMenuItem("Add messaging group...", KeyEvent.VK_G));
+ messaging.add(menuItemAddMessagingGroup = new JMenuItem("Add Messaging Group", KeyEvent.VK_G));
menuItemAddMessagingGroup.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_G, accelaratorKeyMask));
- messaging.add(menuItemImportContactIdentity = new JMenuItem("Import contact identity...", KeyEvent.VK_Y));
+ messaging.add(menuItemImportContactIdentity = new JMenuItem("Import Contact Identity", KeyEvent.VK_Y));
menuItemImportContactIdentity.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, accelaratorKeyMask));
- messaging.add(menuItemRemoveContactIdentity = new JMenuItem("Remove contact...", KeyEvent.VK_R));
+ messaging.add(menuItemRemoveContactIdentity = new JMenuItem("Remove Contact", KeyEvent.VK_R));
menuItemRemoveContactIdentity.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, accelaratorKeyMask));
- messaging.add(menuItemMessagingOptions = new JMenuItem("Options...", KeyEvent.VK_O));
+ messaging.add(menuItemMessagingOptions = new JMenuItem("Options", KeyEvent.VK_O));
menuItemMessagingOptions.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, accelaratorKeyMask));
JMenu shareFileVia = new JMenu("Share file via:");
diff --git a/src/java/com/vaklinov/zcashui/msg/JContactListPanel.java b/src/java/com/vaklinov/zcashui/msg/JContactListPanel.java
index 29e1db1f..632f8a70 100644
--- a/src/java/com/vaklinov/zcashui/msg/JContactListPanel.java
+++ b/src/java/com/vaklinov/zcashui/msg/JContactListPanel.java
@@ -110,7 +110,7 @@ public JContactListPanel(MessagingPanel parent,
JPanel upperPanel = new JPanel(new BorderLayout(0, 0));
upperPanel.add(new JLabel(
- "Contact list: "),
+ "Contact list: "),
BorderLayout.WEST);
URL addIconUrl = this.getClass().getClassLoader().getResource("images/add12.png");
ImageIcon addIcon = new ImageIcon(addIconUrl);
@@ -235,7 +235,7 @@ public void mouseReleased(MouseEvent e)
JMenuItem showDetails = new JMenuItem("Show details...");
popupMenu.add(showDetails);
- showDetails.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, accelaratorKeyMask));
+ //showDetails.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, accelaratorKeyMask));
showDetails.addActionListener(new ActionListener()
{
@Override
@@ -253,7 +253,7 @@ public void actionPerformed(ActionEvent e)
JMenuItem removeContact = new JMenuItem("Remove...");
popupMenu.add(removeContact);
- removeContact.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, accelaratorKeyMask));
+ //removeContact.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, accelaratorKeyMask));
removeContact.addActionListener(new ActionListener()
{
@Override
@@ -265,7 +265,7 @@ public void actionPerformed(ActionEvent e)
JMenuItem sendContactDetails = new JMenuItem("Send contact details...");
popupMenu.add(sendContactDetails);
- sendContactDetails.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, accelaratorKeyMask));
+ //sendContactDetails.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, accelaratorKeyMask));
sendContactDetails.addActionListener(new ActionListener()
{
@Override
diff --git a/src/java/com/vaklinov/zcashui/msg/MessagingOptionsEditDialog.java b/src/java/com/vaklinov/zcashui/msg/MessagingOptionsEditDialog.java
index 9cb92834..c5396abd 100644
--- a/src/java/com/vaklinov/zcashui/msg/MessagingOptionsEditDialog.java
+++ b/src/java/com/vaklinov/zcashui/msg/MessagingOptionsEditDialog.java
@@ -94,7 +94,7 @@ public MessagingOptionsEditDialog(JFrame parentFrame, MessagingStorage storage,
tempPanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
infoLabel = new JLabel(
"" +
- "The options below pertain to messaging. It is posisble to set the amount of ZCL
" +
+ "The options below pertain to messaging. It is possible to set the amount of ZCL
" +
"to be sent with every messaging transaction and also the transaction fee. It is
" +
"also possible to decide if users are to be automatically added to the contact list.
" +
"");
@@ -134,7 +134,7 @@ public void actionPerformed(ActionEvent e)
}
});
- JButton saveButon = new JButton("Save & close");
+ JButton saveButon = new JButton("Save & Close");
buttonPanel.add(saveButon);
saveButon.addActionListener(new ActionListener()
{
diff --git a/src/java/com/vaklinov/zcashui/msg/MessagingPanel.java b/src/java/com/vaklinov/zcashui/msg/MessagingPanel.java
index 3608a75f..f43afbf7 100644
--- a/src/java/com/vaklinov/zcashui/msg/MessagingPanel.java
+++ b/src/java/com/vaklinov/zcashui/msg/MessagingPanel.java
@@ -171,9 +171,9 @@ public MessagingPanel(JFrame parentFrame, SendCashPanel sendCashPanel, JTabbedPa
this.conversationTextPane.addHyperlinkListener(new GroupLinkHandler());
JPanel upperPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
upperPanel.add(this.conversationLabel = new JLabel(
- "Conversation ..."));
+ "Conversation"));
upperPanel.add(new JLabel(
- " "));
+ " "));
upperPanel.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 3));
conversationPanel.add(upperPanel, BorderLayout.NORTH);
@@ -198,11 +198,11 @@ public void run() {
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER),
BorderLayout.CENTER);
- JLabel sendLabel = new JLabel("Message to send:");
+ JLabel sendLabel = new JLabel("Message:");
MessagingIdentity ownIdentity = this.messagingStorage.getOwnIdentity();
if (ownIdentity != null)
{
- sendLabel.setText("Message to send as: " + ownIdentity.getDiplayString());
+ sendLabel.setText("Sending as Identity: " + ownIdentity.getDiplayString());
}
sendLabel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
writePanel.add(sendLabel, BorderLayout.NORTH);
@@ -215,7 +215,7 @@ public void run() {
JLabel filler = new JLabel(" ");
filler.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
sendButtonPanel.add(filler); // filler
- sendButton = new JButton("Send message \u27A4\u27A4\u27A4");
+ sendButton = new JButton("Send Message \u27A4\u27A4\u27A4");
JPanel tempPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
tempPanel.add(sendButton);
sendButtonPanel.add(tempPanel);
@@ -226,9 +226,7 @@ public void run() {
tempPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
tempPanel.add(sendMessageProgressBar);
sendButtonPanel.add(tempPanel);
- sendResultLabel = new JLabel(
- "" +
- "Send status: ");
+ sendResultLabel = new JLabel();
tempPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
tempPanel.add(sendResultLabel);
sendButtonPanel.add(tempPanel);
@@ -1337,8 +1335,7 @@ private void sendMessage(String textToSend, MessagingIdentity remoteIdentity)
Log.error("Wallet call error in sending message: ", wce);
sendResultLabel.setText(
- "Send status: " +
- "ERROR! ");
+ "ERROR!");
JOptionPane.showMessageDialog(
MessagingPanel.this.getRootPane().getParent(),
"An error occurred upon sending message to contact: " + contactIdentity.getDiplayString() + ". \n" +
@@ -1395,14 +1392,12 @@ public void actionPerformed(ActionEvent e)
if (sendWasSuccessful)
{
sendResultLabel.setText(
- "Send status: " +
- "SUCCESSFUL");
+ "SUCCESSFUL");
} else
{
String errorMessage = clientCaller.getOperationFinalErrorMessage(operationStatusID);
sendResultLabel.setText(
- "Send status: " +
- "ERROR! ");
+ "ERROR! ");
JOptionPane.showMessageDialog(
MessagingPanel.this.getRootPane().getParent(),
"An error occurred when sending message to contact: " + contactIdentity.getDiplayString() + ". \n" +
@@ -1438,8 +1433,7 @@ public void actionPerformed(ActionEvent e)
{
// Update the progress
sendResultLabel.setText(
- "Send status: " +
- "IN PROGRESS");
+ "IN PROGRESS");
operationStatusCounter += 2;
int progress = 0;
if (operationStatusCounter <= 100)
diff --git a/src/resources/images/ZEN-yellow.orange-logo-small.png b/src/resources/images/ZEN-yellow.orange-logo-small.png
deleted file mode 100644
index 421d16dc..00000000
Binary files a/src/resources/images/ZEN-yellow.orange-logo-small.png and /dev/null differ
diff --git a/src/resources/images/ZEN-yellow.orange-logo.png b/src/resources/images/ZEN-yellow.orange-logo.png
deleted file mode 100644
index 8f550a04..00000000
Binary files a/src/resources/images/ZEN-yellow.orange-logo.png and /dev/null differ
diff --git a/src/resources/images/address-book.png b/src/resources/images/address-book.png
index e7b9bb0a..2421b61e 100644
Binary files a/src/resources/images/address-book.png and b/src/resources/images/address-book.png differ
diff --git a/src/resources/images/address-book_.png b/src/resources/images/address-book_.png
new file mode 100644
index 00000000..e7b9bb0a
Binary files /dev/null and b/src/resources/images/address-book_.png differ
diff --git a/src/resources/images/messaging.png b/src/resources/images/messaging.png
index a0108e55..466be16b 100644
Binary files a/src/resources/images/messaging.png and b/src/resources/images/messaging.png differ
diff --git a/src/resources/images/messaging_.png b/src/resources/images/messaging_.png
new file mode 100644
index 00000000..a0108e55
Binary files /dev/null and b/src/resources/images/messaging_.png differ
diff --git a/src/resources/images/overview.png b/src/resources/images/overview.png
index ca7e43e8..f6d9e5c7 100644
Binary files a/src/resources/images/overview.png and b/src/resources/images/overview.png differ
diff --git a/src/resources/images/overview_.png b/src/resources/images/overview_.png
new file mode 100644
index 00000000..ca7e43e8
Binary files /dev/null and b/src/resources/images/overview_.png differ
diff --git a/src/resources/images/own-addresses.png b/src/resources/images/own-addresses.png
index 0933be2c..b36dcb55 100644
Binary files a/src/resources/images/own-addresses.png and b/src/resources/images/own-addresses.png differ
diff --git a/src/resources/images/own-addresses_.png b/src/resources/images/own-addresses_.png
new file mode 100644
index 00000000..0933be2c
Binary files /dev/null and b/src/resources/images/own-addresses_.png differ
diff --git a/src/resources/images/send.png b/src/resources/images/send.png
index b4841dd1..4b87a034 100644
Binary files a/src/resources/images/send.png and b/src/resources/images/send.png differ
diff --git a/src/resources/images/send_.png b/src/resources/images/send_.png
new file mode 100644
index 00000000..b4841dd1
Binary files /dev/null and b/src/resources/images/send_.png differ
diff --git a/src/resources/images/zclassic-logo.icns b/src/resources/images/zclassic-logo.icns
new file mode 100644
index 00000000..9c0742d2
Binary files /dev/null and b/src/resources/images/zclassic-logo.icns differ