About window adjustments.

cusax-fix
Yana Stamcheva 16 years ago
parent 0b14d4be67
commit 26524bfa37

@ -54,6 +54,10 @@ plugin.branding.LOADING_BUNDLE_PANEL_HEIGHT=40
plugin.branding.LOADING_BUNDLE_PANEL_BORDER=10
plugin.branding.ABOUT_PARAGRAPH_GAP=10
# Application name could be present in the background image and in this case
# we may not want to show it again.
plugin.branding.IS_APPLICATION_NAME_SHOWN=true
# jabber accregwizz
plugin.jabberaccregwizz.SERVER_COMMENTS=net/java/sip/communicator/plugin/jabberaccregwizz/resources/servercomments.xml

@ -104,10 +104,14 @@ public AboutWindow(Frame owner)
.createEmptyBorder(15, 15, 15, 15));
textPanel.setOpaque(false);
JLabel titleLabel = new JLabel(applicationName);
titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 28));
titleLabel.setForeground(Constants.TITLE_COLOR);
titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
JLabel titleLabel = null;
if (isApplicationNameShown())
{
titleLabel = new JLabel(applicationName);
titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 28));
titleLabel.setForeground(Constants.TITLE_COLOR);
titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
}
JTextField versionLabel
= new JTextField(" "
@ -176,7 +180,9 @@ public AboutWindow(Frame owner)
licenseArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
licenseArea.addHyperlinkListener(this);
textPanel.add(titleLabel);
if (titleLabel != null)
textPanel.add(titleLabel);
textPanel.add(versionLabel);
textPanel.add(logoArea);
textPanel.add(rightsArea);
@ -371,4 +377,25 @@ public void actionPerformed(ActionEvent e)
dispose();
}
}
/**
* Indicates if the application name should be shown.
*
* @return <tt>true</tt> if the application name should be shown,
* <tt>false</tt> - otherwise
*/
private boolean isApplicationNameShown()
{
String showApplicationNameProp
= BrandingActivator.getResources().getSettingsString(
"plugin.branding.IS_APPLICATION_NAME_SHOWN");
if (showApplicationNameProp != null
&& showApplicationNameProp.length() > 0)
{
return new Boolean(showApplicationNameProp).booleanValue();
}
return true;
}
}

Loading…
Cancel
Save