diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-03-12 23:53:03 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-03-12 23:53:03 +0000 |
commit | 5256f0c86006c489e15a4b76709732d43ce53617 (patch) | |
tree | b9775757a32dd14f98804f5350f6f028606c358f /src/net/java/sip/communicator/util/swing/SIPCommFrame.java | |
parent | 68312559fe55e1030c6fb00ae72d25212ee4d918 (diff) | |
download | jitsi-5256f0c86006c489e15a4b76709732d43ce53617.zip jitsi-5256f0c86006c489e15a4b76709732d43ce53617.tar.gz jitsi-5256f0c86006c489e15a4b76709732d43ce53617.tar.bz2 |
Fixes a couple of occurrences of incorrect code, performance-related warnings.
Diffstat (limited to 'src/net/java/sip/communicator/util/swing/SIPCommFrame.java')
-rw-r--r-- | src/net/java/sip/communicator/util/swing/SIPCommFrame.java | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/net/java/sip/communicator/util/swing/SIPCommFrame.java b/src/net/java/sip/communicator/util/swing/SIPCommFrame.java index db14b42..07b5311 100644 --- a/src/net/java/sip/communicator/util/swing/SIPCommFrame.java +++ b/src/net/java/sip/communicator/util/swing/SIPCommFrame.java @@ -135,22 +135,9 @@ public abstract class SIPCommFrame */ private void saveSizeAndLocation() { - ConfigurationService configService = - UtilActivator.getConfigurationService(); - - String className = this.getClass().getName(); - try { - configService.setProperty(className + ".width", new Integer( - getWidth())); - - configService.setProperty(className + ".height", new Integer( - getHeight())); - - configService.setProperty(className + ".x", new Integer(getX())); - - configService.setProperty(className + ".y", new Integer(getY())); + saveSizeAndLocation(this); } catch (PropertyVetoException e1) { @@ -159,6 +146,18 @@ public abstract class SIPCommFrame } } + static void saveSizeAndLocation(Component component) + throws PropertyVetoException + { + ConfigurationService config = UtilActivator.getConfigurationService(); + String className = component.getClass().getName(); + + config.setProperty(className + ".width", component.getWidth()); + config.setProperty(className + ".height", component.getHeight()); + config.setProperty(className + ".x", component.getX()); + config.setProperty(className + ".y", component.getY()); + } + /** * Sets window size and position. */ |