aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java
diff options
context:
space:
mode:
authorhristoterezov <hristo@jitsi.org>2013-11-22 12:30:20 +0200
committerhristoterezov <hristo@jitsi.org>2013-11-22 12:30:20 +0200
commita4e09b9f3c55c195a3fa078f02ccff137cebc447 (patch)
treeb5d7213896edfa4137e1f7b998b6b2a3a19fc87b /src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java
parent463d4b3a843b266269f29b0dfc181f2f5761f5af (diff)
downloadjitsi-a4e09b9f3c55c195a3fa078f02ccff137cebc447.zip
jitsi-a4e09b9f3c55c195a3fa078f02ccff137cebc447.tar.gz
jitsi-a4e09b9f3c55c195a3fa078f02ccff137cebc447.tar.bz2
Implements chat room contacts action buttons and right menu actions.
Diffstat (limited to 'src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java')
-rw-r--r--src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java46
1 files changed, 37 insertions, 9 deletions
diff --git a/src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java b/src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java
index e4f8f24..f2791ee 100644
--- a/src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java
+++ b/src/net/java/sip/communicator/impl/muc/ChatRoomSourceContact.java
@@ -39,14 +39,21 @@ public class ChatRoomSourceContact
private ProtocolProviderService provider;
/**
- *
- * @param chatRoomName
- * @param chatRoomID
- * @param query
- * @param pps
+ * The protocol provider of the chat room associated with the contact.
+ */
+ private boolean isAutoJoin;
+
+ /**
+ * Contsructs new chat room source contact.
+ * @param chatRoomName the name of the chat room associated with the room.
+ * @param chatRoomID the id of the chat room associated with the room.
+ * @param query the query associated with the contact.
+ * @param pps the protocol provider of the contact.
+ * @param isAutoJoin the auto join state.
*/
public ChatRoomSourceContact(String chatRoomName,
- String chatRoomID, ChatRoomQuery query, ProtocolProviderService pps)
+ String chatRoomID, ChatRoomQuery query, ProtocolProviderService pps,
+ boolean isAutoJoin)
{
super(query, query.getContactSource(), chatRoomName,
generateDefaultContactDetails(chatRoomName));
@@ -55,17 +62,21 @@ public class ChatRoomSourceContact
this.chatRoomID = chatRoomID;
this.provider = pps;
this.parentQuery = query;
+ this.isAutoJoin = isAutoJoin;
initContactProperties(getChatRoomStateByName());
}
/**
+ * Constructs new chat room source contact.
*
- * @param chatRoom
- * @param query
+ * @param chatRoom the chat room associated with the contact.
+ * @param query the query associated with the contact.
+ * @param isAutoJoin the auto join state
*/
- public ChatRoomSourceContact(ChatRoom chatRoom, ChatRoomQuery query)
+ public ChatRoomSourceContact(ChatRoom chatRoom, ChatRoomQuery query,
+ boolean isAutoJoin)
{
super(query, query.getContactSource(), chatRoom.getName(),
generateDefaultContactDetails(chatRoom.getName()));
@@ -74,6 +85,7 @@ public class ChatRoomSourceContact
this.chatRoomID = chatRoom.getIdentifier();
this.provider = chatRoom.getParentProvider();
this.parentQuery = query;
+ this.isAutoJoin = isAutoJoin;
initContactProperties(
(chatRoom.isJoined()?
@@ -179,5 +191,21 @@ public class ChatRoomSourceContact
return parentQuery.indexOf(this);
}
+ /**
+ * Returns the auto join state of the contact.
+ * @return the auto join state of the contact.
+ */
+ public boolean isAutoJoin()
+ {
+ return isAutoJoin;
+ }
+ /**
+ * Sets the auto join state of the contact.
+ * @param isAutoJoin the auto join state to be set.
+ */
+ public void setAutoJoin(boolean isAutoJoin)
+ {
+ this.isAutoJoin = isAutoJoin;
+ }
}