Skip to content

Commit

Permalink
Notes in both LAFs
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonGuy committed Aug 16, 2024
1 parent e590b8d commit a16b29b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,8 @@ public Object createValue(UIDefaults table) {
"Button.highlight", controlLtHighlight,
"Button.border", buttonBorder,
"Button.margin", new InsetsUIResource(2, 14, 2, 14),
// margin is (2, 14, 2, 14) which is vastly larger in horizontal
// values when compared to other default LookAndFeels that do not
// rely on these values
// The above margin has vastly larger horizontal values when
// compared to other look and feels that don't rely on these values
"Button.textIconGap", 4,
"Button.textShiftOffset", zero,
"Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,53 @@

package javax.swing.plaf.metal;

import java.awt.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Frame;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.Window;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.plaf.*;
import javax.swing.*;
import javax.swing.plaf.basic.*;
import javax.swing.text.DefaultEditorKit;

import java.awt.Color;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;

import java.security.AccessController;

import sun.awt.*;
import javax.swing.ButtonModel;
import javax.swing.DefaultButtonModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JRootPane;
import javax.swing.JTextField;
import javax.swing.JToggleButton;
import javax.swing.LayoutStyle;
import javax.swing.LookAndFeel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
import javax.swing.text.DefaultEditorKit;

import sun.awt.AppContext;
import sun.awt.OSInfo;
import sun.awt.SunToolkit;
import sun.security.action.GetPropertyAction;
import sun.swing.DefaultLayoutStyle;
import static javax.swing.UIDefaults.LazyValue;

import sun.swing.SwingAccessor;
import sun.swing.SwingUtilities2;

import static javax.swing.UIDefaults.LazyValue;

/**
* The Java Look and Feel, otherwise known as Metal.
* <p>
Expand Down Expand Up @@ -782,6 +807,8 @@ protected void initComponentDefaults(UIDefaults table) {
"SPACE", "pressed",
"released SPACE", "released"
}),
// Button default margin is (2, 14, 2, 14), defined in
// BasicLookAndFeel via "Button.margin" UI property.

"CheckBox.disabledText", inactiveControlTextColor,
"Checkbox.select", controlShadow,
Expand Down

0 comments on commit a16b29b

Please sign in to comment.