本文整理汇总了Java中com.jgoodies.looks.Options.setUseNarrowButtons方法的典型用法代码示例。如果您正苦于以下问题:Java Options.setUseNarrowButtons方法的具体用法?Java Options.setUseNarrowButtons怎么用?Java Options.setUseNarrowButtons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jgoodies.looks.Options
的用法示例。
在下文中一共展示了Options.setUseNarrowButtons方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createInstance
import com.jgoodies.looks.Options; //导入方法依赖的package包/类
public static void createInstance() {
try {
Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground","true");
// JGoodies
Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
Options.setUseNarrowButtons(false);
Options.setPopupDropShadowEnabled(true);
UIManager.setLookAndFeel(System.getProperty("os.name").toLowerCase().startsWith("windows")
? new WindowsLookAndFeel() : new PlasticXPLookAndFeel());
_instance = new MainFrame();
} catch (Exception e) {
System.err.println(e);
}
}
示例2: createInstance
import com.jgoodies.looks.Options; //导入方法依赖的package包/类
public static void createInstance() {
try {
Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground","true");
// JGoodies
Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
Options.setUseNarrowButtons(false);
Options.setPopupDropShadowEnabled(true);
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
_instance = new MainFrame();
} catch (Exception e) {
System.err.println(e);
}
}
示例3: configureUI
import com.jgoodies.looks.Options; //导入方法依赖的package包/类
private void configureUI() {
Options.setDefaultIconSize(new Dimension(18, 18));
Options.setUseNarrowButtons(this.settings.isUseNarrowButtons());
Options.setTabIconsEnabled(this.settings.isTabIconsEnabled());
UIManager.put("jgoodies.popupDropShadowEnabled", this.settings
.isPopupDropShadowEnabled());
LookAndFeel selectedLaf = this.settings.getSelectedLookAndFeel();
if ((selectedLaf instanceof PlasticLookAndFeel)) {
PlasticLookAndFeel
.setPlasticTheme(this.settings.getSelectedTheme());
PlasticLookAndFeel.setTabStyle(this.settings.getPlasticTabStyle());
PlasticLookAndFeel.setHighContrastFocusColorsEnabled(this.settings
.isPlasticHighContrastFocusEnabled());
} else if (selectedLaf.getClass() == MetalLookAndFeel.class) {
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
}
JRadioButton radio = new JRadioButton();
radio.getUI().uninstallUI(radio);
JCheckBox checkBox = new JCheckBox();
checkBox.getUI().uninstallUI(checkBox);
try {
UIManager.setLookAndFeel(selectedLaf);
} catch (Exception e) {
System.out.println("Can't change L&F: " + e);
}
}
示例4: initLookAndFeel
import com.jgoodies.looks.Options; //导入方法依赖的package包/类
private void initLookAndFeel()
{
String osName = System.getProperty( "os.name" ).toUpperCase();
// set to use swing anti alias text only for JVM <= 1.5
System.setProperty( "swing.aatext", "true" );
// set default swing bold to false, only for JVM 1.5 or above
UIManager.put( "swing.boldMetal", Boolean.FALSE );
// set LaF
LookAndFeel lnf = UIManager.getLookAndFeel();
if( lnf != null && lnf.getID().equalsIgnoreCase( "Metal" ) )
{
final String lnfClassName;
if( osName.startsWith( "MAC" ) )
{
System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "Envisage" ); //TODO i18n
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
lnfClassName = UIManager.getSystemLookAndFeelClassName();
}
else if( osName.startsWith( "WINDOWS" ) )
{
UIManager.put( "ClassLoader", LookUtils.class.getClassLoader() );
lnfClassName = Options.getSystemLookAndFeelClassName();
Options.setUseNarrowButtons( false );
}
else
{
UIManager.put( "ClassLoader", LookUtils.class.getClassLoader() );
lnfClassName = Options.getCrossPlatformLookAndFeelClassName();
PlasticLookAndFeel.setTabStyle( PlasticLookAndFeel.TAB_STYLE_METAL_VALUE );
PlasticLookAndFeel.setPlasticTheme( new ExperienceBlue() );
Options.setUseNarrowButtons( false );
//PlasticLookAndFeel.setMyCurrentTheme(new ExperienceBlueDefaultFont()); // for CJK Font
}
if( lnfClassName != null )
{
try
{
UIManager.setLookAndFeel( lnfClassName );
}
catch( ClassNotFoundException | IllegalAccessException | InstantiationException |
UnsupportedLookAndFeelException ex )
{
System.err.println( "Unable to set LookAndFeel, use default LookAndFeel.\n" + ex.getMessage() );
}
}
}
}
示例5: setUseNarrowButtons
import com.jgoodies.looks.Options; //导入方法依赖的package包/类
/**
* @param enabled set to <code>true</code> if narrow buttons should be used.
* @see com.jgoodies.looks.Options#setUseNarrowButtons(boolean)
*/
public void setUseNarrowButtons(boolean enabled) {
Options.setUseNarrowButtons(enabled);
}