1 30 31 package com.jgoodies.looks.tests; 32 33 import javax.swing.UIManager ; 34 35 import junit.framework.TestCase; 36 37 import com.jgoodies.looks.LookUtils; 38 import com.jgoodies.looks.Options; 39 40 46 public final class OptionsTest extends TestCase { 47 48 49 52 public void testTabIconsEnablement() { 53 Boolean systemDefault = LookUtils.getBooleanSystemProperty( 54 Options.TAB_ICONS_ENABLED_KEY, 55 "Test: tab icons"); 56 57 if (systemDefault != null) { 58 assertEquals("Tab icon enablement honors system property.", 59 systemDefault.booleanValue(), 60 Options.isTabIconsEnabled()); 61 return; 62 } 63 UIManager.put(Options.TAB_ICONS_ENABLED_KEY, null); 64 assertTrue("Tab icons are enabled by default.", Options.isTabIconsEnabled()); 65 66 Options.setTabIconsEnabled(true); 67 assertTrue("Tab icons are enabled.", Options.isTabIconsEnabled()); 68 69 Options.setTabIconsEnabled(false); 70 assertFalse("Tab icons are disabled.", Options.isTabIconsEnabled()); 71 } 72 73 74 } 75 | Popular Tags |