1 /* 2 * aTunes 3 * Copyright (C) Alex Aranda, Sylvain Gaudard and contributors 4 * 5 * See http://www.atunes.org/wiki/index.php?title=Contributing for information about contributors 6 * 7 * http://www.atunes.org 8 * http://sourceforge.net/projects/atunes 9 * 10 * This program is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU General Public License 12 * as published by the Free Software Foundation; either version 2 13 * of the License, or (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 */ 20 21 package net.sourceforge.atunes.gui.views.controls; 22 23 import net.sourceforge.atunes.model.ILookAndFeelChangeListener; 24 import net.sourceforge.atunes.model.ILookAndFeelManager; 25 26 import org.jdesktop.swingx.JXStatusBar; 27 28 /** 29 * Custom JXStatusBar 30 * 31 * @author alex 32 * 33 */ 34 public class CustomStatusBar extends JXStatusBar implements 35 ILookAndFeelChangeListener { 36 37 /** 38 * 39 */ 40 private static final long serialVersionUID = 2037689111184073171L; 41 42 private final ILookAndFeelManager lookAndFeelManager; 43 44 /** 45 * @param lookAndFeelManager 46 */ CustomStatusBar(final ILookAndFeelManager lookAndFeelManager)47 public CustomStatusBar(final ILookAndFeelManager lookAndFeelManager) { 48 super(); 49 this.lookAndFeelManager = lookAndFeelManager; 50 this.lookAndFeelManager.addLookAndFeelChangeListener(this); 51 this.lookAndFeelManager.getCurrentLookAndFeel() 52 .customizeStatusBar(this); 53 } 54 55 @Override lookAndFeelChanged()56 public void lookAndFeelChanged() { 57 this.lookAndFeelManager.getCurrentLookAndFeel() 58 .customizeStatusBar(this); 59 } 60 } 61