001/*
002 * $Id: BusyLabelAddon.java 2565 2008-01-03 19:08:32Z rah003 $
003 *
004 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
005 * Santa Clara, California 95054, U.S.A. All rights reserved.
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 * 
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015 * Lesser General Public License for more details.
016 * 
017 * You should have received a copy of the GNU Lesser General Public
018 * License along with this library; if not, write to the Free Software
019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
020 */
021package org.jdesktop.swingx.plaf;
022
023import java.awt.Color;
024import java.awt.geom.Ellipse2D;
025import java.awt.geom.RoundRectangle2D;
026
027import javax.swing.plaf.ColorUIResource;
028
029import org.jdesktop.swingx.JXBusyLabel;
030
031/**
032 * Addon for <code>JXBusyLabel</code>.<br>
033 *
034 * @author rah003
035 */
036public class BusyLabelAddon extends AbstractComponentAddon {
037
038  public BusyLabelAddon() {
039    super("JXBusyLabel");
040  }
041
042  @Override
043  protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
044    defaults.add(JXBusyLabel.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicBusyLabelUI");
045    defaults.add("JXBusyLabel.delay", 100);
046    defaults.add("JXBusyLabel.baseColor", new ColorUIResource(Color.LIGHT_GRAY));
047    defaults.add("JXBusyLabel.highlightColor", new ColorUIResource(UIManagerExt.getSafeColor("Label.foreground", Color.BLACK)));
048    float barLength = 8;
049    float barWidth = 4;
050    float height = 26;
051    defaults.add("JXBusyLabel.pointShape", new ShapeUIResource(
052            new RoundRectangle2D.Float(0, 0, barLength, barWidth,
053                barWidth, barWidth)));
054    defaults.add("JXBusyLabel.trajectoryShape", new ShapeUIResource(
055            new Ellipse2D.Float(barLength / 2, barLength / 2, height
056                    - barLength, height - barLength)));
057    
058
059  }
060}