Some more flexibility added to the GUI.

cusax-fix
Yana Stamcheva 18 years ago
parent 9589de8f30
commit 14caa56775

@ -2,4 +2,6 @@ applicationName=SIP Communicator
applicationWebSite=http://sip-communicator.org
fontName=Verdana
fontSize=12
isLookAndFeelDecorated=false
titleFontSize=14
isLookAndFeelDecorated=false
isToolBarExteneded=false

@ -107,4 +107,22 @@ splashScreenTextColor=333333
splashScreenTitleColor=375684
# Background color for the contact list background.
contactListBackground=FFFFFF
contactListBackground=FFFFFF
# File menu foreground color
fileMenuForeground=333333
# Tools menu foreground color
toolsMenuForeground=333333
# View menu foreground color
viewMenuForeground=333333
# Help menu foreground color
helpMenuForeground=333333
# Logo bar background color
logoBarBackground=FFFFFF
# Main tool bar text foreground
toolBarForeground=FFFFFF

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

@ -0,0 +1,10 @@
mainWindowWidth=200
mainWindowHeight=450
logoBarWidth=0
logoBarHeight=0
mainToolbarButtonHeight=28
mainToolbarButtonWidth=28
dialPadWidth=150
dialPadHeight=150
dialPadHorizontalGap=5
dialPadVerticalGap=5

