Class UIUtils
java.lang.Object
com.inductiveautomation.ignition.designer.gui.util.UIUtils
Utility class for building common Swing UI components with consistent styling and behavior.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidattachInputAndActionMap(JDialog dialog, Runnable onClose) static JPanelcreateButtonPanel(JButton firstButton, JButton secondButton) Creates a two-button panel laid out in a row, right-aligned, with a top divider border.static JButtoncreateCancelButton(Runnable onButtonClicked) static voiddetachInputAndActionMap(JDialog dialog)
-
Method Details
-
createButtonPanel
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
JPanelcontaining both buttons
-
attachInputAndActionMap
-
detachInputAndActionMap
-
createCancelButton
-