码迷,mamicode.com
首页 > 编程语言 > 详细

Substance风格实例大全javaswing皮肤风格大全(原)

时间:2014-06-07 10:27:56      阅读:436      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

转载请注明来路:http://www.cnblogs.com/langtianya/

下图是所支持的设置

bubuko.com,布布扣

下面把上面的每一个选项的子选项进行试验

substance皮肤

AutumnSkin

bubuko.com,布布扣

BusinessSkin

bubuko.com,布布扣

BusinessBlackSteelSkin

bubuko.com,布布扣

BusinessBlueSteelSkin

bubuko.com,布布扣

 

ChallengerDeepSkin

bubuko.com,布布扣

CremeSkin

bubuko.com,布布扣

EmeraldDuskSkin

bubuko.com,布布扣

FieldOfWheatSkin

bubuko.com,布布扣

FindingNemoSkin

bubuko.com,布布扣

GreenMagicSkin

bubuko.com,布布扣

MagmaSkin

bubuko.com,布布扣

MangoSkin

bubuko.com,布布扣

MistAquaSkin

bubuko.com,布布扣

MistSilverSkin

bubuko.com,布布扣

ModerateSkin

bubuko.com,布布扣

NebulaBrickWallSkin

bubuko.com,布布扣

 

NebulaBrickWallSkin

bubuko.com,布布扣

OfficeBlue2007Skin

bubuko.com,布布扣

OfficeSilver2007Skin

bubuko.com,布布扣

还有几个也没什么特别的,也就不罗列了

上面的是皮肤实例,还可以结合主题,水印等进行排列组合的搭配,我就不一一写出来了

主题:

bubuko.com,布布扣

水印:

bubuko.com,布布扣

.........

组合1:主题:明亮-aqua, 水印:Stripe, 按钮造型:standard, title:mattebubuko.com,布布扣

组合2:主题:明亮-bottle green, 水印:Stripe, 按钮造型:standard, title:matte

bubuko.com,布布扣

组合2效果的核心代码

bubuko.com,布布扣
  try {
//设置外观  
UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel()); JFrame.setDefaultLookAndFeelDecorated(true); //设置主题 SubstanceLookAndFeel.setCurrentTheme(new SubstanceBottleGreenTheme()); //设置按钮外观 SubstanceLookAndFeel.setCurrentButtonShaper(new StandardButtonShaper()); //设置水印 SubstanceLookAndFeel.setCurrentWatermark(new SubstanceStripeWatermark()); //设置边框 SubstanceLookAndFeel.setCurrentBorderPainter(new StandardBorderPainter()); //设置渐变渲染 SubstanceLookAndFeel.setCurrentGradientPainter(new StandardGradientPainter()); //设置标题 SubstanceLookAndFeel.setCurrentTitlePainter(new MatteHeaderPainter()); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); }
bubuko.com,布布扣

 

bubuko.com,布布扣

自定义水印代码

bubuko.com,布布扣
    //5.2版本
                    //http://www.blogjava.net/gml520/archive/2009/05/23/277603.html
               UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceOfficeBlue2007LookAndFeel");
                    SubstanceImageWatermark watermark = new SubstanceImageWatermark("001.jpg");
                    System.out.println(watermark);
                    watermark.setKind(SubstanceConstants.ImageWatermarkKind.SCREEN_CENTER_SCALE);
                  SubstanceSkin skin = new SaharaSkin().withWatermark(watermark); //初始化有水印的皮肤

                    UIManager.setLookAndFeel(new SubstanceOfficeBlue2007LookAndFeel());
                    SubstanceLookAndFeel.setSkin(skin); //设置皮肤
bubuko.com,布布扣

 

Substance风格实例大全javaswing皮肤风格大全(原),布布扣,bubuko.com

Substance风格实例大全javaswing皮肤风格大全(原)

标签:c   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/langtianya/p/3770292.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!