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


Java SubstanceLookAndFeel.setCurrentTheme方法代码示例

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


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

示例1: main

import org.jvnet.substance.SubstanceLookAndFeel; //导入方法依赖的package包/类
public static void main(String args[]) {
	try {
           UIManager.setLookAndFeel(new SubstanceLookAndFeel());
           JFrame.setDefaultLookAndFeelDecorated(true);
           JDialog.setDefaultLookAndFeelDecorated(true);
           SubstanceLookAndFeel.setCurrentTheme(new SubstanceTerracottaTheme());
         

         
         SubstanceLookAndFeel.setSkin(new OfficeBlue2007Skin());
         SubstanceLookAndFeel.setCurrentButtonShaper(new ClassicButtonShaper());
         SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBubblesWatermark());
         SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter());
           SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter());
           
       		
           //SubstanceLookAndFeel.setCurrentTitlePainter(new FlatTitePainter());
       } catch (Exception e) {
           System.err.println("Something went wrong!");
       }
	SeverUI server = new SeverUI();
	server.setVisible(true);
	server.start();
	
	
}
 
开发者ID:TeamProjectNJU,项目名称:Million-WordsGod-Dictionary,代码行数:27,代码来源:SeverUI.java

示例2: initialize

import org.jvnet.substance.SubstanceLookAndFeel; //导入方法依赖的package包/类
public void initialize() throws Exception {
    String skin = ObjectUtils.toString(config.get("UISkin")).trim();
    String theme = ObjectUtils.toString(config.get("UITheme")).trim();
    
    if(skin.equalsIgnoreCase("default")) //java default
        return;
    
    UIManager.setLookAndFeel(new SubstanceLookAndFeel());
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);
    
    if(StringUtils.isNotEmpty(theme))
        SubstanceLookAndFeel.setCurrentTheme(theme);
    else if(StringUtils.isNotEmpty(skin))
        SubstanceLookAndFeel.setSkin((SubstanceSkin)newInstance(skin));
    String watermark = ObjectUtils.toString(config.get("UIWatermark")).trim();
    if(StringUtils.isNotEmpty(watermark))
        SubstanceLookAndFeel.setCurrentWatermark((SubstanceWatermark)newInstance(watermark));
    String buttonShaper = ObjectUtils.toString(config.get("UIButtonShaper")).trim();
    if(StringUtils.isNotEmpty(buttonShaper))
        SubstanceLookAndFeel.setCurrentButtonShaper((SubstanceButtonShaper)newInstance(buttonShaper));
    String borderPainter = ObjectUtils.toString(config.get("UIBorderPainter")).trim();
    if(StringUtils.isNotEmpty(borderPainter))
        SubstanceLookAndFeel.setCurrentBorderPainter((SubstanceBorderPainter)newInstance(borderPainter));
    String gradientPainter = ObjectUtils.toString(config.get("UIGradientPainter")).trim();
    if(StringUtils.isNotEmpty(gradientPainter))
        SubstanceLookAndFeel.setCurrentGradientPainter((SubstanceGradientPainter)newInstance(gradientPainter));
}
 
开发者ID:hulang1024,项目名称:PTEAssistant,代码行数:29,代码来源:SkinManager.java

示例3: setLookAndFeel

import org.jvnet.substance.SubstanceLookAndFeel; //导入方法依赖的package包/类
public static void setLookAndFeel(String theme) {
	try {			
		// Use Business as base Look And Feel
		UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessLookAndFeel");
		
		if (themes.containsKey(theme))
			SubstanceLookAndFeel.setCurrentTheme(themes.get(theme));
		else
			SubstanceLookAndFeel.setCurrentTheme(themes.get(DEFAULT_THEME));

		SubstanceLookAndFeel.setCurrentWatermark(new SubstanceStripeWatermark());
		UIManager.put(SubstanceLookAndFeel.NO_EXTRA_ELEMENTS,Boolean.TRUE);
		JFrame.setDefaultLookAndFeelDecorated(!Kernel.getInstance().state.isMultipleWindow());
	} catch (Exception e) {
	}
}
 
开发者ID:michellemulkey,项目名称:aTunes,代码行数:17,代码来源:LookAndFeelSelector.java

示例4: main

import org.jvnet.substance.SubstanceLookAndFeel; //导入方法依赖的package包/类
public static void main(String[] args){
	

	 
	try {
           UIManager.setLookAndFeel(new SubstanceLookAndFeel());
           JFrame.setDefaultLookAndFeelDecorated(true);
           JDialog.setDefaultLookAndFeelDecorated(true);
           SubstanceLookAndFeel.setCurrentTheme(new SubstanceTerracottaTheme());
         

         
         SubstanceLookAndFeel.setSkin(new OfficeBlue2007Skin());
         SubstanceLookAndFeel.setCurrentButtonShaper(new ClassicButtonShaper());
         SubstanceLookAndFeel.setCurrentWatermark(new SubstanceBubblesWatermark());
         SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter());
           SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter());
           //SubstanceLookAndFeel.setCurrentTitlePainter(new FlatTitePainter());
       } catch (Exception e) {
           System.err.println("Something went wrong!");
       }
	
	
	UI frame=new UI();
	frame.setTitle("DictPro");
	frame.setSize(600,500);
	frame.setLocationRelativeTo(null);
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	frame.setVisible(true);
}
 
开发者ID:TeamProjectNJU,项目名称:Million-WordsGod-Dictionary,代码行数:31,代码来源:UI.java


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