@ -787,8 +787,8 @@ public void run() {
/**
* Sets the look&feel and the theme.
*/
private void setDefaultThemePack() {
private void setDefaultThemePack()
{
SIPCommLookAndFeel lf = new SIPCommLookAndFeel();
SIPCommLookAndFeel.setCurrentTheme(new SIPCommDefaultTheme());

@ -23,6 +23,12 @@ public class TitlePanel extends JPanel {
private JLabel titleLabel = new JLabel();
/**
* The size of the gradient used for painting the background of some
* components.
*/
private static final int GRADIENT_SIZE = 10;
/**
* Creates an instance of <tt>TitlePanel</tt>.
*/
@ -63,26 +69,24 @@ public void paintComponent(Graphics g) {
GradientPaint p = new GradientPaint(this.getWidth() / 2, 0,
Constants.GRADIENT_DARK_COLOR, this.getWidth() / 2,
Constants.GRADIENT_SIZE,
GRADIENT_SIZE,
Constants.GRADIENT_LIGHT_COLOR);
GradientPaint p1 = new GradientPaint(this.getWidth() / 2, this
.getHeight()
- Constants.GRADIENT_SIZE,
- GRADIENT_SIZE,
Constants.GRADIENT_LIGHT_COLOR, this.getWidth() / 2,
this.getHeight(), Constants.GRADIENT_DARK_COLOR);
g2.setPaint(p);
g2
.fillRect(0, 0, this.getWidth(),
Constants.GRADIENT_SIZE);
g2.fillRect(0, 0, this.getWidth(), GRADIENT_SIZE);
g2.setColor(Constants.GRADIENT_LIGHT_COLOR);
g2.fillRect(0, Constants.GRADIENT_SIZE, this.getWidth(),
this.getHeight() - Constants.GRADIENT_SIZE);
g2.fillRect(0, GRADIENT_SIZE, this.getWidth(),
this.getHeight() - GRADIENT_SIZE);
g2.setPaint(p1);
g2.fillRect(0, this.getHeight() - Constants.GRADIENT_SIZE
g2.fillRect(0, this.getHeight() - GRADIENT_SIZE
- 1, this.getWidth(), this.getHeight() - 1);
g2.setColor(Constants.BORDER_COLOR);

@ -104,6 +104,7 @@ contactNotSupportingTelephony=The choosen {0} contact doesn't support telephony
contactPausedTyping={0} paused typing the message
contactTyping={0} is typing a message
contactTypingStateStale=typing state not updated
contactInfo=&Contact info
contacts=Contacts
continue=&Continue
copy=&Copy
@ -155,6 +156,7 @@ historyContact=History - {0}
hour=Hour
identifier=Identifier
ignore=&Ignore
info=Info
insertSmiley=Insert smiley
invalidCall=Invalid call
invitation=Invitation text
@ -276,8 +278,10 @@ setStatusMessage=Set status message
settings=&Settings
showCallPanel=Show call panel
showChannelsList=Show channels list
showOffline=Hide
showOfflineUsers=Hide/Show offline users
specifyReason=In the field below you could specify the reason of this operation.
sound=Sound
soundOnOff=Turn sound on/off
statusChangedChatMessage=has become {0}
statusChangeGeneralError=Failed to change status for account: User name: {0}, Server name: {1}, due to a general error.
@ -295,7 +299,6 @@ msgDeliveryFailedUnknownError=Unknown error has occured while delivering your me
unregisteredMessage=Unable to connect the following account: User name: {0}, Server name: {1}. You are currently offline.
updateAutomatically=Automatically install new updates
updates=Updates
userInfo=&User info
view=&View
viewHistory=View &history
warning=Warning

@ -32,10 +32,11 @@ public class SIPCommTabbedPaneEnhancedUI extends SIPCommTabbedPaneUI {
private static final Color whiteColor = Color.white;
private static final int TAB_OVERLAP = 10;
private static final int TAB_OVERLAP
= new Integer(LookAndFeelProperties.getProperty("tabOverlap")).intValue();
private static final int PREFERRED_WIDTH = 150;
public static ComponentUI createUI(JComponent c) {
return new SIPCommTabbedPaneEnhancedUI();
}

@ -66,7 +66,7 @@ public class MainFrame
private MainTabbedPane tabbedPane;
private QuickMenu quickMenu;
private JComponent quickMenu;
private LinkedHashMap protocolProviders = new LinkedHashMap();
@ -96,13 +96,24 @@ public MainFrame()
multiUserChatManager = new MultiUserChatManager(this);
tabbedPane = new MainTabbedPane(this);
quickMenu = new QuickMenu(this);
boolean isToolBarExtended
= new Boolean(ApplicationProperties
.getProperty("isToolBarExteneded")).booleanValue();
if (isToolBarExtended)
quickMenu = new ExtendedQuickMenu(this);
else
quickMenu = new QuickMenu(this);
statusPanel = new StatusPanel(this);
menu = new MainMenu(this);
this.addWindowListener(new MainFrameWindowAdapter());
this.setInitialBounds();
this.initBounds();
this.initTitleFont();
this.setTitle(ApplicationProperties.getProperty("applicationName"));
@ -123,31 +134,57 @@ private void init()
this.addKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT,
KeyEvent.ALT_DOWN_MASK), new BackwordTabAction());
this.setJMenuBar(menu);
this.contactListPanel.add(tabbedPane, BorderLayout.CENTER);
this.contactListPanel.add(callManager, BorderLayout.SOUTH);
mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
this.mainPanel.add(quickMenu, BorderLayout.NORTH);
this.mainPanel.add(contactListPanel, BorderLayout.CENTER);
this.mainPanel.add(statusPanel, BorderLayout.SOUTH);
this.getContentPane().add(mainPanel, BorderLayout.CENTER);
JPanel allPanel = new JPanel(new BorderLayout());
allPanel.add(menu, BorderLayout.NORTH);
allPanel.add(mainPanel, BorderLayout.CENTER);
this.getContentPane().add(allPanel, BorderLayout.CENTER);
this.getContentPane().add(new LogoBar(), BorderLayout.NORTH);
}
/**
* Sets frame size and position.
*/
private void setInitialBounds()
private void initBounds()
{
this.setSize(200, 450);
this.contactListPanel.setPreferredSize(new Dimension(300, 600));
this.contactListPanel.setMinimumSize(new Dimension(80, 200));
int width = SizeProperties.getSize("mainWindowWidth");
int height = SizeProperties.getSize("mainWindowHeight");
this.setSize(width, height);
this.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width
- this.getWidth(), 50);
}
/**
* Initialize main window font.
*/
private void initTitleFont()
{
JComponent layeredPane = this.getLayeredPane();
Font font = new Font(
ApplicationProperties.getProperty("fontName"),
Font.BOLD,
new Integer(ApplicationProperties.getProperty("titleFontSize"))
.intValue());
for (int i = 0; i < layeredPane.getComponentCount(); i++)
{
layeredPane.getComponent(i).setFont(font);
}
}
/**
* Returns the <tt>MetaContactListService</tt>.
*
@ -532,15 +569,6 @@ public CallManager getCallManager()
return callManager;
}
/**
* Returns the quick menu, placed above the main tabbed pane.
* @return QuickMenu The quick menu, placed above the main tabbed pane.
*/
public QuickMenu getQuickMenu()
{
return quickMenu;
}
/**
* Returns the status panel.
* @return StatusPanel The status panel.
@ -1300,4 +1328,44 @@ public void pluginComponentRemoved(PluginComponentEvent event)
this.getContentPane().remove(c);
}
}
}
/**
* The logo bar is positioned on the top of the window and is meant to
* contain the application logo.
*/
private class LogoBar
extends JPanel
{
/**
* Creates the logo bar and specify the size.
*/
public LogoBar()
{
int width = SizeProperties.getSize("logoBarWidth");
int height = SizeProperties.getSize("logoBarHeight");
this.setMinimumSize(new Dimension(width, height));
this.setPreferredSize(new Dimension(width, height));
}
/**
* Paints the logo bar.
*
* @param g the <tt>Graphics</tt> object used to paint the background
* image of this logo bar.
*/
public void paintComponent(Graphics g)
{
super.paintComponent(g);
Image backgroundImage
= ImageLoader.getImage(ImageLoader.WINDOW_TITLE_BAR);
g.setColor(new Color(
ColorProperties.getColor("logoBarBackground")));
g.fillRect(0, 0, this.getWidth(), this.getHeight());
g.drawImage(backgroundImage, 0, 0, null);
}
}
}

@ -406,7 +406,7 @@ public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(new Color(
ColorResources.getColor("contactListBackground")));
ColorProperties.getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());

@ -33,7 +33,7 @@ public class DialPanel
MouseListener
{
private Logger logger = Logger.getLogger(DialPanel.class);
private JComboBox phoneNumberCombo;
private DialButton oneButton = new DialButton(
@ -72,10 +72,14 @@ public class DialPanel
private DialButton diezButton = new DialButton(
ImageLoader.getImage(ImageLoader.DIEZ_DIAL_BUTTON));
private JPanel dialPadPanel = new JPanel(new GridLayout(4, 3, 5, 5));
private int hgap = SizeProperties.getSize("dialPadHorizontalGap");
private int vgap = SizeProperties.getSize("dialPadVerticalGap");
private JPanel dialPadPanel = new JPanel(new GridLayout(4, 3, hgap, vgap));
private CallManager callManager;
private CallParticipant callParticipant;
/**
@ -86,14 +90,17 @@ public DialPanel(CallManager callManager)
super(new FlowLayout(FlowLayout.CENTER));
this.callManager = callManager;
this.dialPadPanel.setOpaque(false);
this.phoneNumberCombo = callManager.getCallComboBox();
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.dialPadPanel.setPreferredSize(new Dimension(150, 150));
int width = SizeProperties.getSize("dialPadWidth");
int height = SizeProperties.getSize("dialPadHeight");
this.dialPadPanel.setPreferredSize(new Dimension(width, height));
this.init();
}
@ -342,51 +349,51 @@ public void mousePressed(MouseEvent e)
if (buttonName.equals("one"))
{
audioNotifier.createAudio(Sounds.DIAL_ONE).play();
audioNotifier.createAudio(SoundProperties.DIAL_ONE).play();
}
else if (buttonName.equals("two"))
{
audioNotifier.createAudio(Sounds.DIAL_TWO).play();
audioNotifier.createAudio(SoundProperties.DIAL_TWO).play();
}
else if (buttonName.equals("three"))
{
audioNotifier.createAudio(Sounds.DIAL_THREE).play();
audioNotifier.createAudio(SoundProperties.DIAL_THREE).play();
}
else if (buttonName.equals("four"))
{
audioNotifier.createAudio(Sounds.DIAL_FOUR).play();
audioNotifier.createAudio(SoundProperties.DIAL_FOUR).play();
}
else if (buttonName.equals("five"))
{
audioNotifier.createAudio(Sounds.DIAL_FIVE).play();
audioNotifier.createAudio(SoundProperties.DIAL_FIVE).play();
}
else if (buttonName.equals("six"))
{
audioNotifier.createAudio(Sounds.DIAL_SIX).play();
audioNotifier.createAudio(SoundProperties.DIAL_SIX).play();
}
else if (buttonName.equals("seven"))
{
audioNotifier.createAudio(Sounds.DIAL_SEVEN).play();
audioNotifier.createAudio(SoundProperties.DIAL_SEVEN).play();
}
else if (buttonName.equals("eight"))
{
audioNotifier.createAudio(Sounds.DIAL_EIGHT).play();
audioNotifier.createAudio(SoundProperties.DIAL_EIGHT).play();
}
else if (buttonName.equals("nine"))
{
audioNotifier.createAudio(Sounds.DIAL_NINE).play();
audioNotifier.createAudio(SoundProperties.DIAL_NINE).play();
}
else if (buttonName.equals("zero"))
{
audioNotifier.createAudio(Sounds.DIAL_ZERO).play();
audioNotifier.createAudio(SoundProperties.DIAL_ZERO).play();
}
else if (buttonName.equals("diez"))
{
audioNotifier.createAudio(Sounds.DIAL_DIEZ).play();
audioNotifier.createAudio(SoundProperties.DIAL_DIEZ).play();
}
else if (buttonName.equals("star"))
{
audioNotifier.createAudio(Sounds.DIAL_STAR).play();
audioNotifier.createAudio(SoundProperties.DIAL_STAR).play();
}
}
@ -414,7 +421,7 @@ public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(new Color(
ColorResources.getColor("contactListBackground")));
ColorProperties.getColor("contactListBackground")));
// paint the background with the chosen color
g.fillRect(0, 0, getWidth(), getHeight());

@ -1170,7 +1170,7 @@ public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(new Color(
ColorResources.getColor("contactListBackground")));
ColorProperties.getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());

@ -136,7 +136,7 @@ public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(new Color(
ColorResources.getColor("contactListBackground")));
ColorProperties.getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());

@ -74,6 +74,10 @@ public ContactListPanel(MainFrame mainFrame) {
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.getVerticalScrollBar().setUnitIncrement(30);
this.setPreferredSize(new Dimension(300, 600));
this.setMinimumSize(new Dimension(80, 200));
}
/**
@ -624,7 +628,7 @@ public void paintComponent(Graphics g)
super.paintComponent(g);
g.setColor(new Color(
ColorResources.getColor("contactListBackground")));
ColorProperties.getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());

@ -7,6 +7,7 @@
package net.java.sip.communicator.impl.gui.main.menus;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@ -87,6 +88,9 @@ public FileMenu(MainFrame parentWindow) {
super(Messages.getI18NString("file").getText());
this.setForeground(
new Color(ColorProperties.getColor("fileMenuForeground")));
this.parentWindow = parentWindow;
this.add(newAccountMenuItem);

@ -14,6 +14,7 @@
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.event.*;
@ -39,13 +40,15 @@ public class HelpMenu
*/
public HelpMenu(MainFrame mainFrame)
{
super(Messages.getI18NString("help").getText());
this.mainFrame = mainFrame;
this.setMnemonic(Messages.getI18NString("help").getMnemonic());
this.setForeground(
new Color(ColorProperties.getColor("helpMenuForeground")));
this.initPluginComponents();
}

@ -7,16 +7,21 @@
package net.java.sip.communicator.impl.gui.main.menus;
import java.util.*;
import java.awt.*;
import javax.swing.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.presence.*;
import net.java.sip.communicator.impl.gui.utils.*;
/**
* The main menu.
* The main menu bar. This is the menu bar that appears on top of the main
* window. It contains a file menu, tools menu, view menu and help menu.
* <p>
* Note that this container allows also specifying a custom background by
* modifying the menuBackgroundImage.png in the resources/images/impl/gui/common
* folder.
*
* @author Yana Stamcheva
*/
@ -48,7 +53,7 @@ public MainMenu(MainFrame mainFrame)
this.toolsMenu = new ToolsMenu(mainFrame);
this.viewMenu = new ViewMenu(mainFrame);
this.helpMenu = new HelpMenu(mainFrame);
this.init();
}
@ -80,7 +85,11 @@ private void init()
}
/**
* Returns TRUE if there are selected menus, otherwise returns false.
* Returns <code>true</code> if there are selected menus, otherwise -
* returns <code>false</code>.
*
* @return <code>true</code> if there are selected menus, otherwise -
* returns <code>false</code>.
*/
public boolean hasSelectedMenus()
{
@ -96,8 +105,28 @@ public boolean hasSelectedMenus()
return false;
}
/**
* Returns the <tt>ViewMenu</tt>, contained in this menu bar.
*
* @return the <tt>ViewMenu</tt>, contained in this menu bar.
*/
public ViewMenu getViewMenu()
{
return viewMenu;
}
/**
* 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);
}
}

@ -64,7 +64,11 @@ public class QuickMenu
private JButton soundButton = new JButton(
new ImageIcon(ImageLoader.getImage(ImageLoader.QUICK_MENU_SOUND_ON_ICON)));
private static int BUTTON_SIZE = 28;
private static int BUTTON_HEIGHT
= SizeProperties.getSize("mainToolbarButtonHeight");
private static int BUTTON_WIDTH
= SizeProperties.getSize("mainToolbarButtonWidth");
private ConfigurationWindow configDialog;
@ -83,19 +87,23 @@ public QuickMenu(MainFrame mainFrame)
this.setRollover(true);
this.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 0));
System.out.println("BUTTON WIDTH===========" + BUTTON_WIDTH);
System.out.println("BUTTON HEIGHT===========" + BUTTON_HEIGHT);
this.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
this.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 5));
this.setFloatable(true);
this.infoButton.setPreferredSize(
new Dimension(BUTTON_SIZE, BUTTON_SIZE));
new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
this.configureButton.setPreferredSize(
new Dimension(BUTTON_SIZE, BUTTON_SIZE));
new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
this.searchButton.setPreferredSize(
new Dimension(BUTTON_SIZE, BUTTON_SIZE));
new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
this.addButton.setPreferredSize(
new Dimension(BUTTON_SIZE, BUTTON_SIZE));
new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
this.soundButton.setPreferredSize(
new Dimension(BUTTON_SIZE, BUTTON_SIZE));
new Dimension(BUTTON_HEIGHT, BUTTON_HEIGHT));
this.infoButton.setToolTipText(
Messages.getI18NString("userInfo").getText());
@ -370,7 +378,7 @@ public void componentMoved(ComponentEvent e)
}
this.setPreferredSize(
new Dimension(this.getWidth(), biggestY + BUTTON_SIZE));
new Dimension(this.getWidth(), biggestY + BUTTON_HEIGHT));
((JPanel)this.getParent()).revalidate();
((JPanel)this.getParent()).repaint();
@ -411,7 +419,7 @@ else if(selectedValue instanceof MetaContactGroup)
.setCurrentContactGroup(
(MetaContactGroup)selectedValue);
}
}
}
}
}

@ -17,6 +17,7 @@
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.util.*;
@ -49,7 +50,10 @@ public class ToolsMenu
public ToolsMenu(MainFrame parentWindow) {
super(Messages.getI18NString("tools").getText());
this.setForeground(
new Color(ColorProperties.getColor("toolsMenuForeground")));
this.parentWindow = parentWindow;
this.add(configMenuItem);

@ -52,7 +52,10 @@ public class ViewMenu
public ViewMenu(MainFrame mainFrame) {
super(Messages.getI18NString("view").getText());
this.setForeground(
new Color(ColorProperties.getColor("viewMenuForeground")));
this.mainFrame = mainFrame;
this.hideCallPanelItem.setSelected(

@ -20,7 +20,7 @@ public class ApplicationProperties
/**
* Logger for this class.
*/
private static Logger log = Logger.getLogger(ColorResources.class);
private static Logger log = Logger.getLogger(ApplicationProperties.class);
/**
* Name of the bundle where we will search for color resources.

@ -1,59 +0,0 @@
/*
* 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.utils;
import java.util.*;
import net.java.sip.communicator.util.*;
/**
* Accesses the color resources saved in the colorResources.properties file.
*
* @author Yana Stamcheva
*/
public class ColorResources
{
/**
* Logger for this class.
*/
private static Logger log = Logger.getLogger(ColorResources.class);
/**
* Name of the bundle where we will search for color resources.
*/
private static final String BUNDLE_NAME
= "resources.colors.colorResources";
/**
* Bundle which handle access to localized resources.
*/
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle( BUNDLE_NAME,
Locale.getDefault(),
ColorResources.class.getClassLoader());
/**
* Returns an int RGB color corresponding to the given key.
*
* @param key The key of the string.
*
* @return An internationalized string corresponding to the given key.
*/
public static int getColor(String key)
{
try
{
return Integer.parseInt(RESOURCE_BUNDLE.getString(key), 16);
}
catch (MissingResourceException e)
{
log.error("Missing color resource.", e);
return 0xFFFFFF;
}
}
}

@ -128,60 +128,12 @@ public class Constants
*/
public static final String HISTORY_OUTGOING_MESSAGE = "HistoryOutgoingMessage";
/*
* ===================================================================
* ------------------------ SIZE CONSTANTS ---------------------------
* ===================================================================
*/
/**
* The minimum height of the main application window.
*/
public static final int MAINFRAME_MIN_HEIGHT = 200;
/**
* The minimum width of the main application window.
*/
public static final int MAINFRAME_MIN_WIDTH = 80;
/**
* The size of the gradient used for painting the selected background of
* some components.
*/
public static final int SELECTED_GRADIENT_SIZE = 5;
/**
* The size of the gradient used for painting the background of some
* components.
*/
public static final int GRADIENT_SIZE = 10;
/**
* The height of the <tt>HistoryWindow</tt>.
*/
public static final int HISTORY_WINDOW_HEIGHT = 450;
/**
* The width of the <tt>HistoryWindow</tt>.
*/
public static final int HISTORY_WINDOW_WIDTH = 450;
/**
* The size of the buffer that indicates how many messages will be stored
* in the conversation area in the chat window.
*/
public static final int CHAT_BUFFER_SIZE = 3000;
/**
* The maximum width of the <tt>ConfigurationFrame</tt>.
*/
public static final int CONFIG_FRAME_MAX_WIDTH = 800;
/**
* The maximum height of the <tt>ConfigurationFrame</tt>.
*/
public static final int CONFIG_FRAME_MAX_HEIGHT = 600;
/*
* ======================================================================
* -------------------- FONTS AND COLOR CONSTANTS ------------------------
@ -192,48 +144,48 @@ public class Constants
* record.
*/
public static final Color HISTORY_IN_CALL_COLOR
= new Color(ColorResources.getColor("historyIncomingCallBackground"));
= new Color(ColorProperties.getColor("historyIncomingCallBackground"));
/**
* The color used to paint the background of an outgoing call history
* record.
*/
public static final Color HISTORY_OUT_CALL_COLOR
= new Color(ColorResources.getColor("historyOutgoingCallBackground"));
= new Color(ColorProperties.getColor("historyOutgoingCallBackground"));
/**
* The end color used to paint a gradient selected background of some
* components.
*/
public static final Color SELECTED_COLOR
= new Color(ColorResources.getColor("listSelectionColor"));
= new Color(ColorProperties.getColor("listSelectionColor"));
/**
* The start color used to paint a gradient mouse over background of some
* components.
*/
public static final Color GRADIENT_DARK_COLOR
= new Color(ColorResources.getColor("gradientDarkColor"));
= new Color(ColorProperties.getColor("gradientDarkColor"));
/**
* The end color used to paint a gradient mouse over background of some
* components.
*/
public static final Color GRADIENT_LIGHT_COLOR
= new Color(ColorResources.getColor("gradientLightColor"));
= new Color(ColorProperties.getColor("gradientLightColor"));
/**
* A color between blue and gray used to paint some borders.
*/
public static final Color BORDER_COLOR
= new Color(ColorResources.getColor("borderColor"));
= new Color(ColorProperties.getColor("borderColor"));
/**
* A color between blue and gray (darker than the other one), used to paint
* some borders.
*/
public static final Color LIST_SELECTION_BORDER_COLOR
= new Color(ColorResources.getColor("listSelectionBorderColor"));
= new Color(ColorProperties.getColor("listSelectionBorderColor"));
/*
* ======================================================================

@ -575,6 +575,24 @@ public class ImageLoader {
public static final ImageID SEND_SMS_ICON
= new ImageID("SEND_SMS_ICON");
/**
* Tool bar background image.
*/
public static final ImageID TOOL_BAR_BACKGROUND
= new ImageID("TOOL_BAR_BACKGROUND");
/**
* Main menu background image.
*/
public static final ImageID MENU_BACKGROUND
= new ImageID("MENU_BACKGROUND");
/**
* Title bar background image.
*/
public static final ImageID WINDOW_TITLE_BAR
= new ImageID("WINDOW_TITLE_BAR");
// ///////////////////// Edit Text Toolbar icons //////////////////////////
/**

@ -20,7 +20,7 @@ public class LoginProperties
/**
* Logger for this class.
*/
private static Logger log = Logger.getLogger(ColorResources.class);
private static Logger log = Logger.getLogger(ColorProperties.class);
/**
* Name of the bundle where we will search for color resources.

@ -43,7 +43,7 @@ public static void registerGuiNotifications()
notificationService.registerNotificationForEvent(
INCOMING_MESSAGE,
NotificationService.ACTION_SOUND,
Sounds.INCOMING_MESSAGE,
SoundProperties.INCOMING_MESSAGE,
null);
// Register incoming call notifications.
@ -55,7 +55,7 @@ public static void registerGuiNotifications()
SoundNotificationHandler inCallSoundHandler
= (SoundNotificationHandler) notificationService
.createSoundNotificationHandler(Sounds.INCOMING_CALL, 2000);
.createSoundNotificationHandler(SoundProperties.INCOMING_CALL, 2000);
notificationService.registerNotificationForEvent(
INCOMING_CALL,
@ -67,7 +67,7 @@ public static void registerGuiNotifications()
// Register outgoing call notifications.
SoundNotificationHandler outCallSoundHandler
= (SoundNotificationHandler) notificationService
.createSoundNotificationHandler(Sounds.OUTGOING_CALL, 3000);
.createSoundNotificationHandler(SoundProperties.OUTGOING_CALL, 3000);
notificationService.registerNotificationForEvent(
OUTGOING_CALL,
@ -79,7 +79,7 @@ public static void registerGuiNotifications()
// Register busy call notifications.
SoundNotificationHandler busyCallSoundHandler
= (SoundNotificationHandler) notificationService
.createSoundNotificationHandler(Sounds.BUSY, 1);
.createSoundNotificationHandler(SoundProperties.BUSY, 1);
notificationService.registerNotificationForEvent(
BUSY_CALL,

@ -1,74 +0,0 @@
/*
* 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.utils;
import java.util.*;
/**
* Manages the access to the properties file containing all sounds paths.
*
* @author Yana Stamcheva
*/
public class Sounds {
public static String INCOMING_MESSAGE
= "resources/sounds/incomingMessage.wav";
public static String OUTGOING_CALL
= "resources/sounds/ring.wav";
public static String INCOMING_CALL
= "resources/sounds/incomingCall.wav";
public static String DIAL_ZERO
= "resources/sounds/one_1.wav";
public static String DIAL_ONE
= "resources/sounds/one_1.wav";
public static String DIAL_TWO
= "resources/sounds/two_2.wav";
public static String DIAL_THREE
= "resources/sounds/three_3.wav";
public static String DIAL_FOUR
= "resources/sounds/four_4.wav";
public static String DIAL_FIVE
= "resources/sounds/five_5.wav";
public static String DIAL_SIX
= "resources/sounds/six_6.wav";
public static String DIAL_SEVEN
= "resources/sounds/seven_7.wav";
public static String DIAL_EIGHT
= "resources/sounds/eight_8.wav";
public static String DIAL_NINE
= "resources/sounds/nine_9.wav";
public static String DIAL_DIEZ
= "resources/sounds/one_1.wav";
public static String DIAL_STAR
= "resources/sounds/one_1.wav";
public static String BUSY
= "resources/sounds/busy.wav";
private static final String BUNDLE_NAME
= "net.java.sip.communicator.impl.gui.utils.sounds";
private static final ResourceBundle RESOURCE_BUNDLE
= ResourceBundle.getBundle(BUNDLE_NAME);
private Sounds() {
}
}

@ -180,4 +180,8 @@ LEAVE_ICON=resources/images/impl/gui/common/leave.png
STATUS_SEPARATOR_ICON=resources/images/impl/gui/common/statusSeparator.png
MAIN_WINDOW_BACKGROUND=resources/images/impl/gui/common/mainWindowBackground.png
MAIN_WINDOW_BACKGROUND=resources/images/impl/gui/common/mainWindowBackground.png
TOOL_BAR_BACKGROUND=resources/images/impl/gui/common/toolbarBackground.png
MENU_BACKGROUND=resources/images/impl/gui/common/menuBackground.png
WINDOW_TITLE_BAR=resources/images/impl/gui/common/windowTitleBarBackground.png
Loading…
Cancel
Save