mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
UI inspector: show JMenuBar margins
This commit is contained in:
@@ -30,6 +30,7 @@ import java.awt.event.MouseMotionAdapter;
|
||||
import java.lang.reflect.Field;
|
||||
import javax.swing.AbstractButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JRootPane;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.JToolTip;
|
||||
@@ -193,10 +194,12 @@ public class FlatInspector
|
||||
Insets margin = null;
|
||||
if( c instanceof AbstractButton )
|
||||
margin = ((AbstractButton) c).getMargin();
|
||||
else if( c instanceof JToolBar )
|
||||
margin = ((JToolBar) c).getMargin();
|
||||
else if( c instanceof JTextComponent )
|
||||
margin = ((JTextComponent) c).getMargin();
|
||||
else if( c instanceof JMenuBar )
|
||||
margin = ((JMenuBar) c).getMargin();
|
||||
else if( c instanceof JToolBar )
|
||||
margin = ((JToolBar) c).getMargin();
|
||||
|
||||
if( margin != null )
|
||||
text += "Margin: " + margin.top + ',' + margin.left + ',' + margin.bottom + ',' + margin.right + '\n';
|
||||
|
||||
Reference in New Issue
Block a user