diff options
author | Yana Stamcheva <yana@jitsi.org> | 2010-08-17 10:11:35 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2010-08-17 10:11:35 +0000 |
commit | 3c10a76dfbf961bcd2b25bc536aaeeef53facab9 (patch) | |
tree | 3359a94a51cddf2c973c2be14d061f052b535aef /src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java | |
parent | 858a65425af3e0e22f90be5a4d9297c86a613e08 (diff) | |
download | jitsi-3c10a76dfbf961bcd2b25bc536aaeeef53facab9.zip jitsi-3c10a76dfbf961bcd2b25bc536aaeeef53facab9.tar.gz jitsi-3c10a76dfbf961bcd2b25bc536aaeeef53facab9.tar.bz2 |
Fix editable unknown contact panel information text + make it resizable in order to fix text cut in some cases.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java index 7e70b4a..c16dc4f 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java @@ -59,7 +59,7 @@ public class UnknownContactPanel this.parentWindow = window; - TransparentPanel mainPanel = new TransparentPanel(new GridBagLayout()); + TransparentPanel mainPanel = new TransparentPanel(new BorderLayout()); this.add(mainPanel, BorderLayout.NORTH); @@ -73,12 +73,7 @@ public class UnknownContactPanel initTextArea(parentWindow.getCurrentSearchText()); - GridBagConstraints constraints = new GridBagConstraints(); - - constraints.gridx = 0; - constraints.gridy = 0; - constraints.anchor = GridBagConstraints.CENTER; - mainPanel.add(textArea, constraints); + mainPanel.add(textArea, BorderLayout.CENTER); TransparentPanel buttonPanel = new TransparentPanel(new GridLayout(0, 1)); @@ -86,10 +81,11 @@ public class UnknownContactPanel buttonPanel.add(addContact); buttonPanel.add(callContact); - constraints.gridx = 0; - constraints.gridy = 1; - constraints.anchor = GridBagConstraints.CENTER; - mainPanel.add(buttonPanel, constraints); + TransparentPanel southPanel + = new TransparentPanel(new FlowLayout(FlowLayout.CENTER)); + southPanel.add(buttonPanel); + + mainPanel.add(southPanel, BorderLayout.SOUTH); addContact.addActionListener(new ActionListener() { @@ -177,6 +173,7 @@ public class UnknownContactPanel .getI18NString( "service.gui.NO_CONTACTS_FOUND", new String[]{'"' + searchText + '"'})); textArea.setOpaque(false); + textArea.setEditable(false); StyledDocument doc = textArea.getStyledDocument(); MutableAttributeSet standard = new SimpleAttributeSet(); @@ -185,13 +182,6 @@ public class UnknownContactPanel StyleConstants.setFontSize(standard, 12); doc.setParagraphAttributes(0, 0, standard, true); - textArea.setPreferredSize( - new Dimension(parentWindow.getWidth() - 40, 70)); - textArea.setMinimumSize( - new Dimension(parentWindow.getWidth() - 40, 70)); - textArea.setMaximumSize( - new Dimension(parentWindow.getWidth() - 40, 70)); - parentWindow.addSearchFieldListener(this); } |