aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/gui/main
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2007-11-09 10:16:52 +0000
committerYana Stamcheva <yana@jitsi.org>2007-11-09 10:16:52 +0000
commit42cb38e84b3ff2e3682a0085dfc0d326c54b0a66 (patch)
tree5f3bb7aad5ca9485fbf804be60da7fafe1c39d51 /src/net/java/sip/communicator/impl/gui/main
parenta2022025f9a7dcddffc2a526796b7870c75bbbe0 (diff)
downloadjitsi-42cb38e84b3ff2e3682a0085dfc0d326c54b0a66.zip
jitsi-42cb38e84b3ff2e3682a0085dfc0d326c54b0a66.tar.gz
jitsi-42cb38e84b3ff2e3682a0085dfc0d326c54b0a66.tar.bz2
Add MainTabbedPane to the supported plugin containers.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main')
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/MainTabbedPane.java38
1 files changed, 34 insertions, 4 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/MainTabbedPane.java b/src/net/java/sip/communicator/impl/gui/main/MainTabbedPane.java
index 92756c3..6873510 100755
--- a/src/net/java/sip/communicator/impl/gui/main/MainTabbedPane.java
+++ b/src/net/java/sip/communicator/impl/gui/main/MainTabbedPane.java
@@ -11,12 +11,15 @@ import java.awt.*;
import javax.swing.event.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.main.chatroomslist.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.service.gui.*;
+import net.java.sip.communicator.service.gui.event.*;
/**
* The <tt>MainTabbedPane</tt> is a <tt>SIPCommTabbedPane</tt> that contains
@@ -27,7 +30,8 @@ import net.java.sip.communicator.impl.gui.utils.*;
*/
public class MainTabbedPane
extends SIPCommTabbedPane
- implements ChangeListener
+ implements ChangeListener,
+ PluginComponentListener
{
private DialPanel dialPanel;
@@ -50,11 +54,11 @@ public class MainTabbedPane
contactListPanel = new ContactListPanel(parent);
callHistoryPanel = new CallListPanel(parent);
-
+
dialPanel = new DialPanel(parent.getCallManager());
-
+
chatRoomsListPanel = new ChatRoomsListPanel(parent);
-
+
this.addTab(Messages.getI18NString("contacts").getText(),
contactListPanel);
this.addTab(Messages.getI18NString("chatRooms").getText(),
@@ -64,6 +68,8 @@ public class MainTabbedPane
this.addTab(Messages.getI18NString("dial").getText(), dialPanel);
this.addChangeListener(this);
+
+ GuiActivator.getUIService().addPluginComponentListener(this);
}
/**
@@ -126,4 +132,28 @@ public class MainTabbedPane
GuiUtils.requestFocus(chatRoomList);
}
}
+
+ public void pluginComponentAdded(PluginComponentEvent event)
+ {
+ Component c = (Component) event.getSource();
+
+ if(event.getContainerID()
+ .equals(UIService.CONTAINER_MAIN_TABBED_PANE))
+ {
+ this.addTab(c.getName(), c);
+
+ this.repaint();
+ }
+ }
+
+ public void pluginComponentRemoved(PluginComponentEvent event)
+ {
+ Component c = (Component) event.getSource();
+
+ if(event.getContainerID()
+ .equals(UIService.CONTAINER_MAIN_TABBED_PANE))
+ {
+ this.remove(c);
+ }
+ }
}