Class CharsetPickerDialog

java.lang.Object
docking.DialogComponentProvider
ghidra.util.charset.picker.CharsetPickerDialog
All Implemented Interfaces:
ActionContextProvider, StatusListener, TaskListener

public class CharsetPickerDialog extends DialogComponentProvider
Dialog that displays a charset picker table and lets the user press ok or cancel.

Call getSelectedCharset() after the dialog closes to get the selected value.

  • Constructor Details

    • CharsetPickerDialog

      public CharsetPickerDialog()
  • Method Details

    • pickCharset

      public static CharsetInfo pickCharset(CharsetInfo defaultCSI)
      Allows user to pick a charset from a table in a modal dialog.
      Parameters:
      defaultCSI - default charset to initially select in the table
      Returns:
      selected charset, or null if canceled
    • okCallback

      protected void okCallback()
      Description copied from class: DialogComponentProvider
      The callback method for when the "OK" button is pressed.
      Overrides:
      okCallback in class DialogComponentProvider
    • cancelCallback

      protected void cancelCallback()
      Description copied from class: DialogComponentProvider
      The callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.
      Overrides:
      cancelCallback in class DialogComponentProvider
    • setSelectedCharset

      public void setSelectedCharset(CharsetInfo csi)
    • getSelectedCharset

      public CharsetInfo getSelectedCharset()