001 /*
002 * Copyright 2006 Sun Microsystems, Inc., 4150 Network Circle,
003 * Santa Clara, California 95054, U.S.A. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either
008 * version 2.1 of the License, or (at your option) any later version.
009 *
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013 * Lesser General Public License for more details.
014 *
015 * You should have received a copy of the GNU Lesser General Public
016 * License along with this library; if not, write to the Free Software
017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
018 */
019 package org.jdesktop.swingx.plaf;
020
021 import java.awt.Color;
022 import java.awt.Font;
023
024 import javax.swing.LookAndFeel;
025 import javax.swing.plaf.ColorUIResource;
026 import javax.swing.plaf.FontUIResource;
027
028 import org.jdesktop.swingx.JXMonthView;
029
030 public class MonthViewAddon extends AbstractComponentAddon {
031 public MonthViewAddon() {
032 super("JXMonthView");
033 }
034
035 /**
036 * {@inheritDoc}
037 */
038 @Override
039 protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
040 super.addBasicDefaults(addon, defaults);
041
042 defaults.add(JXMonthView.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicMonthViewUI");
043 defaults.add("JXMonthView.background", new ColorUIResource(Color.WHITE));
044 defaults.add("JXMonthView.monthStringBackground", new ColorUIResource(138, 173, 209));
045 defaults.add("JXMonthView.monthStringForeground", new ColorUIResource(68, 68, 68));
046 defaults.add("JXMonthView.daysOfTheWeekForeground", new ColorUIResource(68, 68, 68));
047 defaults.add("JXMonthView.weekOfTheYearForeground", new ColorUIResource(68, 68, 68));
048 defaults.add("JXMonthView.unselectableDayForeground", new ColorUIResource(Color.RED));
049 defaults.add("JXMonthView.selectedBackground", new ColorUIResource(197, 220, 240));
050 defaults.add("JXMonthView.flaggedDayForeground", new ColorUIResource(Color.RED));
051 defaults.add("JXMonthView.leadingDayForeground", new ColorUIResource(Color.LIGHT_GRAY));
052 defaults.add("JXMonthView.trailingDayForeground", new ColorUIResource(Color.LIGHT_GRAY));
053 defaults.add("JXMonthView.font", UIManagerExt.getSafeFont("Button.font",
054 new FontUIResource("Dialog", Font.PLAIN, 12)));
055 defaults.add("JXMonthView.monthDownFileName",
056 LookAndFeel.makeIcon(MonthViewAddon.class, "basic/resources/month-down.png"));
057 defaults.add("JXMonthView.monthUpFileName",
058 LookAndFeel.makeIcon(MonthViewAddon.class, "basic/resources/month-up.png"));
059 defaults.add("JXMonthView.boxPaddingX", 3);
060 defaults.add("JXMonthView.boxPaddingY", 3);
061 }
062 }