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 062b824d4..2d1a7fb05 100644 --- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java +++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java @@ -111,6 +111,8 @@ public void addCustomEntriesToTable(UIDefaults table) { "RadioButtonMenuItem.gradient", buttonGradient, + "Spinner.arrowButtonBorder", SIPCommBorders.getTextFieldBorder(), + "Slider.altTrackColor", new ColorUIResource(0xD2E2EF), "Slider.gradient", sliderGradient, "Slider.focusGradient", sliderGradient, @@ -118,7 +120,7 @@ public void addCustomEntriesToTable(UIDefaults table) { "SplitPane.oneTouchButtonsOpaque", Boolean.FALSE, "SplitPane.dividerFocusColor", LIGHT_BLUE_GRAY, "SplitPane.dividerSize", new Integer(5), - + "ScrollBar.width", new Integer(12), "ScrollBar.horizontalThumbIcon", ImageLoader.getImage( @@ -135,7 +137,7 @@ public void addCustomEntriesToTable(UIDefaults table) { "ScrollBar.trackHighlight", GRAY, "ScrollBar.highlight", LIGHT_GRAY, "ScrollBar.darkShadow", GRAY, - + "TabbedPane.borderHightlightColor", LIGHT_BLUE, "TabbedPane.contentBorderInsets", new Insets(2, 2, 3, 3), "TabbedPane.selected", LIGHT_GRAY, @@ -144,13 +146,13 @@ public void addCustomEntriesToTable(UIDefaults table) { "TextField.border", textFieldBorder, "TextField.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), - + "Table.gridColor", LIGHT_BLUE_GRAY, "Table.background", getDesktopColor(), @@ -159,11 +161,11 @@ public void addCustomEntriesToTable(UIDefaults table) { "ToolBar.isRollover", Boolean.TRUE, "ToolBar.separatorColor", Constants.LIGHT_GRAY_COLOR, "ToolBar.separatorSize", new DimensionUIResource(8, 22), - + "ToolTip.background", LIGHT_GRAY, "ToolTip.backgroundInactive", LIGHT_GRAY, "ToolTip.hideAccelerator", Boolean.FALSE, - + "TitledBorder.border", SIPCommBorders.getBoldRoundBorder() }; table.putDefaults(defaults); diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java index e70da45b3..73304dff7 100644 --- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java +++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommLookAndFeel.java @@ -27,11 +27,11 @@ public boolean isSupportedLookAndFeel() { return true; } - public String getDescription() { + public String getDescription() { return "The SIP-Communicator look and feel."; } - public String getID() { + public String getID() { return "SIPCommunicator"; } @@ -66,7 +66,8 @@ protected void initClassDefaults(UIDefaults table) { "TextPaneUI", lfPackageName + "SIPCommTextPaneUI", "CheckBoxUI", lfPackageName + "SIPCommCheckBoxUI", "ListUI", lfPackageName + "SIPCommListUI", - "PopupMenuUI", lfPackageName + "SIPCommPopupMenuUI" + "PopupMenuUI", lfPackageName + "SIPCommPopupMenuUI", + "SpinnerUI", lfPackageName + "SIPCommSpinnerUI" }; table.putDefaults(uiDefaults); } diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuUI.java index dfa2f7c56..67139e45b 100644 --- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuUI.java +++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommMenuUI.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; @@ -19,19 +18,23 @@ * * @author Yana Stamcheva */ -public class SIPCommMenuUI extends BasicMenuUI { +public class SIPCommMenuUI + extends BasicMenuUI +{ /** * Creates a new SIPCommMenuUI instance. */ - public static ComponentUI createUI(JComponent x) { + public static ComponentUI createUI(JComponent x) + { return new SIPCommMenuUI(); } - public void paint(Graphics g, JComponent c) { + public void paint(Graphics g, JComponent c) + { AntialiasingManager.activateAntialiasing(g); super.paint(g, c); } - + /** * Draws the background of the menu. * @@ -39,32 +42,35 @@ public void paint(Graphics g, JComponent c) { * @param menuItem menu item to be painted * @param bgColor selection background color * @since 1.4 - */ + */ protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) { AntialiasingManager.activateAntialiasing(g); super.paintBackground(g, menuItem, bgColor); - + ButtonModel model = menuItem.getModel(); Color oldColor = g.getColor(); - + int menuWidth = menuItem.getWidth(); int menuHeight = menuItem.getHeight(); - if (menuItem.isOpaque()) { + if (menuItem.isOpaque()) + { if (model.isArmed() - || (menuItem instanceof JMenu && model.isSelected())) { + || (menuItem instanceof JMenu && model.isSelected())) + { g.setColor(bgColor); g.fillRoundRect(0, 0, menuWidth, menuHeight, 5, 5); - + 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); } } }