[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/, /sip-communicator/src/net/java/sip/communicator/service/gui/, /sip...

yanas at dev.java.net yanas at dev.java.net
Mon May 21 18:15:58 CEST 2007


User: yanas   
Date: 2007-05-21 16:15:58+0000
Modified:
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
   sip-communicator/src/net/java/sip/communicator/service/gui/Chat.java
   sip-communicator/src/net/java/sip/communicator/service/gui/UIService.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java

Log:
 obtain the message that is contained in the chat panel

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/
==============================================================================

File [changed]: ChatWindowManager.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java?r1=1.5&r2=1.6
Delta lines:  +8 -0
-------------------
--- ChatWindowManager.java	2007-04-24 12:25:47+0000	1.5
+++ ChatWindowManager.java	2007-05-21 16:15:56+0000	1.6
@@ -317,6 +317,14 @@
         }
     }
     
+    public ChatPanel getSelectedChat()
+    {
+        synchronized (syncChat)
+        {
+            return chatWindow.getCurrentChatPanel();
+        }
+    }
+    
     /**
      * Returns the chat panel corresponding to the given chat room.
      *

File [changed]: ChatPanel.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java?r1=1.2&r2=1.3
Delta lines:  +8 -1
-------------------
--- ChatPanel.java	2007-04-11 14:15:53+0000	1.2
+++ ChatPanel.java	2007-05-21 16:15:56+0000	1.3
@@ -19,7 +19,6 @@
 import net.java.sip.communicator.impl.gui.main.contactlist.*;
 import net.java.sip.communicator.impl.gui.utils.*;
 import net.java.sip.communicator.service.contactlist.*;
-import net.java.sip.communicator.service.contactlist.event.*;
 import net.java.sip.communicator.service.gui.*;
 import net.java.sip.communicator.service.gui.event.*;
 import net.java.sip.communicator.service.protocol.*;
@@ -604,6 +603,14 @@
     }
     
     /**
+     * 
+     */
+    public String getMessage()
+    {
+        return writeMessagePanel.getEditorPane().getText();
+    }
+    
+    /**
      * Informs all <tt>ChatFocusListener</tt>s that a <tt>ChatFocusEvent</tt>
      * has been triggered.
      * 

Directory: /sip-communicator/src/net/java/sip/communicator/service/gui/
=======================================================================

File [changed]: Chat.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/service/gui/Chat.java?r1=1.1&r2=1.2
Delta lines:  +7 -0
-------------------
--- Chat.java	2007-04-11 14:10:32+0000	1.1
+++ Chat.java	2007-05-21 16:15:56+0000	1.2
@@ -27,6 +27,13 @@
     public boolean isChatFocused();
     
     /**
+     * 
+     * @return
+     */
+    public String getMessage();
+    
+    
+    /**
      * Adds the given <tt>ChatFocusListener</tt> to this <tt>Chat</tt>.
      * The <tt>ChatFocusListener</tt> is used to inform other bundles when a
      * chat has changed its focus state.

File [changed]: UIService.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/service/gui/UIService.java?r1=1.18&r2=1.19
Delta lines:  +7 -0
-------------------
--- UIService.java	2007-05-21 12:11:53+0000	1.18
+++ UIService.java	2007-05-21 16:15:56+0000	1.19
@@ -265,6 +265,13 @@
     public Chat getChat(Contact contact);
     
     /**
+     * Returns the selected <tt>Chat</tt>.
+     * 
+     * @return the selected <tt>Chat</tt>.
+     */
+    public Chat getCurrentChat();
+    
+    /**
      * Returns an <tt>ExportableComponent</tt> that corresponds to an
      * authentication window for the given protocol provider and user
      * inromation. Initially this method is meant to be used by the

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/
====================================================================

File [changed]: UIServiceImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java?r1=1.35&r2=1.36
Delta lines:  +12 -0
--------------------
--- UIServiceImpl.java	2007-05-21 12:11:53+0000	1.35
+++ UIServiceImpl.java	2007-05-21 16:15:56+0000	1.36
@@ -527,6 +527,18 @@
     }   
 
     /**
+     * Returns the selected <tt>Chat</tt>.
+     * 
+     * @return the selected <tt>Chat</tt>.
+     */
+    public Chat getCurrentChat()
+    {
+        ChatWindowManager chatWindowManager = mainFrame.getChatWindowManager();
+        
+        return chatWindowManager.getSelectedChat();
+    }
+    
+    /**
      * Implements the <code>UIService.isContainerSupported</code> method.
      * Checks if the plugable container with the given ContainerID is supported
      * by this implementation.




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net





More information about the commits mailing list