1 30 31 package com.jgoodies.looks.demo; 32 33 import javax.swing.LookAndFeel ; 34 35 import com.jgoodies.looks.BorderStyle; 36 import com.jgoodies.looks.FontSizeHints; 37 import com.jgoodies.looks.HeaderStyle; 38 import com.jgoodies.looks.plastic.PlasticLookAndFeel; 39 import com.jgoodies.looks.plastic.PlasticTheme; 40 import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; 41 42 43 55 public final class Settings { 56 57 private LookAndFeel selectedLookAndFeel; 58 59 private PlasticTheme selectedTheme; 60 61 private Boolean useSystemFonts; 62 63 private FontSizeHints fontSizeHints; 64 65 private boolean useNarrowButtons; 66 67 private boolean tabIconsEnabled; 68 69 private Boolean popupDropShadowEnabled; 70 71 private String plasticTabStyle; 72 73 private boolean plasticHighContrastFocusEnabled; 74 75 private HeaderStyle menuBarHeaderStyle; 76 77 private BorderStyle menuBarPlasticBorderStyle; 78 79 private BorderStyle menuBarWindowsBorderStyle; 80 81 private Boolean menuBar3DHint; 82 83 private HeaderStyle toolBarHeaderStyle; 84 85 private BorderStyle toolBarPlasticBorderStyle; 86 87 private BorderStyle toolBarWindowsBorderStyle; 88 89 private Boolean toolBar3DHint; 90 91 92 94 private Settings() { 95 } 97 98 public static Settings createDefault() { 99 Settings settings = new Settings(); 100 settings.setSelectedLookAndFeel(new PlasticXPLookAndFeel()); 101 settings.setSelectedTheme(PlasticLookAndFeel.createMyDefaultTheme()); 102 settings.setUseSystemFonts(Boolean.TRUE); 103 settings.setFontSizeHints(FontSizeHints.MIXED); 104 settings.setUseNarrowButtons(false); 105 settings.setTabIconsEnabled(true); 106 settings.setPlasticTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE); 107 settings.setPlasticHighContrastFocusEnabled(false); 108 settings.setMenuBarHeaderStyle(null); 109 settings.setMenuBarPlasticBorderStyle(null); 110 settings.setMenuBarWindowsBorderStyle(null); 111 settings.setMenuBar3DHint(null); 112 settings.setToolBarHeaderStyle(null); 113 settings.setToolBarPlasticBorderStyle(null); 114 settings.setToolBarWindowsBorderStyle(null); 115 settings.setToolBar3DHint(null); 116 return settings; 117 } 118 119 120 122 public FontSizeHints getFontSizeHints() { 123 return fontSizeHints; 124 } 125 126 public void setFontSizeHints(FontSizeHints fontSizeHints) { 127 this.fontSizeHints = fontSizeHints; 128 } 129 130 public Boolean getMenuBar3DHint() { 131 return menuBar3DHint; 132 } 133 134 public void setMenuBar3DHint(Boolean menuBar3DHint) { 135 this.menuBar3DHint = menuBar3DHint; 136 } 137 138 public HeaderStyle getMenuBarHeaderStyle() { 139 return menuBarHeaderStyle; 140 } 141 142 public void setMenuBarHeaderStyle(HeaderStyle menuBarHeaderStyle) { 143 this.menuBarHeaderStyle = menuBarHeaderStyle; 144 } 145 146 public BorderStyle getMenuBarPlasticBorderStyle() { 147 return menuBarPlasticBorderStyle; 148 } 149 150 public void setMenuBarPlasticBorderStyle(BorderStyle menuBarPlasticBorderStyle) { 151 this.menuBarPlasticBorderStyle = menuBarPlasticBorderStyle; 152 } 153 154 public BorderStyle getMenuBarWindowsBorderStyle() { 155 return menuBarWindowsBorderStyle; 156 } 157 158 public void setMenuBarWindowsBorderStyle(BorderStyle menuBarWindowsBorderStyle) { 159 this.menuBarWindowsBorderStyle = menuBarWindowsBorderStyle; 160 } 161 162 public Boolean isPopupDropShadowEnabled() { 163 return popupDropShadowEnabled; 164 } 165 166 public void setPopupDropShadowEnabled(Boolean popupDropShadowEnabled) { 167 this.popupDropShadowEnabled = popupDropShadowEnabled; 168 } 169 170 public boolean isPlasticHighContrastFocusEnabled() { 171 return plasticHighContrastFocusEnabled; 172 } 173 174 public void setPlasticHighContrastFocusEnabled(boolean plasticHighContrastFocusEnabled) { 175 this.plasticHighContrastFocusEnabled = plasticHighContrastFocusEnabled; 176 } 177 178 public String getPlasticTabStyle() { 179 return plasticTabStyle; 180 } 181 182 public void setPlasticTabStyle(String plasticTabStyle) { 183 this.plasticTabStyle = plasticTabStyle; 184 } 185 186 public LookAndFeel getSelectedLookAndFeel() { 187 return selectedLookAndFeel; 188 } 189 190 public void setSelectedLookAndFeel(LookAndFeel selectedLookAndFeel) { 191 this.selectedLookAndFeel = selectedLookAndFeel; 192 } 193 194 public PlasticTheme getSelectedTheme() { 195 return selectedTheme; 196 } 197 198 public void setSelectedTheme(PlasticTheme selectedTheme) { 199 this.selectedTheme = selectedTheme; 200 } 201 202 public boolean isTabIconsEnabled() { 203 return tabIconsEnabled; 204 } 205 206 public void setTabIconsEnabled(boolean tabIconsEnabled) { 207 this.tabIconsEnabled = tabIconsEnabled; 208 } 209 210 public Boolean getToolBar3DHint() { 211 return toolBar3DHint; 212 } 213 214 public void setToolBar3DHint(Boolean toolBar3DHint) { 215 this.toolBar3DHint = toolBar3DHint; 216 } 217 218 public HeaderStyle getToolBarHeaderStyle() { 219 return toolBarHeaderStyle; 220 } 221 222 public void setToolBarHeaderStyle(HeaderStyle toolBarHeaderStyle) { 223 this.toolBarHeaderStyle = toolBarHeaderStyle; 224 } 225 226 public BorderStyle getToolBarPlasticBorderStyle() { 227 return toolBarPlasticBorderStyle; 228 } 229 230 public void setToolBarPlasticBorderStyle(BorderStyle toolBarPlasticBorderStyle) { 231 this.toolBarPlasticBorderStyle = toolBarPlasticBorderStyle; 232 } 233 234 public BorderStyle getToolBarWindowsBorderStyle() { 235 return toolBarWindowsBorderStyle; 236 } 237 238 public void setToolBarWindowsBorderStyle(BorderStyle toolBarWindowsBorderStyle) { 239 this.toolBarWindowsBorderStyle = toolBarWindowsBorderStyle; 240 } 241 242 public boolean isUseNarrowButtons() { 243 return useNarrowButtons; 244 } 245 246 public void setUseNarrowButtons(boolean useNarrowButtons) { 247 this.useNarrowButtons = useNarrowButtons; 248 } 249 250 public Boolean isUseSystemFonts() { 251 return useSystemFonts; 252 } 253 254 public void setUseSystemFonts(Boolean useSystemFonts) { 255 this.useSystemFonts = useSystemFonts; 256 } 257 258 } | Popular Tags |