summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorPhillip <pacardon@u.washington.edu>2011-03-05 05:34:51 +0000
committerPhillip <pacardon@u.washington.edu>2011-03-05 05:34:51 +0000
commit693cb18e45051b4a3784915000b3297623e82240 (patch)
treec6d77c86e71b50f40f5703aaa9fecc6fb914bc44 /src/common
parentde74be60dcce6b06adead2bb4483d71758a7f7c5 (diff)
Changes from email:
1: I had to pass Peer to Chatbox as a parameter to allow it to transmit messages (working!) 2: Added Chatbox option in networking menu. 3: Hitting <enter> or submit with Chatbox having focus transmits message in the Textfield 4: Made a getter in Peer to get the PeerInformation.toString()
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Peer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/Peer.java b/src/common/Peer.java
index 732043b..91c2f2c 100644
--- a/src/common/Peer.java
+++ b/src/common/Peer.java
@@ -514,7 +514,7 @@ public class Peer extends Observable {
if (mesg.id != null && mesg.id.equals(PeerMessage.DEFAULT_ID)) {
setChanged();
- notifyObservers(mesg.extra);
+ notifyObservers(mesg);
}
break;
@@ -585,4 +585,8 @@ public class Peer extends Observable {
if (logEnabled)
System.out.println(new Date() + " -- " + text);
}
+
+ public String getMyName() {
+ return myInfo.toString();
+ }
}