Class FlatUIDefaultsInspector

java.lang.Object
com.formdev.flatlaf.extras.FlatUIDefaultsInspector

public class FlatUIDefaultsInspector extends Object
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.
  • Field Details

    • KEY_MODIFIERS_MASK

      private static final int KEY_MODIFIERS_MASK
      See Also:
    • inspectorFrame

      private static JFrame inspectorFrame
    • lafListener

      private final PropertyChangeListener lafListener
    • lafDefaultsListener

      private final PropertyChangeListener lafDefaultsListener
    • refreshPending

      private boolean refreshPending
    • derivedColorKeys

      private Properties derivedColorKeys
    • panel

      private JPanel panel
    • filterPanel

      private JPanel filterPanel
    • filterLabel

      private JLabel filterLabel
    • filterField

      private FlatTextField filterField
    • valueTypeLabel

      private JLabel valueTypeLabel
    • valueTypeField

      private JComboBox<String> valueTypeField
    • scrollPane

      private JScrollPane scrollPane
    • table

      private JTable table
    • tablePopupMenu

      private JPopupMenu tablePopupMenu
    • copyKeyMenuItem

      private JMenuItem copyKeyMenuItem
    • copyValueMenuItem

      private JMenuItem copyValueMenuItem
    • copyKeyAndValueMenuItem

      private JMenuItem copyKeyAndValueMenuItem
  • Constructor Details

    • FlatUIDefaultsInspector

      private FlatUIDefaultsInspector()
  • Method Details

    • install

      public static void install(String activationKeys)
      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

      public static JComponent createInspectorPanel()
      Creates a UI defaults inspector panel that can be embedded into any window.
    • createFrame

      private JFrame createFrame()
    • delegateKey

      private void delegateKey(int keyCode, String actionKey)
    • ensureOnScreen

      private static void ensureOnScreen(JFrame frame)
    • lafChanged

      private void lafChanged(PropertyChangeEvent e)
    • lafDefaultsChanged

      private void lafDefaultsChanged(PropertyChangeEvent e)
    • refresh

      private void refresh()
    • getUIDefaultsItems

      private FlatUIDefaultsInspector.Item[] getUIDefaultsItems()
    • resolveDerivedColor

      private Color resolveDerivedColor(UIDefaults defaults, String key, Color color, Color[] pBaseColor)
    • loadDerivedColorKeys

      private Properties loadDerivedColorKeys()
    • updateWindowTitle

      private static void updateWindowTitle(JFrame frame)
    • saveWindowBounds

      private void saveWindowBounds(JFrame frame)
    • getPrefs

      private Preferences getPrefs()
    • filterChanged

      private void filterChanged()
    • typeOfValue

      private String typeOfValue(Object value)
    • tableMousePressed

      private void tableMousePressed(MouseEvent e)
    • copyKey

      private void copyKey()
    • copyValue

      private void copyValue()
    • copyKeyAndValue

      private void copyKeyAndValue()
    • copyToClipboard

      private void copyToClipboard(int column)
    • initComponents

      private void initComponents()