Class UIUtils

java.lang.Object
com.inductiveautomation.ignition.designer.gui.util.UIUtils

public class UIUtils extends Object
Utility class for building common Swing UI components with consistent styling and behavior.
  • Method Details

    • createButtonPanel

      public static JPanel createButtonPanel(JButton firstButton, JButton secondButton)
      Creates a two-button panel laid out in a row, right-aligned, with a top divider border.

      Think of the panel as a three-column table. The first column is a spacer that expands to fill available space, pushing the two buttons to the right:

      ╔══════════════════════════════════════════╗  ← top divider
      │   (grows to fill)   │  first   │ second  │
      └─────────────────────┴──────────┴─────────┘
      
      Parameters:
      firstButton - the left-most action button (e.g. "OK" or "Apply")
      secondButton - the right-most action button (e.g. "Cancel")
      Returns:
      a styled JPanel containing both buttons
    • attachInputAndActionMap

      public static void attachInputAndActionMap(JDialog dialog, Runnable onClose)
    • detachInputAndActionMap

      public static void detachInputAndActionMap(JDialog dialog)
    • createCancelButton

      public static JButton createCancelButton(Runnable onButtonClicked)