[Webfunds-commits] java/webfunds/client AccountBrowserImpl.java
Ian Grigg
iang@cypherpunks.ai
Fri, 13 Apr 2001 13:39:49 -0400 (AST)
iang 01/04/13 13:39:49
Modified: webfunds/client AccountBrowserImpl.java
Log:
minor Info display improvements
Revision Changes Path
1.87 +16 -8 java/webfunds/client/AccountBrowserImpl.java
Index: AccountBrowserImpl.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/AccountBrowserImpl.java,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- AccountBrowserImpl.java 2001/03/20 23:33:07 1.86
+++ AccountBrowserImpl.java 2001/04/13 17:39:48 1.87
@@ -1,5 +1,5 @@
/*
- * $Id: AccountBrowserImpl.java,v 1.86 2001/03/20 23:33:07 iang Exp $
+ * $Id: AccountBrowserImpl.java,v 1.87 2001/04/13 17:39:48 iang Exp $
*
* Copyright (c) Systemics Inc 1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -16,10 +16,14 @@
import java.io.*;
import java.util.*;
+import webfunds.util.Panic;
+import webfunds.util.Hex;
+
import webfunds.utils.Debug;
-import webfunds.utils.Panic;
+
import webfunds.client.sun.ExampleFileFilter;
import webfunds.sox.*;
+
import webfunds.client.sox.*;
import webfunds.client.sun.JTreeTable;
import webfunds.ricardian.Contract;
@@ -819,12 +823,13 @@
//this is DUMB! should ask the wallet for its info display...
- String msg = "Hash of the account is: " +
- webfunds.utils.Hex.data2hex(acct.getByteArray());
+ String msg = acct.getFullName();
+ // Hex.data2hex(acct.getByteArray());
text.setText(msg);
text.setEditable(false);
text.setBackground(frame.getBackground());
- JOptionPane.showMessageDialog(frame, text, "Account information",
+ JOptionPane.showMessageDialog(frame, text,
+ "Account information for " + acct,
JOptionPane.INFORMATION_MESSAGE);
}
};
@@ -915,6 +920,9 @@
String q2 = "New Contract name";
String name = JOptionPane.showInputDialog(frame, q1, q2,
JOptionPane.QUESTION_MESSAGE);
+ if (name == null || name.length() < 0)
+ return;
+
Contract contract = (Contract)obj;
try {
contract.setApplicationName(name);
@@ -1010,10 +1018,10 @@
String s = "";
if (obj instanceof Contract)
- s += "Contract " + ((Contract)obj).toString();
+ s += "Contract \"" + ((Contract)obj).toString() + "\" has Hash:";
else
- s += "(Contract is not available)";
- s += "\n\nHash of the contract is:\n\n" + hash;
+ s += "(Contract is unknown) Hash is";
+ s += "\n\n" + hash;
text.setText(s);
text.setEditable(false);