转载请注明来路:http://www.cnblogs.com/langtianya/
下图是所支持的设置
下面把上面的每一个选项的子选项进行试验
substance皮肤:
AutumnSkin
BusinessSkin
BusinessBlackSteelSkin
BusinessBlueSteelSkin
ChallengerDeepSkin
CremeSkin
EmeraldDuskSkin
FieldOfWheatSkin
FindingNemoSkin
GreenMagicSkin
MagmaSkin
MangoSkin
MistAquaSkin
MistSilverSkin
ModerateSkin
NebulaBrickWallSkin
NebulaBrickWallSkin
OfficeBlue2007Skin
OfficeSilver2007Skin
还有几个也没什么特别的,也就不罗列了
上面的是皮肤实例,还可以结合主题,水印等进行排列组合的搭配,我就不一一写出来了
主题:
水印:
.........
组合1:主题:明亮-aqua, 水印:Stripe, 按钮造型:standard, title:matte
组合2:主题:明亮-bottle green, 水印:Stripe, 按钮造型:standard, title:matte
组合2效果的核心代码
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(); }
自定义水印代码
//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); //设置皮肤