|
1 | 1 | /*
|
2 |
| - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
25 | 25 |
|
26 | 26 | package javax.swing.plaf.metal;
|
27 | 27 |
|
28 |
| -import java.awt.*; |
| 28 | +import java.awt.Color; |
| 29 | +import java.awt.Component; |
| 30 | +import java.awt.Container; |
| 31 | +import java.awt.Frame; |
| 32 | +import java.awt.Insets; |
| 33 | +import java.awt.Toolkit; |
| 34 | +import java.awt.Window; |
29 | 35 | import java.beans.PropertyChangeEvent;
|
30 | 36 | import java.beans.PropertyChangeListener;
|
31 |
| -import javax.swing.plaf.*; |
32 |
| -import javax.swing.*; |
33 |
| -import javax.swing.plaf.basic.*; |
34 |
| -import javax.swing.text.DefaultEditorKit; |
35 |
| - |
36 |
| -import java.awt.Color; |
37 | 37 | import java.lang.ref.ReferenceQueue;
|
38 | 38 | import java.lang.ref.WeakReference;
|
39 |
| - |
40 | 39 | import java.security.AccessController;
|
41 | 40 |
|
42 |
| -import sun.awt.*; |
| 41 | +import javax.swing.ButtonModel; |
| 42 | +import javax.swing.DefaultButtonModel; |
| 43 | +import javax.swing.Icon; |
| 44 | +import javax.swing.ImageIcon; |
| 45 | +import javax.swing.JComponent; |
| 46 | +import javax.swing.JDialog; |
| 47 | +import javax.swing.JFrame; |
| 48 | +import javax.swing.JRootPane; |
| 49 | +import javax.swing.JTextField; |
| 50 | +import javax.swing.JToggleButton; |
| 51 | +import javax.swing.LayoutStyle; |
| 52 | +import javax.swing.LookAndFeel; |
| 53 | +import javax.swing.SwingConstants; |
| 54 | +import javax.swing.SwingUtilities; |
| 55 | +import javax.swing.UIDefaults; |
| 56 | +import javax.swing.UIManager; |
| 57 | +import javax.swing.plaf.BorderUIResource; |
| 58 | +import javax.swing.plaf.ColorUIResource; |
| 59 | +import javax.swing.plaf.FontUIResource; |
| 60 | +import javax.swing.plaf.InsetsUIResource; |
| 61 | +import javax.swing.plaf.UIResource; |
| 62 | +import javax.swing.plaf.basic.BasicLookAndFeel; |
| 63 | +import javax.swing.text.DefaultEditorKit; |
| 64 | + |
| 65 | +import sun.awt.AppContext; |
| 66 | +import sun.awt.OSInfo; |
| 67 | +import sun.awt.SunToolkit; |
43 | 68 | import sun.security.action.GetPropertyAction;
|
44 | 69 | import sun.swing.DefaultLayoutStyle;
|
45 |
| -import static javax.swing.UIDefaults.LazyValue; |
46 |
| - |
47 | 70 | import sun.swing.SwingAccessor;
|
48 | 71 | import sun.swing.SwingUtilities2;
|
49 | 72 |
|
| 73 | +import static javax.swing.UIDefaults.LazyValue; |
| 74 | + |
50 | 75 | /**
|
51 | 76 | * The Java Look and Feel, otherwise known as Metal.
|
52 | 77 | * <p>
|
@@ -782,6 +807,8 @@ protected void initComponentDefaults(UIDefaults table) {
|
782 | 807 | "SPACE", "pressed",
|
783 | 808 | "released SPACE", "released"
|
784 | 809 | }),
|
| 810 | + // Button default margin is (2, 14, 2, 14), defined in |
| 811 | + // BasicLookAndFeel via "Button.margin" UI property. |
785 | 812 |
|
786 | 813 | "CheckBox.disabledText", inactiveControlTextColor,
|
787 | 814 | "Checkbox.select", controlShadow,
|
|
0 commit comments