From 2b2e4e71a707a6c99a557d4ab1a804d593821d5d Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Thu, 18 May 2006 12:17:45 +0000 Subject: [PATCH] Custom TextAreaUI implemented --- .../gui/lookandfeel/SIPCommLookAndFeel.java | 3 +- .../gui/lookandfeel/SIPCommTextAreaUI.java | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTextAreaUI.java diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java index d12a8a60e..7e8597d59 100644 --- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java +++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java @@ -63,7 +63,8 @@ protected void initClassDefaults(UIDefaults table) { "MenuUI", lfPackageName + "SIPCommMenuUI", "ToolBarSeparatorUI", lfPackageName + "SIPCommToolBarSeparatorUI", "TabbedPaneUI", lfPackageName + "SIPCommTabbedPaneUI", - "ToolTipUI", lfPackageName + "SIPCommToolTipUI" + "ToolTipUI", lfPackageName + "SIPCommToolTipUI", + "TextAreaUI", lfPackageName + "SIPCommTextAreaUI" }; table.putDefaults(uiDefaults); } diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTextAreaUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTextAreaUI.java new file mode 100644 index 000000000..2dc83f3d7 --- /dev/null +++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTextAreaUI.java @@ -0,0 +1,32 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.impl.gui.lookandfeel; + +import java.awt.Graphics; + +import javax.swing.JComponent; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.basic.BasicTextAreaUI; + +import net.java.sip.communicator.impl.gui.utils.AntialiasingManager; + +/** + * SIPCommTextAreaUI implementation. + * + * @author Yana Stamcheva + */ +public class SIPCommTextAreaUI extends BasicTextAreaUI { + + public static ComponentUI createUI(JComponent c) { + return new SIPCommTextAreaUI(); + } + + protected void paintSafely(Graphics g) { + AntialiasingManager.activateAntialiasing(g); + super.paintSafely(g); + } +}