Package com.formdev.flatlaf.extras
Class FlatUIDefaultsInspector
java.lang.Object
com.formdev.flatlaf.extras.FlatUIDefaultsInspector
A simple UI defaults inspector that shows a window with all UI defaults used
in current look and feel.
To use it in an application install it with:
FlatUIDefaultsInspector.install( "ctrl shift alt Y" );This can be done e.g. in the main() method and allows enabling (and disabling) the UI defaults inspector with the given keystroke.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
private static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JMenuItem
private JMenuItem
private JMenuItem
private Properties
private FlatTextField
private JLabel
private JPanel
private static JFrame
private static final int
private final PropertyChangeListener
private final PropertyChangeListener
private JPanel
private boolean
private JScrollPane
private JTable
private JPopupMenu
private JLabel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
copyKey()
private void
private void
copyToClipboard
(int column) private void
private JFrame
static JComponent
Creates a UI defaults inspector panel that can be embedded into any window.private void
delegateKey
(int keyCode, String actionKey) private static void
ensureOnScreen
(JFrame frame) private void
private Preferences
getPrefs()
private FlatUIDefaultsInspector.Item[]
static void
hide()
private void
static void
Installs a key listener into the application that allows enabling and disabling the UI inspector with the given keystroke (e.g.private void
private void
private Properties
private void
refresh()
private Color
resolveDerivedColor
(UIDefaults defaults, String key, Color color, Color[] pBaseColor) private void
saveWindowBounds
(JFrame frame) static void
show()
private void
private String
typeOfValue
(Object value) private static void
updateWindowTitle
(JFrame frame)
-
Field Details
-
KEY_MODIFIERS_MASK
private static final int KEY_MODIFIERS_MASK- See Also:
-
inspectorFrame
-
lafListener
-
lafDefaultsListener
-
refreshPending
private boolean refreshPending -
derivedColorKeys
-
panel
-
filterPanel
-
filterLabel
-
filterField
-
valueTypeLabel
-
valueTypeField
-
scrollPane
-
table
-
tablePopupMenu
-
copyKeyMenuItem
-
copyValueMenuItem
-
copyKeyAndValueMenuItem
-
-
Constructor Details
-
FlatUIDefaultsInspector
private FlatUIDefaultsInspector()
-
-
Method Details
-
install
Installs a key listener into the application that allows enabling and disabling the UI inspector with the given keystroke (e.g. "ctrl shift alt Y").- Parameters:
activationKeys
- a keystroke (e.g. "ctrl shift alt Y")
-
show
public static void show() -
hide
public static void hide() -
createInspectorPanel
Creates a UI defaults inspector panel that can be embedded into any window. -
createFrame
-
delegateKey
-
ensureOnScreen
-
lafChanged
-
lafDefaultsChanged
-
refresh
private void refresh() -
getUIDefaultsItems
-
resolveDerivedColor
-
loadDerivedColorKeys
-
updateWindowTitle
-
saveWindowBounds
-
getPrefs
-
filterChanged
private void filterChanged() -
typeOfValue
-
tableMousePressed
-
copyKey
private void copyKey() -
copyValue
private void copyValue() -
copyKeyAndValue
private void copyKeyAndValue() -
copyToClipboard
private void copyToClipboard(int column) -
initComponents
private void initComponents()
-