1 30 31 package com.jgoodies.looks.plastic.theme; 32 33 import javax.swing.UIDefaults ; 34 import javax.swing.plaf.ColorUIResource ; 35 36 import com.jgoodies.looks.plastic.PlasticScrollBarUI; 37 38 45 public abstract class AbstractSkyTheme extends SkyBluerTahoma { 46 47 private static final ColorUIResource secondary2 = 48 new ColorUIResource (164, 164, 164); 49 50 private static final ColorUIResource secondary3 = 51 new ColorUIResource (225, 225, 225); 52 53 protected ColorUIResource getPrimary1() { 54 return Colors.GRAY_DARK; 55 } 56 57 protected ColorUIResource getPrimary2() { 58 return Colors.BLUE_LOW_MEDIUM; 59 } 60 61 protected ColorUIResource getPrimary3() { 62 return Colors.BLUE_LOW_LIGHTEST; 63 } 64 65 protected ColorUIResource getSecondary1() { 66 return Colors.GRAY_MEDIUM; 67 } 68 protected ColorUIResource getSecondary2() { 69 return secondary2; 70 } 71 72 protected ColorUIResource getSecondary3() { 73 return secondary3; 74 } 75 76 public ColorUIResource getPrimaryControlShadow() { 78 return getPrimary3(); 79 } 80 81 public ColorUIResource getMenuItemSelectedBackground() { 82 return getPrimary1(); 83 } 84 85 public void addCustomEntriesToTable(UIDefaults table) { 86 super.addCustomEntriesToTable(table); 87 Object [] uiDefaults = 88 { 89 PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY, 90 null, 91 "ScrollBar.thumbHighlight", 92 getPrimaryControlHighlight(), 93 }; 94 table.putDefaults(uiDefaults); 95 } 96 97 } | Popular Tags |