[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/impl/gui/customcontrols/

yanas at dev.java.net yanas at dev.java.net
Thu Apr 12 15:21:40 CEST 2007


User: yanas   
Date: 2007-04-12 13:21:40+0000
Modified:
   sip-communicator/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommDialog.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java

Log:
 error dialog enhancements

File Changes:

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

File [changed]: SIPCommDialog.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommDialog.java?r1=1.13&r2=1.14
Delta lines:  +3 -1
-------------------
--- SIPCommDialog.java	2007-02-09 10:34:36+0000	1.13
+++ SIPCommDialog.java	2007-04-12 13:21:38+0000	1.14
@@ -212,6 +212,8 @@
     {   
         if(isVisible) {
             this.pack();
+            
+            if(isSaveSizeAndLocation)
             this.setSizeAndLocation();
             
             JButton button = this.getRootPane().getDefaultButton();

File [changed]: ErrorDialog.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java?r1=1.4&r2=1.5
Delta lines:  +10 -7
--------------------
--- ErrorDialog.java	2007-02-06 23:39:35+0000	1.4
+++ ErrorDialog.java	2007-04-12 13:21:38+0000	1.5
@@ -7,10 +7,7 @@
 
 package net.java.sip.communicator.impl.gui.customcontrols;
 
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.Frame;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 
@@ -61,9 +58,9 @@
 
     private JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
 
-    private JPanel messagePanel = new JPanel(new BorderLayout(5, 5));
+    private JPanel messagePanel = new JPanel(new BorderLayout(20, 15));
 
-    private JPanel mainPanel = new JPanel(new BorderLayout());
+    private JPanel mainPanel = new JPanel(new BorderLayout(10, 10));
     
     public static final int WARNING = 1;
     
@@ -80,7 +77,7 @@
         
         this.setTitle(Messages.getI18NString("removeContact").getText());
 
-        this.messagePanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
+        this.mainPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 10, 20));
         
         this.stackTraceScrollPane.setBorder(new SIPCommBorders.BoldRoundBorder());
         this.stackTraceScrollPane.setHorizontalScrollBarPolicy(
@@ -224,6 +221,12 @@
     public void showDialog()
     {
         this.pack();
+        
+        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        
+        this.setLocation(screenSize.width/2 - this.getWidth()/2,
+                screenSize.height/2 - this.getHeight()/2);
+        
         this.setVisible(true);
     }
     




---------------------------------------------------------------------
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