Make a configurable chat menu bar foreground color.

cusax-fix
Yana Stamcheva 18 years ago
parent d1f7e26cf6
commit 8116b1ac1a

@ -109,9 +109,12 @@ splashScreenTitleColor=375684
# Background color for the contact list background.
contactListBackground=FFFFFF
# File menu foreground color
# Main menu foreground color
mainMenuForeground=333333
# Chat menu foreground color
chatMenuBarForeground=333333
# Logo bar background color
logoBarBackground=FFFFFF

@ -7,6 +7,7 @@
package net.java.sip.communicator.impl.gui.main.chat.menus;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@ -55,6 +56,9 @@ public EditMenu(ChatWindow chatWindow) {
this.chatWindow = chatWindow;
this.setForeground(new Color(
ColorProperties.getColor("chatMenuBarForeground")));
this.cutMenuItem.setName("cut");
this.copyMenuItem.setName("copy");
this.pasteMenuItem.setName("paste");

@ -7,6 +7,7 @@
package net.java.sip.communicator.impl.gui.main.chat.menus;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@ -51,9 +52,12 @@ public class FileMenu extends SIPCommMenu
public FileMenu(ChatWindow parentWindow) {
super(Messages.getI18NString("file").getText());
this.parentWindow = parentWindow;
this.setForeground(new Color(
ColorProperties.getColor("chatMenuBarForeground")));
this.add(saveMenuItem);
this.add(printMenuItem);

@ -7,7 +7,7 @@
package net.java.sip.communicator.impl.gui.main.chat.menus;
import java.awt.Component;
import java.awt.*;
import java.awt.event.*;
import java.util.Iterator;
@ -18,6 +18,7 @@
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.UIService;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.util.*;
@ -48,7 +49,8 @@ public HelpMenu(ChatWindow chatWindow) {
this.chatWindow = chatWindow;
this.chatWindow = chatWindow;
this.setForeground(new Color(
ColorProperties.getColor("chatMenuBarForeground")));
this.setMnemonic(Messages.getI18NString("help").getMnemonic());

@ -7,10 +7,13 @@
package net.java.sip.communicator.impl.gui.main.chat.menus;
import java.awt.*;
import javax.swing.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.utils.*;
/**
* The <tt>MessageWindowMenuBar</tt> is the menu bar in the chat window where
* all menus are added.
@ -78,4 +81,19 @@ public SIPCommMenu getSelectedMenu()
}
return null;
}
/**
* Paints the MENU_BACKGROUND image on the background of this container.
*
* @param g the Graphics object that does the painting
*/
public void paintComponent(Graphics g)
{
super.paintComponent(g);
Image backgroundImage
= ImageLoader.getImage(ImageLoader.MENU_BACKGROUND);
g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), null);
}
}

@ -1,5 +1,6 @@
package net.java.sip.communicator.impl.gui.main.chat.menus;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@ -23,27 +24,26 @@ public class SettingsMenu
extends SIPCommMenu
implements ActionListener
{
private I18NString typingNotifString
= Messages.getI18NString("enableTypingNotifications");
private I18NString useCtrlEnterString
= Messages.getI18NString("useCtrlEnterToSend");
private I18NString autoPopupString
= Messages.getI18NString("autoPopup");
private JCheckBoxMenuItem typingNotificationsItem
= new JCheckBoxMenuItem(typingNotifString.getText());
private JCheckBoxMenuItem sendingMessageCommandItem
= new JCheckBoxMenuItem(useCtrlEnterString.getText());
private JCheckBoxMenuItem autoPopupItem
= new JCheckBoxMenuItem(autoPopupString.getText());
private ChatWindow chatWindow;
/**
* Creates an instance of <tt>SettingsMenu</tt> by specifying the
* <tt>ChatWindow</tt>.
@ -53,46 +53,48 @@ public class SettingsMenu
public SettingsMenu(ChatWindow chatWindow)
{
super(Messages.getI18NString("settings").getText());
this.chatWindow = chatWindow;
this.setForeground(new Color(
ColorProperties.getColor("chatMenuBarForeground")));
typingNotificationsItem.setName("typingNotifications");
sendingMessageCommandItem.setName("sendingMessageCommand");
autoPopupItem.setName("autopopup");
this.setMnemonic(Messages.getI18NString("settings").getMnemonic());
this.typingNotificationsItem.setMnemonic(
typingNotifString.getMnemonic());
this.sendingMessageCommandItem.setMnemonic(
useCtrlEnterString.getMnemonic());
this.autoPopupItem.setMnemonic(
autoPopupString.getMnemonic());
this.add(typingNotificationsItem);
this.add(sendingMessageCommandItem);
this.add(autoPopupItem);
this.typingNotificationsItem.addActionListener(this);
this.sendingMessageCommandItem.addActionListener(this);
this.autoPopupItem.addActionListener(this);
this.autoPopupItem.setSelected(
ConfigurationManager.isAutoPopupNewMessage());
this.typingNotificationsItem.setSelected(
ConfigurationManager.isSendTypingNotifications());
if(ConfigurationManager.getSendMessageCommand()
== ConfigurationManager.ENTER_COMMAND)
== ConfigurationManager.ENTER_COMMAND)
this.sendingMessageCommandItem.setSelected(true);
else
this.sendingMessageCommandItem.setSelected(false);
}
/**
* Handles the <tt>ActionEvent</tt> when one of the menu items is selected.
*/

Loading…
Cancel
Save