本文整理了Java中javax.swing.UIManager.setInstalledLookAndFeels()
方法的一些代码示例,展示了UIManager.setInstalledLookAndFeels()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIManager.setInstalledLookAndFeels()
方法的具体详情如下:
包路径:javax.swing.UIManager
类名称:UIManager
方法名:setInstalledLookAndFeels
暂无
代码示例来源:origin: mucommander/mucommander
/**
* Uninstalls the specified look and feel.
* @param selection look and feel to uninstall.
*/
private void uninstallLookAndFeel(UIManager.LookAndFeelInfo selection) {
UIManager.LookAndFeelInfo[] buffer; // New array of installed look and feels.
int bufferIndex; // Current index in buffer.
// Copies the content of lookAndFeels into buffer, skipping over the look and feel to uninstall.
buffer = new UIManager.LookAndFeelInfo[lookAndFeels.length - 1];
bufferIndex = 0;
for (UIManager.LookAndFeelInfo lookAndFeel : lookAndFeels) {
if (!selection.getClassName().equals(lookAndFeel.getClassName())) {
buffer[bufferIndex] = lookAndFeel;
bufferIndex++;
}
}
// Resets the list of installed look and feels.
UIManager.setInstalledLookAndFeels(lookAndFeels = buffer);
}
代码示例来源:origin: nroduit/Weasis
public static boolean installSubstanceLookAndFeels() {
try {
Class.forName(CLASSES[0]);
} catch (Exception e) {
return false;
}
List<LookAndFeelInfo> tmp = new ArrayList<>();
for (LookAndFeelInfo i : UIManager.getInstalledLookAndFeels()) {
tmp.add(new ReadableLookAndFeelInfo(i.getName(), i.getClassName()));
}
for (int i = 0; i < CLASSES.length; i++) {
tmp.add(new ReadableLookAndFeelInfo(NAMES[i], CLASSES[i]));
}
UIManager.setInstalledLookAndFeels(tmp.toArray(new LookAndFeelInfo[tmp.size()]));
return true;
}
内容来源于网络,如有侵权,请联系作者删除!