本文整理汇总了Java中org.jvnet.substance.SubstanceLookAndFeel.setSkin方法的典型用法代码示例。如果您正苦于以下问题:Java SubstanceLookAndFeel.setSkin方法的具体用法?Java SubstanceLookAndFeel.setSkin怎么用?Java SubstanceLookAndFeel.setSkin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jvnet.substance.SubstanceLookAndFeel
的用法示例。
在下文中一共展示了SubstanceLookAndFeel.setSkin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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));
}
示例3: 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);
}