Class KeyEntryPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.designer.i18n.workspace.KeyEntryPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class KeyEntryPanel extends JPanel
See Also:
  • Constructor Details

    • KeyEntryPanel

      public KeyEntryPanel()
  • Method Details

    • getStagedKeys

      public List<KeyEntryPanel.StagedKey> getStagedKeys()
    • hasConflicts

      public boolean hasConflicts()
      Whether any staged key collides with another staged key or with a key already defined in the model.
    • clearStaged

      public void clearStaged()
    • setOnSave

      public void setOnSave(@Nullable Consumer<List<KeyEntryPanel.StagedKey>> onSave)
      Sets the callback invoked with the staged keys when the user presses Save.
    • setOnCancel

      public void setOnCancel(@Nullable Runnable onCancel)
      Sets the callback invoked when the user cancels (the staged set is cleared first).
    • setOnReturn

      public void setOnReturn(@Nullable Runnable r)
    • setKeyHashRule

      public void setKeyHashRule(Supplier<KeyHashRule> supplier)
      Supplies the active key-hash rule so staged collisions match the model's key equivalence.
    • setExistingKeys

      public void setExistingKeys(Supplier<@Nullable Collection<String>> supplier)
      Supplies the keys already defined in the model so staged keys that would collide with an existing key are flagged inline and blocked from Save (they would otherwise no-op on commit and could overwrite the existing key's note).