aboutsummaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java2
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToggleButton.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java12
-rw-r--r--src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommButtonUI.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java390
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLFUtils.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuItemUI.java8
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommSelectorMenuUI.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java12
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallParticipantDialpadDialog.java6
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/ChatContactPanel.java6
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/chat/ChatSendPanel.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/history/DatesListRenderer.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java8
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormList.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormListCellRenderer.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java8
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/utils/Constants.java55
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/CallListCellRenderer.java12
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Constants.java54
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java27
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/resources.properties10
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/PluginListCellRenderer.java12
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/Resources.java31
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/TitlePanel.java23
-rw-r--r--src/net/java/sip/communicator/plugin/whiteboard/resources.properties54
29 files changed, 426 insertions, 332 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java
index b505a2f..b36fbb3 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java
@@ -50,10 +50,10 @@ public class ExtListCellRenderer extends JPanel
if (this.isSelected) {
- g2.setColor(Constants.SELECTED_END_COLOR);
+ g2.setColor(Constants.SELECTED_COLOR);
g2.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(0, 0, this.getWidth() - 1, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java
index 8ff3285..1182b4b 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java
@@ -54,7 +54,7 @@ public class LabelTableCellRenderer extends JLabel
}
if(isSelected)
- this.setBackground(Constants.SELECTED_END_COLOR);
+ this.setBackground(Constants.SELECTED_COLOR);
else
this.setBackground(UIManager.getColor("Table.background"));
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java
index 8c4a3a1..79ed7c9 100755
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java
@@ -156,7 +156,6 @@ public class SIPCommButton extends JButton {
if (this.bgRolloverImage != null && this.getModel().isRollover()) {
- g.setColor(Constants.GRAY_COLOR);
g.drawImage(this.bgRolloverImage, 0, 0, this);
if (this.iconImage != null) {
@@ -190,7 +189,7 @@ public class SIPCommButton extends JButton {
if (this.pressedImage != null) {
g.drawImage(this.pressedImage, 0, 0, this);
} else {
- g.setColor(Constants.GRAY_COLOR);
+
g.drawImage(this.bgRolloverImage, 0, 0, this);
if (this.iconImage != null) {
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToggleButton.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToggleButton.java
index de6974c..a11d89e 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToggleButton.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToggleButton.java
@@ -149,7 +149,6 @@ public class SIPCommToggleButton extends JToggleButton {
if (this.bgRolloverImage != null && this.getModel().isRollover()) {
- g.setColor(Constants.GRAY_COLOR);
g.drawImage(this.bgRolloverImage, 0, 0, this);
if (this.iconImage != null) {
@@ -183,7 +182,7 @@ public class SIPCommToggleButton extends JToggleButton {
if (this.pressedImage != null) {
g.drawImage(this.pressedImage, 0, 0, this);
} else if (this.bgRolloverImage != null){
- g.setColor(Constants.GRAY_COLOR);
+
g.drawImage(this.bgRolloverImage, 0, 0, this);
if (this.iconImage != null) {
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java
index 7ac457b..70e8bb0 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java
@@ -62,22 +62,22 @@ public class TitlePanel extends JPanel {
Graphics2D g2 = (Graphics2D) g;
GradientPaint p = new GradientPaint(this.getWidth() / 2, 0,
- Constants.MOVER_START_COLOR, this.getWidth() / 2,
+ Constants.GRADIENT_DARK_COLOR, this.getWidth() / 2,
Constants.GRADIENT_SIZE,
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
GradientPaint p1 = new GradientPaint(this.getWidth() / 2, this
.getHeight()
- Constants.GRADIENT_SIZE,
- Constants.MOVER_END_COLOR, this.getWidth() / 2,
- this.getHeight(), Constants.MOVER_START_COLOR);
+ 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.setColor(Constants.MOVER_END_COLOR);
+ g2.setColor(Constants.GRADIENT_LIGHT_COLOR);
g2.fillRect(0, Constants.GRADIENT_SIZE, this.getWidth(),
this.getHeight() - Constants.GRADIENT_SIZE);
@@ -85,7 +85,7 @@ public class TitlePanel extends JPanel {
g2.fillRect(0, this.getHeight() - Constants.GRADIENT_SIZE
- 1, this.getWidth(), this.getHeight() - 1);
- g2.setColor(Constants.BLUE_GRAY_BORDER_COLOR);
+ g2.setColor(Constants.BORDER_COLOR);
g2.drawRoundRect(0, 0, this.getWidth() - 1, this.getHeight() - 1, 5, 5);
}
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java b/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java
index a30f39b..879c092 100644
--- a/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java
+++ b/src/net/java/sip/communicator/impl/gui/customcontrols/TransparentBackground.java
@@ -99,7 +99,7 @@ public class TransparentBackground extends JComponent {
g2.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
- g2.setColor(Constants.LIGHT_GRAY_COLOR);
+ g2.setColor(Constants.BORDER_COLOR);
g2.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 10, 10);
}
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommButtonUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommButtonUI.java
index c67869b..ea1fde8 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommButtonUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommButtonUI.java
@@ -42,7 +42,7 @@ public class SIPCommButtonUI extends MetalButtonUI {
b.setOpaque(false);
b.setBorderPainted(false);
- b.setFocusPainted(true);
+ b.setFocusPainted(true);
b.setRolloverEnabled(true);
}
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
index 2d1a7fb..5a6359f 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
@@ -1,8 +1,7 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
+ *
+ * Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.lookandfeel;
@@ -18,247 +17,336 @@ import net.java.sip.communicator.impl.gui.utils.*;
/**
* SipCommunicator default theme.
- *
+ *
* @author Yana Stamcheva
*/
public class SIPCommDefaultTheme
extends DefaultMetalTheme
{
- private static final ColorUIResource DARK_BLUE
- = new ColorUIResource(0x3f6296);
- private static final ColorUIResource DARK_GRAY
- = new ColorUIResource(0x474747);
- private static final ColorUIResource LIGHT_BLUE
- = new ColorUIResource(0x96A9C6);
- private static final ColorUIResource LIGHT_BLUE_GRAY
- = new ColorUIResource(0xD3DDED);
- private static final ColorUIResource LIGHT_GRAY
- = new ColorUIResource(0xEEEEEE);
- private static final ColorUIResource GRAY
- = new ColorUIResource(0xC0C0C0);
- private static final ColorUIResource VERY_LIGHT_GRAY
- = new ColorUIResource(0xFAFAFA);
+ /**
+ * Used for tooltip borders, progress bar selection background, scroll bar
+ * thumb shadow, tabbed pane focus, toolbar docking foreground
+ */
+ private static final ColorUIResource PRIMARY_CONTROL_DARK_SHADOW =
+ new ColorUIResource(ColorResources.getColor("primaryControlDarkShadow"));
+
+ /**
+ * Used for desktop color, menu selected background, focus color, slider
+ * foreground, progress bar foreground, combo box selection background,
+ * scroll bar thumb
+ */
+ private static final ColorUIResource PRIMARY_CONTROL_SHADOW =
+ new ColorUIResource(ColorResources.getColor("primaryControlShadow"));
+
+ /**
+ * Used for progress bar border, tooltip border inactive, tooltip foreground
+ * inactive, scroll bar dark shadow.
+ */
+ private static final ColorUIResource CONTROL_DARK_SHADOW =
+ new ColorUIResource(ColorResources.getColor("controlDarkShadow"));
+
+ private static final ColorUIResource CONTROL_SHADOW =
+ new ColorUIResource(ColorResources.getColor("controlShadow"));
+
+ /**
+ * Used for window title inactive background, menu background, tooltip
+ * inactive background, combo box background, desktop icon background,
+ * scroll bar background, tabbed pane tab area background.
+ */
+ private static final ColorUIResource CONTROL_COLOR =
+ new ColorUIResource(ColorResources.getColor("controlColor"));
+
+ /**
+ * Used for text hightlight color, window title background, scroll bar thumb
+ * hightlight, split pane devider focus color, Tree.line, Tree.hash,
+ * ToolBar.floatingForeground
+ */
+ private static final ColorUIResource PRIMARY_CONTROL_COLOR
+ = new ColorUIResource(ColorResources.getColor("primaryControlColor"));
+
+ // Used to paint a gradient for a check box or a radio button.
+ private static final ColorUIResource BUTTON_GRADIENT_DARK_COLOR
+ = new ColorUIResource(ColorResources.getColor("buttonGradientDark"));
+
+ private static final ColorUIResource BUTTON_GRADIENT_LIGHT_COLOR
+ = new ColorUIResource(ColorResources.getColor("buttonGradientLight"));
+
+ private static final ColorUIResource SLIDER_GRADIENT_DARK_COLOR
+ = new ColorUIResource(ColorResources.getColor("sliderGradientDark"));
+
+ private static final ColorUIResource SLIDER_GRADIENT_LIGHT_COLOR
+ = new ColorUIResource(ColorResources.getColor("sliderGradientLight"));
+
+ private static final ColorUIResource SELECTION_FOREGROUND
+ = new ColorUIResource(ColorResources.getColor("selectionForeground"));
+
+ private static final ColorUIResource SELECTION_BACKGROUND
+ = new ColorUIResource(ColorResources.getColor("selectionBackground"));
+
+ private static final ColorUIResource SPLIT_PANE_DEVIDER_FOCUS_COLOR
+ = new ColorUIResource(ColorResources
+ .getColor("splitPaneDeviderFocused"));
+
+ private static final ColorUIResource TABBED_PANE_HIGHLIGHT_COLOR
+ = new ColorUIResource(ColorResources
+ .getColor("tabbedPaneBorderHighlight"));
+
+ private static final ColorUIResource TABLE_GRID_COLOR
+ = new ColorUIResource(ColorResources.getColor("tableGrid"));
+
+ private static final ColorUIResource SCROLL_BAR_TRACK_HIGHLIGHT
+ = new ColorUIResource(ColorResources
+ .getColor("scrollBarTrackHighlight"));
+
+ private static final ColorUIResource SCROLL_BAR_DARK_SHADOW
+ = new ColorUIResource(ColorResources.getColor("scrollBarDarkShadow"));
+
+ private static final ColorUIResource DESKTOP_BACKGROUND_COLOR
+ = new ColorUIResource(ColorResources.getColor("desktopBackgroundColor"));
private static final ColorUIResource CONTROL_TEXT_COLOR
- = new ColorUIResource(0x333333);
+ = new ColorUIResource(ColorResources.getColor("textColor"));
+
private static final ColorUIResource INACTIVE_CONTROL_TEXT_COLOR
- = new ColorUIResource(0x999999);
+ = new ColorUIResource(ColorResources.getColor("inactiveTextColor"));
+
private static final ColorUIResource MENU_DISABLED_FOREGROUND
- = new ColorUIResource(0x999999);
- private static final ColorUIResource OCEAN_BLACK
- = new ColorUIResource(0x333333);
+ = new ColorUIResource(ColorResources
+ .getColor("menuDisabledForeground"));
private static final FontUIResource BASIC_FONT
- = new FontUIResource(Constants.FONT);
+ = new FontUIResource(Constants.FONT);
- public SIPCommDefaultTheme() {
+ public SIPCommDefaultTheme()
+ {
}
- public void addCustomEntriesToTable(UIDefaults table) {
+ public void addCustomEntriesToTable(UIDefaults table)
+ {
- List buttonGradient = Arrays.asList(
- new Object[] {new Float(.3f), new Float(0f),
- DARK_BLUE, getWhite(), getSecondary2()});
+ List buttonGradient
+ = Arrays.asList(new Object[]
+ { new Float(.3f), new Float(0f), BUTTON_GRADIENT_DARK_COLOR,
+ getWhite(), BUTTON_GRADIENT_LIGHT_COLOR });
- List sliderGradient = Arrays.asList(new Object[] {
- new Float(.3f), new Float(.2f),
- DARK_BLUE, getWhite(), new ColorUIResource(LIGHT_BLUE_GRAY) });
+ List sliderGradient
+ = Arrays.asList(new Object[]
+ { new Float(.3f), new Float(.2f), SLIDER_GRADIENT_DARK_COLOR,
+ getWhite(), SLIDER_GRADIENT_LIGHT_COLOR });
Object textFieldBorder = SIPCommBorders.getTextFieldBorder();
- Object[] defaults = new Object[] {
- "Button.rollover", Boolean.TRUE,
-
- "CheckBox.rollover", Boolean.TRUE,
- "CheckBox.gradient", buttonGradient,
-
- "CheckBoxMenuItem.gradient", buttonGradient,
-
- "Menu.opaque", Boolean.FALSE,
-
- "MenuBar.border", null,
-
- "Menu.borderPainted", Boolean.FALSE,
- "Menu.border", textFieldBorder,
- "Menu.selectionBackground", LIGHT_GRAY,
- "Menu.selectionForeground", DARK_GRAY,
- "Menu.margin", new InsetsUIResource(0, 0, 0, 0),
-
- "MenuItem.borderPainted", Boolean.FALSE,
- "MenuItem.border", textFieldBorder,
- "MenuItem.selectionBackground", LIGHT_GRAY,
- "MenuItem.selectionForeground", DARK_GRAY,
-
- "CheckBoxMenuItem.borderPainted", Boolean.FALSE,
- "CheckBoxMenuItem.border", textFieldBorder,
- "CheckBoxMenuItem.selectionBackground", LIGHT_GRAY,
- "CheckBoxMenuItem.selectionForeground", DARK_GRAY,
-
- "InternalFrame.activeTitleGradient", buttonGradient,
-
- "OptionPane.warningIcon",
+ Object[] defaults =
+ new Object[]
+ {
+ "Button.rollover", Boolean.TRUE,
+
+ "CheckBox.rollover", Boolean.TRUE,
+ "CheckBox.gradient", buttonGradient,
+
+ "CheckBoxMenuItem.gradient", buttonGradient,
+
+ "Menu.opaque", Boolean.FALSE,
+
+ "MenuBar.border", null,
+
+ "Menu.borderPainted", Boolean.FALSE,
+ "Menu.border", textFieldBorder,
+ "Menu.selectionBackground", SELECTION_BACKGROUND,
+ "Menu.selectionForeground", SELECTION_FOREGROUND,
+ "Menu.margin", new InsetsUIResource(0, 0, 0, 0),
+
+ "MenuItem.borderPainted", Boolean.FALSE,
+ "MenuItem.border", textFieldBorder,
+ "MenuItem.selectionBackground", SELECTION_BACKGROUND,
+ "MenuItem.selectionForeground", SELECTION_FOREGROUND,
+
+ "CheckBoxMenuItem.borderPainted", Boolean.FALSE,
+ "CheckBoxMenuItem.border", textFieldBorder,
+ "CheckBoxMenuItem.selectionBackground", SELECTION_BACKGROUND,
+ "CheckBoxMenuItem.selectionForeground", SELECTION_FOREGROUND,
+
+ "InternalFrame.activeTitleGradient", buttonGradient,
+
+ "OptionPane.warningIcon",
new ImageIcon(ImageLoader.getImage(ImageLoader.WARNING_ICON)),
-
- "OptionPane.errorIcon",
+
+ "OptionPane.errorIcon",
new ImageIcon(ImageLoader.getImage(ImageLoader.ERROR_ICON)),
-
- "OptionPane.infoIcon",
+
+ "OptionPane.infoIcon",
new ImageIcon(ImageLoader.getImage(ImageLoader.INFO_ICON)),
- "RadioButton.gradient", buttonGradient,
- "RadioButton.rollover", Boolean.TRUE,
+ "RadioButton.gradient", buttonGradient,
+ "RadioButton.rollover", Boolean.TRUE,
+
+ "RadioButtonMenuItem.gradient", buttonGradient,
- "RadioButtonMenuItem.gradient", buttonGradient,
+ "Spinner.arrowButtonBorder", SIPCommBorders.getTextFieldBorder(),
- "Spinner.arrowButtonBorder", SIPCommBorders.getTextFieldBorder(),
+ "Slider.altTrackColor", SLIDER_GRADIENT_LIGHT_COLOR,
+ "Slider.gradient", sliderGradient,
+ "Slider.focusGradient", sliderGradient,
- "Slider.altTrackColor", new ColorUIResource(0xD2E2EF),
- "Slider.gradient", sliderGradient,
- "Slider.focusGradient", sliderGradient,
+ "SplitPane.oneTouchButtonsOpaque", Boolean.FALSE,
+ "SplitPane.dividerFocusColor", SPLIT_PANE_DEVIDER_FOCUS_COLOR,
+ "SplitPane.dividerSize", new Integer(5),
- "SplitPane.oneTouchButtonsOpaque", Boolean.FALSE,
- "SplitPane.dividerFocusColor", LIGHT_BLUE_GRAY,
- "SplitPane.dividerSize", new Integer(5),
+ "ScrollBar.width", new Integer(12),
+ "ScrollBar.horizontalThumbIcon",
+ ImageLoader.getImage(ImageLoader.SCROLLBAR_THUMB_HORIZONTAL),
+ "ScrollBar.verticalThumbIcon",
+ ImageLoader.getImage(ImageLoader.SCROLLBAR_THUMB_VERTICAL),
+ "ScrollBar.horizontalThumbHandleIcon",
+ ImageLoader
+ .getImage(ImageLoader.SCROLLBAR_THUMB_HANDLE_HORIZONTAL),
+ "ScrollBar.verticalThumbHandleIcon",
+ ImageLoader
+ .getImage(ImageLoader.SCROLLBAR_THUMB_HANDLE_VERTICAL),
+ "ScrollBar.trackHighlight", SCROLL_BAR_TRACK_HIGHLIGHT,
+ "ScrollBar.highlight", SELECTION_BACKGROUND,
+ "ScrollBar.darkShadow", SCROLL_BAR_DARK_SHADOW,
- "ScrollBar.width", new Integer(12),
- "ScrollBar.horizontalThumbIcon",
- ImageLoader.getImage(
- ImageLoader.SCROLLBAR_THUMB_HORIZONTAL),
- "ScrollBar.verticalThumbIcon",
- ImageLoader.getImage(
- ImageLoader.SCROLLBAR_THUMB_VERTICAL),
- "ScrollBar.horizontalThumbHandleIcon",
- ImageLoader.getImage(
- ImageLoader.SCROLLBAR_THUMB_HANDLE_HORIZONTAL),
- "ScrollBar.verticalThumbHandleIcon",
- ImageLoader.getImage(
- ImageLoader.SCROLLBAR_THUMB_HANDLE_VERTICAL),
- "ScrollBar.trackHighlight", GRAY,
- "ScrollBar.highlight", LIGHT_GRAY,
- "ScrollBar.darkShadow", GRAY,
+ "TabbedPane.borderHightlightColor", TABBED_PANE_HIGHLIGHT_COLOR,
+ "TabbedPane.contentBorderInsets", new Insets(2, 2, 3, 3),
+ "TabbedPane.selected", SELECTION_BACKGROUND,
+ "TabbedPane.tabAreaInsets", new Insets(2, 2, 0, 6),
+ "TabbedPane.unselectedBackground", SELECTION_BACKGROUND,
- "TabbedPane.borderHightlightColor", LIGHT_BLUE,
- "TabbedPane.contentBorderInsets", new Insets(2, 2, 3, 3),
- "TabbedPane.selected", LIGHT_GRAY,
- "TabbedPane.tabAreaInsets", new Insets(2, 2, 0, 6),
- "TabbedPane.unselectedBackground", LIGHT_GRAY,
+ "TextField.border", textFieldBorder,
+ "TextField.margin", new InsetsUIResource(3, 3, 3, 3),
- "TextField.border", textFieldBorder,
- "TextField.margin", new InsetsUIResource(3, 3, 3, 3),
+ "PasswordField.border", textFieldBorder,
+ "PasswordField.margin", new InsetsUIResource(3, 3, 3, 3),
- "PasswordField.border", textFieldBorder,
- "PasswordField.margin", new InsetsUIResource(3, 3, 3, 3),
+ "FormattedTextField.border", textFieldBorder,
+ "FormattedTextField.margin", new InsetsUIResource(3, 3, 3, 3),
- "FormattedTextField.border", textFieldBorder,
- "FormattedTextField.margin", new InsetsUIResource(3, 3, 3, 3),
+ "Table.gridColor", TABLE_GRID_COLOR,
+ "Table.background", getDesktopColor(),
- "Table.gridColor", LIGHT_BLUE_GRAY,
- "Table.background", getDesktopColor(),
+ "ToggleButton.gradient", buttonGradient,
- "ToggleButton.gradient", buttonGradient,
+ "ToolBar.isRollover", Boolean.TRUE,
+ "ToolBar.separatorColor", PRIMARY_CONTROL_COLOR,
+ "ToolBar.separatorSize", new DimensionUIResource(8, 22),
- "ToolBar.isRollover", Boolean.TRUE,
- "ToolBar.separatorColor", Constants.LIGHT_GRAY_COLOR,
- "ToolBar.separatorSize", new DimensionUIResource(8, 22),
+ "ToolTip.background", SELECTION_BACKGROUND,
+ "ToolTip.backgroundInactive", SELECTION_BACKGROUND,
+ "ToolTip.hideAccelerator", Boolean.FALSE,
- "ToolTip.background", LIGHT_GRAY,
- "ToolTip.backgroundInactive", LIGHT_GRAY,
- "ToolTip.hideAccelerator", Boolean.FALSE,
+ "TitledBorder.border", SIPCommBorders.getBoldRoundBorder()
+ };
- "TitledBorder.border", SIPCommBorders.getBoldRoundBorder()
- };
table.putDefaults(defaults);
}
/**
* Overriden to enable picking up the system fonts, if applicable.
*/
- boolean isSystemTheme() {
+ boolean isSystemTheme()
+ {
return true;
}
- public String getName() {
+ public String getName()
+ {
return "SipCommunicator";
}
- protected ColorUIResource getPrimary1() {
- return DARK_BLUE;
+ protected ColorUIResource getPrimary1()
+ {
+ return PRIMARY_CONTROL_DARK_SHADOW;
}
- protected ColorUIResource getPrimary2() {
- return LIGHT_BLUE;
+ protected ColorUIResource getPrimary2()
+ {
+ return PRIMARY_CONTROL_SHADOW;
}
- protected ColorUIResource getPrimary3() {
- return GRAY;
+ protected ColorUIResource getPrimary3()
+ {
+ return PRIMARY_CONTROL_COLOR;
}
- protected ColorUIResource getSecondary1() {
- return DARK_BLUE;
+ protected ColorUIResource getSecondary1()
+ {
+ return CONTROL_DARK_SHADOW;
}
- protected ColorUIResource getSecondary2() {
- return GRAY;
+ protected ColorUIResource getSecondary2()
+ {
+ return CONTROL_SHADOW;
}
- protected ColorUIResource getSecondary3() {
- return LIGHT_GRAY;
+ protected ColorUIResource getSecondary3()
+ {
+ return CONTROL_COLOR;
}
- protected ColorUIResource getBlack() {
- return OCEAN_BLACK;
+ protected ColorUIResource getBlack()
+ {
+ return CONTROL_TEXT_COLOR;
}
- public ColorUIResource getDesktopColor() {
- return VERY_LIGHT_GRAY;
+ public ColorUIResource getDesktopColor()
+ {
+ return DESKTOP_BACKGROUND_COLOR;
}
- public ColorUIResource getWindowBackground() {
+ public ColorUIResource getWindowBackground()
+ {
return getWhite();
}
-
- public ColorUIResource getControl(){
- return VERY_LIGHT_GRAY;
- }
- public ColorUIResource getMenuBackground(){
- return VERY_LIGHT_GRAY;
+ public ColorUIResource getControl()
+ {
+ return DESKTOP_BACKGROUND_COLOR;
}
- public ColorUIResource getInactiveControlTextColor() {
- return INACTIVE_CONTROL_TEXT_COLOR;
+ public ColorUIResource getMenuBackground()
+ {
+ return DESKTOP_BACKGROUND_COLOR;
}
- public ColorUIResource getControlTextColor() {
- return CONTROL_TEXT_COLOR;
+ public ColorUIResource getInactiveControlTextColor()
+ {
+ return INACTIVE_CONTROL_TEXT_COLOR;
}
- public ColorUIResource getMenuDisabledForeground() {
+ public ColorUIResource getMenuDisabledForeground()
+ {
return MENU_DISABLED_FOREGROUND;
}
- public FontUIResource getControlTextFont() {
+ public FontUIResource getControlTextFont()
+ {
return BASIC_FONT;
}
- public FontUIResource getSystemTextFont() {
+ public FontUIResource getSystemTextFont()
+ {
return BASIC_FONT;
}
- public FontUIResource getUserTextFont() {
+ public FontUIResource getUserTextFont()
+ {
return BASIC_FONT;
}
- public FontUIResource getMenuTextFont() {
+ public FontUIResource getMenuTextFont()
+ {
return BASIC_FONT;
}
- public FontUIResource getWindowTitleFont() {
+ public FontUIResource getWindowTitleFont()
+ {
return BASIC_FONT;
}
- public FontUIResource getSubTextFont() {
+ public FontUIResource getSubTextFont()
+ {
return BASIC_FONT;
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLFUtils.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLFUtils.java
index 1f41aef..10d62ed 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLFUtils.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLFUtils.java
@@ -61,7 +61,7 @@ public class SIPCommLFUtils {
Graphics2D g2 = (Graphics2D) g;
- g2.setColor(Constants.BLUE_GRAY_BORDER_COLOR);
+ g2.setColor(Constants.BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(x, y, w - 1, h - 1, r1, r2);
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuItemUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuItemUI.java
index c56d942..92c30c6 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuItemUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuItemUI.java
@@ -32,7 +32,7 @@ public class SIPCommMenuItemUI
public void paint(Graphics g, JComponent c)
{
- AntialiasingManager.activateAntialiasing(g);
+ AntialiasingManager.activateAntialiasing(g);
super.paint(g, c);
}
@@ -65,11 +65,11 @@ public class SIPCommMenuItemUI
g.setColor(SIPCommLookAndFeel.getControlDarkShadow());
g.drawRoundRect(0, 0, menuWidth - 1, menuHeight - 1, 5, 5);
}
- else {
- g.setColor(menuItem.getBackground());
+ else {
+ g.setColor(menuItem.getBackground());
g.fillRoundRect(0, 0, menuWidth, menuHeight, 5, 5);
}
- g.setColor(oldColor);
+ g.setColor(oldColor);
}
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommSelectorMenuUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommSelectorMenuUI.java
index 5d22f09..44a9ef0 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommSelectorMenuUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommSelectorMenuUI.java
@@ -56,6 +56,6 @@ public class SIPCommSelectorMenuUI
int menuWidth = menuItem.getWidth();
int menuHeight = menuItem.getHeight();
- g.drawImage(menuBgImage, 0, 0, menuWidth, menuHeight, null);
+ g.drawImage(menuBgImage, 0, 0, menuWidth, menuHeight, null);
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java
index 2828cc3..adab088 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java
@@ -161,10 +161,10 @@ public class CallListCellRenderer extends JPanel
if (!this.isLeaf) {
GradientPaint p = new GradientPaint(0, 0,
- Constants.BLUE_GRAY_BORDER_COLOR,
+ Constants.BORDER_COLOR,
this.getWidth(),
this.getHeight(),
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7);
@@ -176,7 +176,7 @@ public class CallListCellRenderer extends JPanel
Constants.HISTORY_IN_CALL_COLOR,
this.getWidth(),
this.getHeight(),
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7);
@@ -187,7 +187,7 @@ public class CallListCellRenderer extends JPanel
Constants.HISTORY_OUT_CALL_COLOR,
this.getWidth(),
this.getHeight(),
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7);
@@ -196,10 +196,10 @@ public class CallListCellRenderer extends JPanel
if (this.isSelected) {
- g2.setColor(Constants.SELECTED_END_COLOR);
+ g2.setColor(Constants.SELECTED_COLOR);
g2.fillRoundRect(1, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(1, 0, this.getWidth() - 2, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantDialpadDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantDialpadDialog.java
index 6c62b84..974cf39 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantDialpadDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantDialpadDialog.java
@@ -68,15 +68,15 @@ public class CallParticipantDialpadDialog
Graphics2D g2 = (Graphics2D) g;
GradientPaint p = new GradientPaint(this.getWidth() / 2, 0,
- Constants.MOVER_START_COLOR, this.getWidth() / 2,
+ Constants.GRADIENT_DARK_COLOR, this.getWidth() / 2,
getHeight(),
- Color.WHITE);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
- g2.setColor(Constants.LIGHT_GRAY_COLOR);
+ g2.setColor(Constants.GRADIENT_DARK_COLOR);
g2.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 10, 10);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactPanel.java
index 3c890fd..0c4366c 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatContactPanel.java
@@ -201,14 +201,14 @@ public class ChatContactPanel
if(chatContact.isSelected())
{
GradientPaint p = new GradientPaint(this.getWidth()/2, 0,
- Constants.SELECTED_END_COLOR,
+ Constants.SELECTED_COLOR,
this.getWidth()/2, this.getHeight(),
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(1, 0, this.getWidth() - 1, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSendPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSendPanel.java
index e4de8d3..3d329bc 100755
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSendPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSendPanel.java
@@ -142,7 +142,7 @@ public class ChatSendPanel
Graphics2D g2 = (Graphics2D) g;
- g2.setColor(Constants.MOVER_START_COLOR);
+ g2.setColor(Constants.GRADIENT_DARK_COLOR);
g2.setStroke(new BasicStroke(1f));
g2.drawRoundRect(3, 4, this.statusPanel.getWidth() - 2,
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/history/DatesListRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chat/history/DatesListRenderer.java
index be8ce3d..68f95ef 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/history/DatesListRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/history/DatesListRenderer.java
@@ -62,10 +62,10 @@ public class DatesListRenderer
if (this.isSelected) {
- g2.setColor(Constants.SELECTED_END_COLOR);
+ g2.setColor(Constants.SELECTED_COLOR);
g2.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(0, 0, this.getWidth() - 1, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java
index 5d26fe7..a75eec0 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java
@@ -154,10 +154,10 @@ public class ChatRoomsListCellRenderer extends JPanel
if (!this.isLeaf) {
GradientPaint p = new GradientPaint(0, 0,
- Constants.SELECTED_END_COLOR,
+ Constants.SELECTED_COLOR,
this.getWidth(),
this.getHeight(),
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7);
@@ -165,10 +165,10 @@ public class ChatRoomsListCellRenderer extends JPanel
if (this.isSelected) {
- g2.setColor(Constants.SELECTED_END_COLOR);
+ g2.setColor(Constants.SELECTED_COLOR);
g2.fillRoundRect(1, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(1, 0, this.getWidth() - 1, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormList.java b/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormList.java
index 9ecd819..def574b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormList.java
@@ -41,7 +41,7 @@ public class ConfigFormList
this.addListSelectionListener(this);
this.setBorder(BorderFactory
- .createLineBorder(Constants.BLUE_GRAY_BORDER_COLOR));
+ .createLineBorder(Constants.BORDER_COLOR));
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormListCellRenderer.java
index 4c0c1f5..9109a77 100644
--- a/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormListCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/configforms/ConfigFormListCellRenderer.java
@@ -145,7 +145,7 @@ public class ConfigFormListCellRenderer
- SELECTED_GRADIENT_SIZE, this
.getWidth(), this.getHeight() - 1);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.drawRoundRect(0, 0, this.getWidth() - 1, this.getHeight() - 1,
5, 5);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java
index aa47bd8..d454dec 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java
@@ -257,10 +257,10 @@ public class ContactListCellRenderer extends JPanel
if (!this.isLeaf) {
GradientPaint p = new GradientPaint(0, 0,
- Constants.SELECTED_END_COLOR,
+ Constants.SELECTED_COLOR,
this.getWidth(),
this.getHeight(),
- Constants.MOVER_END_COLOR);
+ Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7);
@@ -268,10 +268,10 @@ public class ContactListCellRenderer extends JPanel
if (this.isSelected) {
- g2.setColor(Constants.SELECTED_END_COLOR);
+ g2.setColor(Constants.SELECTED_COLOR);
g2.fillRoundRect(1, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(1, 0, this.getWidth() - 1, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/impl/gui/utils/Constants.java b/src/net/java/sip/communicator/impl/gui/utils/Constants.java
index 6dbbc00..1c2b5b6 100755
--- a/src/net/java/sip/communicator/impl/gui/utils/Constants.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/Constants.java
@@ -182,84 +182,53 @@ public class Constants
* -------------------- FONTS AND COLOR CONSTANTS ------------------------
* ======================================================================
*/
-
- /**
- * The color used to paint the background of an incoming call history
- * record.
- */
- public static final Color HISTORY_DATE_COLOR
- = new Color(255, 201, 102);
-
/**
* The color used to paint the background of an incoming call history
* record.
*/
public static final Color HISTORY_IN_CALL_COLOR
- = new Color(249, 255, 197);
+ = new Color(ColorResources.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(243, 244, 247);
-
- /**
- * The start color used to paint a gradient selected background of some
- * components.
- */
- public static final Color SELECTED_START_COLOR
- = new Color(151, 169, 198);
+ = new Color(ColorResources.getColor("historyOutgoingCallBackground"));
/**
* The end color used to paint a gradient selected background of some
* components.
*/
- public static final Color SELECTED_END_COLOR
- = new Color(209, 212, 225);
+ public static final Color SELECTED_COLOR
+ = new Color(ColorResources.getColor("listSelectionColor"));
/**
* The start color used to paint a gradient mouse over background of some
* components.
*/
- public static final Color MOVER_START_COLOR = new Color(230,
- 230, 230);
+ public static final Color GRADIENT_DARK_COLOR
+ = new Color(ColorResources.getColor("gradientDarkColor"));
/**
* The end color used to paint a gradient mouse over background of some
* components.
*/
- public static final Color MOVER_END_COLOR = new Color(255,
- 255, 255);
-
- /**
- * Gray color used to paint some borders, like the button border for
- * example.
- */
- public static final Color GRAY_COLOR = new Color(154, 154,
- 154);
+ public static final Color GRADIENT_LIGHT_COLOR
+ = new Color(ColorResources.getColor("gradientLightColor"));
/**
* A color between blue and gray used to paint some borders.
*/
- public static final Color BLUE_GRAY_BORDER_COLOR = new Color(142, 160, 188);
+ public static final Color BORDER_COLOR
+ = new Color(ColorResources.getColor("borderColor"));
/**
* A color between blue and gray (darker than the other one), used to paint
* some borders.
*/
- public static final Color BLUE_GRAY_BORDER_DARKER_COLOR = new Color(131, 149,
- 178);
-
- /**
- * Light gray color used in the look and feel.
- */
- public static final Color LIGHT_GRAY_COLOR = new Color(200, 200, 200);
-
- /**
- * Dark blue color used in the About Window.
- */
- public static final Color DARK_BLUE = new Color(23, 65, 125);
+ public static final Color LIST_SELECTION_BORDER_COLOR
+ = new Color(ColorResources.getColor("listSelectionBorderColor"));
/*
* ======================================================================
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/CallListCellRenderer.java b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/CallListCellRenderer.java
index c77530f..356405a 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/CallListCellRenderer.java
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/CallListCellRenderer.java
@@ -164,8 +164,8 @@ public class CallListCellRenderer
{
GradientPaint p = new GradientPaint(0, 0,
- Constants.BLUE_GRAY_BORDER_COLOR, this.getWidth(), this
- .getHeight(), Constants.MOVER_END_COLOR);
+ Constants.BORDER_COLOR, this.getWidth(), this
+ .getHeight(), Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1, 7, 7);
@@ -177,7 +177,7 @@ public class CallListCellRenderer
GradientPaint p = new GradientPaint(0, 0,
Constants.HISTORY_IN_CALL_COLOR, this.getWidth(), this
- .getHeight(), Constants.MOVER_END_COLOR);
+ .getHeight(), Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1,
@@ -188,7 +188,7 @@ public class CallListCellRenderer
GradientPaint p = new GradientPaint(0, 0,
Constants.HISTORY_OUT_CALL_COLOR, this.getWidth(), this
- .getHeight(), Constants.MOVER_END_COLOR);
+ .getHeight(), Constants.GRADIENT_LIGHT_COLOR);
g2.setPaint(p);
g2.fillRoundRect(1, 1, this.getWidth(), this.getHeight() - 1,
@@ -199,10 +199,10 @@ public class CallListCellRenderer
if (this.isSelected)
{
- g2.setColor(Constants.SELECTED_END_COLOR);
+ g2.setColor(Constants.SELECTED_COLOR);
g2.fillRoundRect(1, 0, this.getWidth(), this.getHeight(), 7, 7);
- g2.setColor(Constants.BLUE_GRAY_BORDER_DARKER_COLOR);
+ g2.setColor(Constants.LIST_SELECTION_BORDER_COLOR);
g2.setStroke(new BasicStroke(1.5f));
g2.drawRoundRect(1, 0, this.getWidth() - 2, this.getHeight() - 1,
7, 7);
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Constants.java b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Constants.java
index a3295ce..27b0fc5 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Constants.java
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Constants.java
@@ -30,86 +30,70 @@ public class Constants {
/**
* The incoming call flag.
*/
- public static final int INCOMING_CALL = 1;
-
+ public static final int INCOMING_CALL = 1;
+
/**
* The outgoing call flag.
*/
- public static final int OUTGOING_CALL = 2;
-
+ public static final int OUTGOING_CALL = 2;
+
/**
* The Incoming & outcoming flag.
*/
- public static final int INOUT_CALL = 3;
+ public static final int INOUT_CALL = 3;
/*
* ======================================================================
* -------------------- FONTS AND COLOR CONSTANTS ------------------------
* ======================================================================
*/
-
- /**
- * The color used to paint the background of an incoming call history
- * record.
- */
- public static final Color HISTORY_DATE_COLOR
- = new Color(255, 201, 102);
-
/**
* The color used to paint the background of an incoming call history
* record.
*/
public static final Color HISTORY_IN_CALL_COLOR
- = new Color(249, 255, 197);
+ = new Color(Resources.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(243, 244, 247);
-
+ = new Color(Resources.getColor("historyOutgoingCallBackground"));
/**
* The end color used to paint a gradient selected background of some
* components.
*/
- public static final Color SELECTED_END_COLOR
- = new Color(209, 212, 225);
+ public static final Color SELECTED_COLOR
+ = new Color(Resources.getColor("listSelectionColor"));
/**
* The start color used to paint a gradient mouse over background of some
* components.
*/
- public static final Color MOVER_START_COLOR = new Color(230,
- 230, 230);
+ public static final Color GRADIENT_DARK_COLOR
+ = new Color(Resources.getColor("gradientDarkColor"));
/**
* The end color used to paint a gradient mouse over background of some
* components.
*/
- public static final Color MOVER_END_COLOR = new Color(255,
- 255, 255);
-
- /**
- * Gray color used to paint some borders, like the button border for
- * example.
- */
- public static final Color GRAY_COLOR = new Color(154, 154,
- 154);
+ public static final Color GRADIENT_LIGHT_COLOR
+ = new Color(Resources.getColor("gradientLightColor"));
/**
* A color between blue and gray used to paint some borders.
*/
- public static final Color BLUE_GRAY_BORDER_COLOR = new Color(142, 160, 188);
+ public static final Color BORDER_COLOR
+ = new Color(Resources.getColor("borderColor"));
/**
* A color between blue and gray (darker than the other one), used to paint
* some borders.
*/
- public static final Color BLUE_GRAY_BORDER_DARKER_COLOR = new Color(131, 149,
- 178);
-
+ public static final Color LIST_SELECTION_BORDER_COLOR
+ = new Color(Resources.getColor("listSelectionBorderColor"));
/*
* ======================================================================
@@ -130,8 +114,8 @@ public class Constants {
/**
* The default <tt>Font</tt> object used through this ui implementation.
*/
- public static final Font FONT = new Font(Constants.FONT_NAME, Font.PLAIN,
- new Integer(Constants.FONT_SIZE).intValue());
+ public static final Font FONT = new Font(Constants.FONT_NAME,
+ Font.PLAIN, new Integer(Constants.FONT_SIZE).intValue());
}
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java
index 5e665af..f9362f8 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java
@@ -30,6 +30,12 @@ public class Resources {
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
+ private static final String COLOR_BUNDLE_NAME
+ = "resources.colors.colorResources";
+
+ private static final ResourceBundle COLOR_RESOURCE_BUNDLE
+ = ResourceBundle.getBundle(COLOR_BUNDLE_NAME);
+
/**
* Returns an internationalized string corresponding to the given key.
* @param key The key of the string.
@@ -126,4 +132,25 @@ public class Resources {
return image;
}
+
+ /**
+ * 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(COLOR_RESOURCE_BUNDLE.getString(key), 16);
+ }
+ catch (MissingResourceException e)
+ {
+ log.error("Missing color resource.", e);
+
+ return 0xFFFFFF;
+ }
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/resources.properties b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/resources.properties
index 017ff86..86b3b6b 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/resources.properties
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/resources.properties
@@ -24,8 +24,8 @@ october=Oct
november=Nov
december=Dec
-searchIcon=net/java/sip/communicator/plugin/extendedcallhistorysearch/resources/searchIcon.png
-historyMenuIcon=net/java/sip/communicator/plugin/extendedcallhistorysearch/resources/history16x16.png
-incomingCall=net/java/sip/communicator/plugin/extendedcallhistorysearch/resources/incomingCall.png
-outgoingCall=net/java/sip/communicator/plugin/extendedcallhistorysearch/resources/outgoingCall.png
-calendarIcon=net/java/sip/communicator/plugin/extendedcallhistorysearch/resources/calendarIcon.png
+searchIcon=resources/images/plugin/extendedcallhistorysearch/searchIcon.png
+historyMenuIcon=resources/images/plugin/extendedcallhistorysearch/history16x16.png
+incomingCall=resources/images/plugin/extendedcallhistorysearch/incomingCall.png
+outgoingCall=resources/images/plugin/extendedcallhistorysearch/outgoingCall.png
+calendarIcon=resources/images/plugin/extendedcallhistorysearch/calendarIcon.png
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/PluginListCellRenderer.java b/src/net/java/sip/communicator/plugin/pluginmanager/PluginListCellRenderer.java
index c1b9a64..91a623a 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/PluginListCellRenderer.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/PluginListCellRenderer.java
@@ -26,16 +26,16 @@ public class PluginListCellRenderer extends JPanel
implements TableCellRenderer
{
/**
- * The start color used to paint a gradient selected background.
+ * The end color used to paint a gradient selected background.
*/
- private static final Color SELECTED_END_COLOR
- = new Color(240, 240, 240);
+ private static final Color SELECTED_START_COLOR
+ = new Color(Resources.getColor("listSelectionColor"));
/**
- * The end color used to paint a gradient selected background.
+ * The start color used to paint a gradient selected background.
*/
- private static final Color SELECTED_START_COLOR
- = new Color(209, 212, 225);
+ private static final Color SELECTED_END_COLOR
+ = new Color(Resources.getColor("gradientLightColor"));
private JPanel mainPanel = new JPanel(new BorderLayout());
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java b/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java
index eb9c504..5ef476b 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java
@@ -27,8 +27,14 @@ public class Resources {
private static final String BUNDLE_NAME
= "net.java.sip.communicator.plugin.pluginmanager.resources";
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ private static final String COLOR_BUNDLE_NAME
+ = "resources.colors.colorResources";
+
+ private static final ResourceBundle RESOURCE_BUNDLE
+ = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private static final ResourceBundle COLOR_RESOURCE_BUNDLE
+ = ResourceBundle.getBundle(COLOR_BUNDLE_NAME);
/**
* Returns an internationalized string corresponding to the given key.
@@ -84,4 +90,25 @@ public class Resources {
return image;
}
+
+ /**
+ * 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(COLOR_RESOURCE_BUNDLE.getString(key), 16);
+ }
+ catch (MissingResourceException e)
+ {
+ log.error("Missing color resource.", e);
+
+ return 0xFFFFFF;
+ }
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/TitlePanel.java b/src/net/java/sip/communicator/plugin/pluginmanager/TitlePanel.java
index 2a346d2..f4f28d0 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/TitlePanel.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/TitlePanel.java
@@ -23,7 +23,8 @@ public class TitlePanel extends JPanel
/**
* A color between blue and gray used to paint some borders.
*/
- public static final Color BLUE_GRAY_BORDER_COLOR = new Color(142, 160, 188);
+ public static final Color BORDER_COLOR
+ = new Color(Resources.getColor("borderColor"));
/**
* The size of the gradient used for painting the background.
@@ -33,14 +34,14 @@ public class TitlePanel extends JPanel
/**
* The start color used to paint a gradient mouse over background.
*/
- private static final Color MOVER_START_COLOR = new Color(230,
- 230, 230);
+ private static final Color GRADIENT_DARK_COLOR
+ = new Color(Resources.getColor("gradientDarkColor"));
/**
* The end color used to paint a gradient mouse over background.
*/
- private static final Color MOVER_END_COLOR = new Color(255,
- 255, 255);
+ private static final Color GRADIENT_LIGHT_COLOR
+ = new Color(Resources.getColor("gradientLightColor"));
private JLabel titleLabel = new JLabel();
@@ -83,20 +84,20 @@ public class TitlePanel extends JPanel
Graphics2D g2 = (Graphics2D) g;
GradientPaint p = new GradientPaint(this.getWidth() / 2, 0,
- MOVER_START_COLOR, this.getWidth() / 2,
+ GRADIENT_DARK_COLOR, this.getWidth() / 2,
GRADIENT_SIZE,
- MOVER_END_COLOR);
+ GRADIENT_LIGHT_COLOR);
GradientPaint p1 = new GradientPaint(this.getWidth() / 2, this
.getHeight()
- GRADIENT_SIZE,
- MOVER_END_COLOR, this.getWidth() / 2,
- this.getHeight(), MOVER_START_COLOR);
+ GRADIENT_LIGHT_COLOR, this.getWidth() / 2,
+ this.getHeight(), GRADIENT_DARK_COLOR);
g2.setPaint(p);
g2.fillRect(0, 0, this.getWidth(), GRADIENT_SIZE);
- g2.setColor(MOVER_END_COLOR);
+ g2.setColor(GRADIENT_LIGHT_COLOR);
g2.fillRect(0, GRADIENT_SIZE, this.getWidth(),
this.getHeight() - GRADIENT_SIZE);
@@ -104,7 +105,7 @@ public class TitlePanel extends JPanel
g2.fillRect(0, this.getHeight() - GRADIENT_SIZE
- 1, this.getWidth(), this.getHeight() - 1);
- g2.setColor(BLUE_GRAY_BORDER_COLOR);
+ g2.setColor(BORDER_COLOR);
g2.drawRoundRect(0, 0, this.getWidth() - 1, this.getHeight() - 1, 5, 5);
}
diff --git a/src/net/java/sip/communicator/plugin/whiteboard/resources.properties b/src/net/java/sip/communicator/plugin/whiteboard/resources.properties
index 1884ee8..0b4fe51 100644
--- a/src/net/java/sip/communicator/plugin/whiteboard/resources.properties
+++ b/src/net/java/sip/communicator/plugin/whiteboard/resources.properties
@@ -1,30 +1,30 @@
-circleIcon=net/java/sip/communicator/plugin/whiteboard/resources/circle.png
-circle2Icon=net/java/sip/communicator/plugin/whiteboard/resources/circle2.png
-circleFIcon=net/java/sip/communicator/plugin/whiteboard/resources/circleF.png
-colorIcon=net/java/sip/communicator/plugin/whiteboard/resources/color.png
-editCopyIcon=net/java/sip/communicator/plugin/whiteboard/resources/editcopy.png
-editPasteIcon=net/java/sip/communicator/plugin/whiteboard/resources/editpaste.png
-fileImportIcon=net/java/sip/communicator/plugin/whiteboard/resources/fileimport.png
-fileNewIcon=net/java/sip/communicator/plugin/whiteboard/resources/filenew.png
-fileSaveIcon=net/java/sip/communicator/plugin/whiteboard/resources/filesave.png
-imgIcon=net/java/sip/communicator/plugin/whiteboard/resources/img.png
-lineIcon=net/java/sip/communicator/plugin/whiteboard/resources/line.png
-line2Icon=net/java/sip/communicator/plugin/whiteboard/resources/line2.png
-modifIcon=net/java/sip/communicator/plugin/whiteboard/resources/modif.png
-penIcon=net/java/sip/communicator/plugin/whiteboard/resources/pen.png
-mpenIcon=net/java/sip/communicator/plugin/whiteboard/resources/m_pen.png
-polyIcon=net/java/sip/communicator/plugin/whiteboard/resources/poly.png
-polyFIcon=net/java/sip/communicator/plugin/whiteboard/resources/polyF.png
-polyLineIcon=net/java/sip/communicator/plugin/whiteboard/resources/polyLine.png
-rectIcon=net/java/sip/communicator/plugin/whiteboard/resources/rect.png
-rectFIcon=net/java/sip/communicator/plugin/whiteboard/resources/rectF.png
-sc_logo16x16=net/java/sip/communicator/plugin/whiteboard/resources/sc_logo16x16.png
-selectIcon=net/java/sip/communicator/plugin/whiteboard/resources/select.png
-squareIcon=net/java/sip/communicator/plugin/whiteboard/resources/square.png
-straightLineIcon=net/java/sip/communicator/plugin/whiteboard/resources/straight_line.png
-textIcon=net/java/sip/communicator/plugin/whiteboard/resources/text.png
-text2Icon=net/java/sip/communicator/plugin/whiteboard/resources/text2.png
-inviteIcon=net/java/sip/communicator/plugin/whiteboard/resources/inviteDialogIcon.png
+circleIcon=resources/images/plugin/whiteboard/circle.png
+circle2Icon=resources/images/plugin/whiteboard/circle2.png
+circleFIcon=resources/images/plugin/whiteboard/circleF.png
+colorIcon=resources/images/plugin/whiteboard/color.png
+editCopyIcon=resources/images/plugin/whiteboard/editcopy.png
+editPasteIcon=resources/images/plugin/whiteboard/editpaste.png
+fileImportIcon=resources/images/plugin/whiteboard/fileimport.png
+fileNewIcon=resources/images/plugin/whiteboard/filenew.png
+fileSaveIcon=resources/images/plugin/whiteboard/filesave.png
+imgIcon=resources/images/plugin/whiteboard/img.png
+lineIcon=resources/images/plugin/whiteboard/line.png
+line2Icon=resources/images/plugin/whiteboard/line2.png
+modifIcon=resources/images/plugin/whiteboard/modif.png
+penIcon=resources/images/plugin/whiteboard/pen.png
+mpenIcon=resources/images/plugin/whiteboard/m_pen.png
+polyIcon=resources/images/plugin/whiteboard/poly.png
+polyFIcon=resources/images/plugin/whiteboard/polyF.png
+polyLineIcon=resources/images/plugin/whiteboard/polyLine.png
+rectIcon=resources/images/plugin/whiteboard/rect.png
+rectFIcon=resources/images/plugin/whiteboard/rectF.png
+sc_logo16x16=resources/images/plugin/whiteboard/sc_logo16x16.png
+selectIcon=resources/images/plugin/whiteboard/select.png
+squareIcon=resources/images/plugin/whiteboard/square.png
+straightLineIcon=resources/images/plugin/whiteboard/straight_line.png
+textIcon=resources/images/plugin/whiteboard/text.png
+text2Icon=resources/images/plugin/whiteboard/text2.png
+inviteIcon=resources/images/plugin/whiteboard/inviteDialogIcon.png
reason=Reason
accept=&Accept