116 } 117 } 118 } 119 120 /** 121 * Creates an instance of <code>OceanTheme</code> 122 */ 123 public OceanTheme() { 124 } 125 126 /** 127 * Add this theme's custom entries to the defaults table. 128 * 129 * @param table the defaults table, non-null 130 * @throws NullPointerException if {@code table} is {@code null} 131 */ 132 public void addCustomEntriesToTable(UIDefaults table) { 133 UIDefaults.LazyValue focusBorder = t -> 134 new BorderUIResource.LineBorderUIResource(getPrimary1()); 135 // .30 0 DDE8F3 white secondary2 136 java.util.List buttonGradient = Arrays.asList( 137 new Object[] {new Float(.3f), new Float(0f), 138 new ColorUIResource(0xDDE8F3), getWhite(), getSecondary2() }); 139 140 // Other possible properties that aren't defined: 141 // 142 // Used when generating the disabled Icons, provides the region to 143 // constrain grays to. 144 // Button.disabledGrayRange -> Object[] of Integers giving min/max 145 // InternalFrame.inactiveTitleGradient -> Gradient when the 146 // internal frame is inactive. 147 Color cccccc = new ColorUIResource(0xCCCCCC); 148 Color dadada = new ColorUIResource(0xDADADA); 149 Color c8ddf2 = new ColorUIResource(0xC8DDF2); 150 Object directoryIcon = getIconResource("icons/ocean/directory.gif"); 151 Object fileIcon = getIconResource("icons/ocean/file.gif"); 152 java.util.List sliderGradient = Arrays.asList(new Object[] { 153 new Float(.3f), new Float(.2f), 154 c8ddf2, getWhite(), new ColorUIResource(SECONDARY2) }); 155 156 Object[] defaults = new Object[] { 157 "Button.gradient", buttonGradient, 158 "Button.rollover", Boolean.TRUE, 159 "Button.toolBarBorderBackground", INACTIVE_CONTROL_TEXT_COLOR, 160 "Button.disabledToolBarBorderBackground", cccccc, 161 "Button.rolloverIconType", "ocean", 162 163 "CheckBox.rollover", Boolean.TRUE, 164 "CheckBox.gradient", buttonGradient, 165 166 "CheckBoxMenuItem.gradient", buttonGradient, 167 168 // home2 169 "FileChooser.homeFolderIcon", 170 getIconResource("icons/ocean/homeFolder.gif"), 171 // directory2 172 "FileChooser.newFolderIcon", | 116 } 117 } 118 } 119 120 /** 121 * Creates an instance of <code>OceanTheme</code> 122 */ 123 public OceanTheme() { 124 } 125 126 /** 127 * Add this theme's custom entries to the defaults table. 128 * 129 * @param table the defaults table, non-null 130 * @throws NullPointerException if {@code table} is {@code null} 131 */ 132 public void addCustomEntriesToTable(UIDefaults table) { 133 UIDefaults.LazyValue focusBorder = t -> 134 new BorderUIResource.LineBorderUIResource(getPrimary1()); 135 // .30 0 DDE8F3 white secondary2 136 java.util.List<?> buttonGradient = Arrays.asList( 137 new Object[] {new Float(.3f), new Float(0f), 138 new ColorUIResource(0xDDE8F3), getWhite(), getSecondary2() }); 139 140 // Other possible properties that aren't defined: 141 // 142 // Used when generating the disabled Icons, provides the region to 143 // constrain grays to. 144 // Button.disabledGrayRange -> Object[] of Integers giving min/max 145 // InternalFrame.inactiveTitleGradient -> Gradient when the 146 // internal frame is inactive. 147 Color cccccc = new ColorUIResource(0xCCCCCC); 148 Color dadada = new ColorUIResource(0xDADADA); 149 Color c8ddf2 = new ColorUIResource(0xC8DDF2); 150 Object directoryIcon = getIconResource("icons/ocean/directory.gif"); 151 Object fileIcon = getIconResource("icons/ocean/file.gif"); 152 java.util.List<?> sliderGradient = Arrays.asList(new Object[] { 153 new Float(.3f), new Float(.2f), 154 c8ddf2, getWhite(), new ColorUIResource(SECONDARY2) }); 155 156 Object[] defaults = new Object[] { 157 "Button.gradient", buttonGradient, 158 "Button.rollover", Boolean.TRUE, 159 "Button.toolBarBorderBackground", INACTIVE_CONTROL_TEXT_COLOR, 160 "Button.disabledToolBarBorderBackground", cccccc, 161 "Button.rolloverIconType", "ocean", 162 163 "CheckBox.rollover", Boolean.TRUE, 164 "CheckBox.gradient", buttonGradient, 165 166 "CheckBoxMenuItem.gradient", buttonGradient, 167 168 // home2 169 "FileChooser.homeFolderIcon", 170 getIconResource("icons/ocean/homeFolder.gif"), 171 // directory2 172 "FileChooser.newFolderIcon", |