Fixes a non-transparent version field on Ubuntu 9.10 with JRE 1.6.0_18 reported by Lubomir Marinov on dev (subject: Re: svn commit: r6827 - trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java)

cusax-fix
Yana Stamcheva 16 years ago
parent 2f43b04903
commit b56ef51773

@ -19,9 +19,16 @@
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.plaf.*;
import org.osgi.framework.*;
/**
* The <tt>AboutWindow</tt> is containing information about the application
* name, version, license etc..
*
* @author Yana Stamcheva
*/
public class AboutWindow
extends JDialog
implements HyperlinkListener, ActionListener, ExportedWindow
@ -63,6 +70,10 @@ public void windowClosed(WindowEvent e)
= BrandingActivator.getResources()
.getSettingsInt("plugin.branding.ABOUT_TEXT_INDENT");
/**
* Creates an <tt>AboutWindow</tt> by specifying the parent frame owner.
* @param owner the parent owner
*/
public AboutWindow(Frame owner)
{
super(owner);
@ -97,6 +108,9 @@ public AboutWindow(Frame owner)
JTextField versionLabel
= new JTextField(" "
+ System.getProperty("sip-communicator.version"));
// Force the use of the custom text field UI in order to fix an
// incorrect rendering on Ubuntu.
versionLabel.setUI(new SIPCommTextFieldUI());
versionLabel.setBorder(null);
versionLabel.setOpaque(false);
versionLabel.setEditable(false);
@ -110,7 +124,8 @@ public AboutWindow(Frame owner)
// FIXME: the message exceeds the window length
JTextArea logoArea =
new JTextArea(resources.getI18NString("plugin.branding.LOGO_MESSAGE"));
new JTextArea(resources.getI18NString(
"plugin.branding.LOGO_MESSAGE"));
logoArea.setFont(
logoArea.getFont().deriveFont(Font.BOLD, logoAreaFontSize));
logoArea.setForeground(Constants.TITLE_COLOR);
@ -126,7 +141,8 @@ public AboutWindow(Frame owner)
StyledHTMLEditorPane rightsArea = new StyledHTMLEditorPane();
rightsArea.setContentType("text/html");
rightsArea.appendToEnd(resources.getI18NString("plugin.branding.COPYRIGHT",
rightsArea.appendToEnd(resources.getI18NString(
"plugin.branding.COPYRIGHT",
new String[]
{ Constants.TEXT_COLOR }));
@ -162,7 +178,8 @@ public AboutWindow(Frame owner)
textPanel.add(rightsArea);
textPanel.add(licenseArea);
JButton okButton = new JButton(resources.getI18NString("service.gui.OK"));
JButton okButton
= new JButton(resources.getI18NString("service.gui.OK"));
this.getRootPane().setDefaultButton(okButton);
@ -229,6 +246,10 @@ protected void paintComponent(Graphics g)
}
}
/**
* Opens a browser when the link has been activated (clicked).
* @param e the <tt>HyperlinkEvent</tt> that notified us
*/
public void hyperlinkUpdate(HyperlinkEvent e)
{
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
@ -250,6 +271,10 @@ public void hyperlinkUpdate(HyperlinkEvent e)
}
}
/**
* Indicates that the ok button has been pressed. Closes the window.
* @param e the <tt>ActionEvent</tt> that notified us
*/
public void actionPerformed(ActionEvent e)
{
setVisible(false);
@ -258,6 +283,7 @@ public void actionPerformed(ActionEvent e)
/**
* Implements the <tt>ExportedWindow.getIdentifier()</tt> method.
* @return the identifier of this exported window
*/
public WindowID getIdentifier()
{

@ -13,10 +13,12 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.util,
net.java.sip.communicator.util.swing,
net.java.sip.communicator.util.swing.plaf,
javax.swing,
javax.swing.event,
javax.swing.border,
javax.swing.text,
javax.swing.text.html,
javax.swing.plaf,
javax.imageio,
com.apple.eawt

Loading…
Cancel
Save