Class TranslationEditPanel

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

public class TranslationEditPanel extends JPanel
The primary translation editing surface: a list of keys beside a per-locale value editor. Edits are live — typing a translation or note, or duplicating/deleting a key, writes straight to the MutableTranslationPackage model (including per-key notes) so the change reaches the backend immediately.
See Also:
  • Constructor Details

    • TranslationEditPanel

      public TranslationEditPanel()
  • Method Details

    • setSource

      public void setSource(MutableTranslationPackage source)
      Points the panel at its data model. Keys, locales, values, and notes are read live from here and edits are written straight back, so the panel always reflects the model and can never drift. Call refresh() (or rely on the owner's model-change events) whenever the model changes underneath the panel.
      Parameters:
      source - the keys/locales/values/notes model (e.g. the designer localization manager)
    • refresh

      public void refresh()
      Re-reads keys, locales, and values from the source, preserving the current selection.
    • getVisibleKeys

      public List<String> getVisibleKeys()
      The keys currently visible in the list, i.e. those matching the active filter (if any).
    • isFilterActive

      public boolean isFilterActive()
    • getFilterField

      public com.jidesoft.list.QuickListFilterField getFilterField()
    • isEditing

      public boolean isEditing()
      Whether the user is actively typing in one of the editors, so a reload should not clobber.
    • setOnAddKey

      public void setOnAddKey(Runnable onAddKey)
    • setOnSettings

      public void setOnSettings(Runnable onSettings)
      Invoked when the settings action in the key toolbar is pressed.
    • getSettingsAnchor

      public JComponent getSettingsAnchor()
      The gear button a settings popup should anchor to.