[Webfunds-commits] java/webfunds/client AccountBrowserImpl.java SimplePaymentFrame.java WalletInterface.java Manager.java StoreChanger.java

Ian Grigg iang@cypherpunks.ai
Fri, 13 Apr 2001 22:59:08 -0400 (AST)


iang        01/04/13 22:59:08

  Modified:    webfunds/client AccountBrowserImpl.java
                        SimplePaymentFrame.java WalletInterface.java
  Removed:     webfunds/client Manager.java StoreChanger.java
  Log:
  minor cleanups, info

Revision  Changes    Path
1.88      +18 -2     java/webfunds/client/AccountBrowserImpl.java

Index: AccountBrowserImpl.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/AccountBrowserImpl.java,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- AccountBrowserImpl.java	2001/04/13 17:39:48	1.87
+++ AccountBrowserImpl.java	2001/04/14 02:59:07	1.88
@@ -1,5 +1,5 @@
 /*
- * $Id: AccountBrowserImpl.java,v 1.87 2001/04/13 17:39:48 iang Exp $
+ * $Id: AccountBrowserImpl.java,v 1.88 2001/04/14 02:59:07 iang Exp $
  *
  * Copyright (c) Systemics Inc 1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -17,6 +17,7 @@
 import java.util.*;
 
 import webfunds.util.Panic;
+import webfunds.util.Log;
 import webfunds.util.Hex;
 
 import webfunds.utils.Debug;
@@ -73,10 +74,25 @@
     private boolean init;
 
     final static String me = "WebFunds"; // replace with property!
+    public final static String TAB = "  ",
+                               fix = "AB: ";
 
+    public AccountBrowserImpl(Log bug)
+    {
+        debug(bug, TAB + fix);
+        init();
+    }
     public AccountBrowserImpl(PrintWriter bug)
+    {
+        if (bug instanceof Log)
+            debug(bug, TAB + fix);
+        else
+            debug(new Log(bug), TAB + fix);
+        init();
+    }
+
+    public void init()
     {
-        debug(new PrintWriter(bug, true), "  AB: ");
         init = true;
         wallets = new WalletInterface[0];    // for consistency
         plugins = new PluginInfo[0];



1.56      +11 -5     java/webfunds/client/SimplePaymentFrame.java

Index: SimplePaymentFrame.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/SimplePaymentFrame.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- SimplePaymentFrame.java	2001/04/12 19:02:49	1.55
+++ SimplePaymentFrame.java	2001/04/14 02:59:07	1.56
@@ -1,5 +1,5 @@
 /*
- * $Id: SimplePaymentFrame.java,v 1.55 2001/04/12 19:02:49 iang Exp $
+ * $Id: SimplePaymentFrame.java,v 1.56 2001/04/14 02:59:07 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -50,17 +50,18 @@
     JTextArea description;
     JComboBox target2;
     ItemId contractid;
+    Contract contract;
 
 
     public SimplePaymentFrame() { }
 
 
-    public void init(WalletInterface wi, AccountInfo source, ItemId contract)
+    public void init(WalletInterface wi, AccountInfo source, ItemId itemid)
         throws ModeNotSupportedException
     {
         this.wallet     = wi;
         this.source     = source;
-        this.contractid = contract;
+        this.contractid = itemid;
 
 
         //
@@ -94,7 +95,13 @@
         validTill   = new JTextField(15);
         paymentArea = new TextArea(20, 55);
         description = new JTextArea(5, 15);
-        frame       = new JFrame("Payment from account: " + source.toString());
+
+        contract = this.cs.getContract(contractid);
+
+        String title = "Payment in " + contract.getName() +
+                       " from account: " + source.toString();
+
+        frame       = new JFrame(title);
         JPanel pane = (JPanel)frame.getContentPane();
             
         JLabel amountlbl        = new JLabel("Amount:");
@@ -269,7 +276,6 @@
         //
 
         // amount in units of contract
-        Contract contract = this.cs.getContract(contractid);
         double dub;
         try {
             dub = new Double(amount.getText()).doubleValue();



1.41      +5 -2      java/webfunds/client/WalletInterface.java

Index: WalletInterface.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/WalletInterface.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- WalletInterface.java	2000/11/30 16:41:04	1.40
+++ WalletInterface.java	2001/04/14 02:59:08	1.41
@@ -1,5 +1,5 @@
 /*
- * $Id: WalletInterface.java,v 1.40 2000/11/30 16:41:04 gelderen Exp $
+ * $Id: WalletInterface.java,v 1.41 2001/04/14 02:59:08 iang Exp $
  *
  * Copyright (c) 1995-2000 Systemics Ltd on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -9,6 +9,8 @@
 import java.io.File;
 import java.io.PrintWriter;
 import java.util.Date;
+
+import webfunds.util.Log;
 import webfunds.sox.ItemId;
 import webfunds.client.plugins.WalletContext;
 
@@ -55,7 +57,8 @@
     /**
      *  A debugging interface, set this PrintWriter as where logs go.
      */
-    void debug(PrintWriter bug);
+    void debug(PrintWriter bug);   // XXX: deprecated for below
+    // void debug(Log bug);
 
     /**
      *  Set the WalletContext so the WI can access the other components.