Class IgnitionSwingUtilities

java.lang.Object
com.inductiveautomation.ignition.client.util.gui.IgnitionSwingUtilities

public class IgnitionSwingUtilities extends Object
Ignition's very own version of the infamous SwingUtilities class. Contains similar functions with slightly altered semantics.
  • Constructor Details

    • IgnitionSwingUtilities

      public IgnitionSwingUtilities()
  • Method Details

    • getAncestorOfClass

      public static <T> T getAncestorOfClass(Class<T> c, Component comp) throws NullPointerException
      Just like SwingUtilities#getAncestorOfClass(Class, Component), except that if comp is the class you're looking for, it'll be found.
      Type Parameters:
      T - The type of the class to search for
      Parameters:
      c - The class you are looking for of type T
      comp - The component whose ancestors will be searched
      Returns:
      The ancestor of the component of type T, or null if the class cannot be found or if the component passed in is null.
      Throws:
      NullPointerException - If c is null
    • compoundBorder

      public static Border compoundBorder(Border... borders)
      Creates a compound border with any number of borders. Borders go outer to inner. Any border may be null.
    • enableFocusLogging

      public static void enableFocusLogging()
    • stopEditing

      public static void stopEditing(JTable table)
    • installEscapeCloseAction

      public static void installEscapeCloseAction(JDialog dialog)
    • createLargeSubmenu

      public static void createLargeSubmenu(JMenu menu, List<Action> items)
      Fills the JMenu with the items in the list, but limits the menu to 20 at a time, with remaining items accessible under a "more..." item at the bottom.
    • createLargeSubmenu

      public static void createLargeSubmenu(JMenu menu, List<Action> items, int groupSize)