diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2013-01-23 06:33:56 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2013-01-23 06:33:56 +0000 |
commit | d159612c041194815698ac0d2b272251dce5015b (patch) | |
tree | 1b85eabc958f7ef7a9d709f568b360502b748d13 /src/net/java/sip/communicator/util | |
parent | b74e347fa8d15c73dd864c2b399cf2b164d68041 (diff) | |
download | jitsi-d159612c041194815698ac0d2b272251dce5015b.zip jitsi-d159612c041194815698ac0d2b272251dce5015b.tar.gz jitsi-d159612c041194815698ac0d2b272251dce5015b.tar.bz2 |
Restores full-screen display support in calls.
Diffstat (limited to 'src/net/java/sip/communicator/util')
-rw-r--r-- | src/net/java/sip/communicator/util/swing/OrderedTransparentPanel.java | 16 | ||||
-rw-r--r-- | src/net/java/sip/communicator/util/swing/SIPCommFrame.java | 44 |
2 files changed, 34 insertions, 26 deletions
diff --git a/src/net/java/sip/communicator/util/swing/OrderedTransparentPanel.java b/src/net/java/sip/communicator/util/swing/OrderedTransparentPanel.java index ebc358e..47afff3 100644 --- a/src/net/java/sip/communicator/util/swing/OrderedTransparentPanel.java +++ b/src/net/java/sip/communicator/util/swing/OrderedTransparentPanel.java @@ -12,6 +12,7 @@ import java.awt.*; * Ordered transparent panel. Components added to the panel * must implement OrderedComponent to be able to order them or * will leave the parent to add them as usual. + * * @author Damian Minkov */ public class OrderedTransparentPanel @@ -19,12 +20,11 @@ public class OrderedTransparentPanel { private static final long serialVersionUID = 0L; + @Override public Component add(Component comp) { if(comp instanceof OrderedComponent) - { return addOrdered(comp); - } else return super.add(comp); } @@ -42,24 +42,22 @@ public class OrderedTransparentPanel // don't add a component if already added or it will be removed // and added at the end - for(int i = 0; i < cs.length; i++) + for(Component c : cs) { - if(cs[i].equals(comp)) + if(c.equals(comp)) return comp; } for(int i = 0; i < cs.length; i++) { Component c = cs[i]; - int cIx; + if(c instanceof OrderedComponent) { - cIx = ((OrderedComponent) c).getIndex(); + int cIndex = ((OrderedComponent) c).getIndex(); - if(orederIndex < cIx) - { + if(orederIndex < cIndex) return super.add(comp, i); - } } } diff --git a/src/net/java/sip/communicator/util/swing/SIPCommFrame.java b/src/net/java/sip/communicator/util/swing/SIPCommFrame.java index fb981c1..4462987 100644 --- a/src/net/java/sip/communicator/util/swing/SIPCommFrame.java +++ b/src/net/java/sip/communicator/util/swing/SIPCommFrame.java @@ -85,11 +85,11 @@ public class SIPCommFrame { // If on MacOS we would use the native background. if (!OSUtils.IS_MAC) - this.setContentPane(new MainContentPane()); + setContentPane(new MainContentPane()); init(); - this.addWindowListener(new FrameWindowAdapter()); + addWindowListener(new FrameWindowAdapter()); JRootPane rootPane = getRootPane(); amap = rootPane.getActionMap(); @@ -152,18 +152,18 @@ public class SIPCommFrame { private static final long serialVersionUID = 0L; { - add(UtilActivator - .getImage("service.gui.SIP_COMMUNICATOR_LOGO")); - add(UtilActivator - .getImage("service.gui.SIP_COMMUNICATOR_LOGO_20x20")); - add(UtilActivator - .getImage("service.gui.SIP_COMMUNICATOR_LOGO_32x32")); - add(UtilActivator - .getImage("service.gui.SIP_COMMUNICATOR_LOGO_45x45")); - add(UtilActivator - .getImage("service.gui.SIP_COMMUNICATOR_LOGO_64x64")); - add(UtilActivator - .getImage("service.gui.SIP_COMMUNICATOR_LOGO_128x128")); + add(UtilActivator.getImage( + "service.gui.SIP_COMMUNICATOR_LOGO")); + add(UtilActivator.getImage( + "service.gui.SIP_COMMUNICATOR_LOGO_20x20")); + add(UtilActivator.getImage( + "service.gui.SIP_COMMUNICATOR_LOGO_32x32")); + add(UtilActivator.getImage( + "service.gui.SIP_COMMUNICATOR_LOGO_45x45")); + add(UtilActivator.getImage( + "service.gui.SIP_COMMUNICATOR_LOGO_64x64")); + add(UtilActivator.getImage( + "service.gui.SIP_COMMUNICATOR_LOGO_128x128")); } }; m.invoke(this, logos); @@ -172,10 +172,10 @@ public class SIPCommFrame } catch (Exception e) { - Image scLogo = - UtilActivator.getImage("service.gui.SIP_COMMUNICATOR_LOGO"); - this.setIconImage(scLogo); + Image scLogo + = UtilActivator.getImage("service.gui.SIP_COMMUNICATOR_LOGO"); + setIconImage(scLogo); // In order to have the same icon when using option panes JOptionPane.getRootFrame().setIconImage(scLogo); } @@ -304,6 +304,16 @@ public class SIPCommFrame } /** + * Invokes the {@link Window#dispose()} implementation of this instance + * thus skipping any overriding that may be in effect for the method in + * question by extenders. + */ + protected void windowDispose() + { + super.dispose(); + } + + /** * Saves the size and the location of this frame through the * <tt>ConfigurationService</tt>. */ |