下面列出了javax.swing.LookAndFeel#getDefaults ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Use Aqua settings for some properties if we're on a Mac.
*
* @param d the UI defaults map.
*/
private void defineAquaSettings(UIDefaults d) {
try {
// Instantiate Aqua but don't install it.
Class<?> lnfClass = Class.forName(UIManager.getSystemLookAndFeelClassName(), true,
Thread.currentThread().getContextClassLoader());
LookAndFeel aqua = (LookAndFeel) lnfClass.newInstance();
UIDefaults aquaDefaults = aqua.getDefaults();
// Use Aqua for any menu UI classes.
d.put("MenuBarUI", aquaDefaults.get("MenuBarUI"));
d.put("MenuUI", aquaDefaults.get("MenuUI"));
} catch (Exception e) {
// TODO Should we do something with this exception?
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
static void initUIDefaults() {
try {
// Load Defaults from MotifLookAndFeel
// This dummy load is necessary to get SystemColor initialized. !!!!!!
Color c = SystemColor.text;
LookAndFeel lnf = new XAWTLookAndFeel();
uidefaults = lnf.getDefaults();
}
catch (Exception e)
{
e.printStackTrace();
}
}
private UIDefaultsDump( LookAndFeel lookAndFeel ) {
this.lookAndFeel = lookAndFeel;
this.defaults = lookAndFeel.getDefaults();
}