summaryrefslogtreecommitdiff
path: root/javax/swing/plaf/basic/BasicProgressBarUI.java
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2005-10-12 12:09:58 +0000
committerRoman Kennke <roman@kennke.org>2005-10-12 12:09:58 +0000
commit7f2453f2d098018abcbdaf21faab0c6e9d0fafad (patch)
tree032f3051acf51bb6f50c12ba7fd06ea19fd95dc4 /javax/swing/plaf/basic/BasicProgressBarUI.java
parent1bb5ff4fe4c6a30b092efbb576ff27840a2246b1 (diff)
downloadclasspath-7f2453f2d098018abcbdaf21faab0c6e9d0fafad.tar.gz
2005-10-12 Roman Kennke <kennke@aicas.com>
* javax/swing/plaf/basic/BasicButtonUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java (installDefaults): Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicColorChooserUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicComboBoxUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicDesktopPaneUI.java (installDefaults): Only install background color, if installed color is null or an UIResource instance. * javax/swing/plaf/basic/BasicInternalFrameUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicLabelUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicListUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicLookAndFeel.java (initComponentDefaults): Added default for List.font. * javax/swing/plaf/basic/BasicMenuBarUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicMenuItemUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicMenuUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicOptionPaneUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicPanelUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicPopupMenuUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicProgressBarUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicScrollBarUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicScrollPaneUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicSeparatorUI.java (installDefaults): Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicSliderUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicSpinnerUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicSplitPaneUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicTabbedPaneUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicTableHeaderUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicTableUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicTextUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicToolBarSeparatorUI.java (installDefaults): Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicToolBarUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicToolTipUI.java (installDefaults): Use new LookAndFeel install* methods. * javax/swing/plaf/basic/BasicTreeUI.java (installDefaults): Use new LookAndFeel install* methods. Use UIManager.get* methods instead of UIManager.getDefaults().get* methods. * javax/swing/plaf/basic/BasicViewportUI.java (installDefaults): Use new LookAndFeel install* methods.
Diffstat (limited to 'javax/swing/plaf/basic/BasicProgressBarUI.java')
-rw-r--r--javax/swing/plaf/basic/BasicProgressBarUI.java24
1 files changed, 11 insertions, 13 deletions
diff --git a/javax/swing/plaf/basic/BasicProgressBarUI.java b/javax/swing/plaf/basic/BasicProgressBarUI.java
index d00628f53..744ddf712 100644
--- a/javax/swing/plaf/basic/BasicProgressBarUI.java
+++ b/javax/swing/plaf/basic/BasicProgressBarUI.java
@@ -56,10 +56,10 @@ import java.beans.PropertyChangeListener;
import javax.swing.JComponent;
import javax.swing.JProgressBar;
+import javax.swing.LookAndFeel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
-import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@@ -712,21 +712,19 @@ public class BasicProgressBarUI extends ProgressBarUI
*/
protected void installDefaults()
{
- UIDefaults defaults = UIManager.getLookAndFeelDefaults();
-
- progressBar.setFont(defaults.getFont("ProgressBar.font"));
- progressBar.setForeground(defaults.getColor("ProgressBar.foreground"));
- progressBar.setBackground(defaults.getColor("ProgressBar.background"));
- progressBar.setBorder(defaults.getBorder("ProgressBar.border"));
+ LookAndFeel.installColorsAndFont(progressBar, "ProgressBar.background",
+ "ProgressBar.foreground",
+ "ProgressBar.font");
+ LookAndFeel.installBorder(progressBar, "ProgressBar.border");
progressBar.setOpaque(true);
- selectionForeground = defaults.getColor("ProgressBar.selectionForeground");
- selectionBackground = defaults.getColor("ProgressBar.selectionBackground");
- cellLength = defaults.getInt("ProgressBar.cellLength");
- cellSpacing = defaults.getInt("ProgressBar.cellSpacing");
+ selectionForeground = UIManager.getColor("ProgressBar.selectionForeground");
+ selectionBackground = UIManager.getColor("ProgressBar.selectionBackground");
+ cellLength = UIManager.getInt("ProgressBar.cellLength");
+ cellSpacing = UIManager.getInt("ProgressBar.cellSpacing");
- int repaintInterval = defaults.getInt("ProgressBar.repaintInterval");
- int cycleTime = defaults.getInt("ProgressBar.cycleTime");
+ int repaintInterval = UIManager.getInt("ProgressBar.repaintInterval");
+ int cycleTime = UIManager.getInt("ProgressBar.cycleTime");
if (cycleTime % repaintInterval != 0
&& (cycleTime / repaintInterval) % 2 != 0)