当前位置: 首页>>代码示例>>Java>>正文


Java Options.setDefaultIconSize方法代码示例

本文整理汇总了Java中com.jgoodies.looks.Options.setDefaultIconSize方法的典型用法代码示例。如果您正苦于以下问题:Java Options.setDefaultIconSize方法的具体用法?Java Options.setDefaultIconSize怎么用?Java Options.setDefaultIconSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jgoodies.looks.Options的用法示例。


在下文中一共展示了Options.setDefaultIconSize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureUI

import com.jgoodies.looks.Options; //导入方法依赖的package包/类
/**
 * Configures the UI; tries to set the system look on Mac,
 * <code>WindowsLookAndFeel</code> on general Windows, and
 * <code>Plastic3DLookAndFeel</code> on Windows XP and all other OS.<p>
 *
 * The JGoodies Swing Suite's <code>ApplicationStarter</code>,
 * <code>ExtUIManager</code>, and <code>LookChoiceStrategies</code>
 * classes provide a much more fine grained algorithm to choose and
 * restore a look and theme.
 */
private void configureUI ()
{
    UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
    //Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
    Options.setDefaultIconSize(new Dimension(18, 18));

    String lafName
            = LookUtils.IS_OS_WINDOWS_XP
                    ? Options.getCrossPlatformLookAndFeelClassName()
                    : Options.getSystemLookAndFeelClassName();

    try {
        UIManager.setLookAndFeel(lafName);
    } catch (Exception e) {
        System.err.println("Can't set look & feel:" + e);
    }
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:28,代码来源:Tiny.java

示例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(System.getProperty("os.name").toLowerCase().startsWith("windows")
				? new WindowsLookAndFeel() : new PlasticXPLookAndFeel());

		_instance = new MainFrame();
	} catch (Exception e) {
		System.err.println(e);
	}
}
 
开发者ID:clidev,项目名称:spike.x,代码行数:19,代码来源:MainFrame.java

示例3: configureUI

import com.jgoodies.looks.Options; //导入方法依赖的package包/类
/**
 * Configures the UI; tries to set the system look on Mac, 
 * <code>WindowsLookAndFeel</code> on general Windows, and
 * <code>Plastic3DLookAndFeel</code> on Windows XP and all other OS.<p>
 * 
 * The JGoodies Swing Suite's <code>ApplicationStarter</code>,
 * <code>ExtUIManager</code>, and <code>LookChoiceStrategies</code>
 * classes provide a much more fine grained algorithm to choose and
 * restore a look and theme.
 */
private void configureUI() {
    UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
    //Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
    Options.setDefaultIconSize(new Dimension(18, 18));

    String lafName =
        LookUtils.IS_OS_WINDOWS_XP
            ? Options.getCrossPlatformLookAndFeelClassName()
            : Options.getSystemLookAndFeelClassName();

    try {
        UIManager.setLookAndFeel(lafName);
    } catch (Exception e) {
        System.err.println("Can't set look & feel:" + e);
    }
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:27,代码来源:Tiny.java

示例4: 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);
	}
}
 
开发者ID:p4553d,项目名称:carPirate,代码行数:17,代码来源:MainFrame.java

示例5: configureUI

import com.jgoodies.looks.Options; //导入方法依赖的package包/类
private static void configureUI(String plafURI) {
	UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
	// Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
	Options.setDefaultIconSize(new Dimension(18, 18));
	try {

		UIManager.setLookAndFeel(plafURI);
	} catch (Exception e) {
		System.err.println("Can't set look & feel:" + e);
	}
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:12,代码来源:MMQueues.java

示例6: 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);
	}
}
 
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:31,代码来源:IBMExtractGUI2.java

示例7: setDefaultIconSize

import com.jgoodies.looks.Options; //导入方法依赖的package包/类
/**
 * @param size default Dimension for the icons.
 * @see com.jgoodies.looks.Options#setDefaultIconSize(java.awt.Dimension)
 */
public void setDefaultIconSize(Dimension size) {
    Options.setDefaultIconSize(size);
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:8,代码来源:JGoodiesLooksConfigurer.java


注:本文中的com.jgoodies.looks.Options.setDefaultIconSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。