Class UpdateDecoderDefinitionAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class UpdateDecoderDefinitionAction
    extends JmriAbstractAction
    Update the decoder definitions in the roster.

    When required, provides a user GUI to assist with replacing multiple-match definitions.
    See Also:
    XmlFile, Serialized Form
    • Constructor Detail

      • UpdateDecoderDefinitionAction

        public UpdateDecoderDefinitionAction​(java.lang.String name)
        Update the decoder definitions in the roster.
        Parameters:
        name - the name (Action.NAME) for the action; a value of null is ignored
      • UpdateDecoderDefinitionAction

        public UpdateDecoderDefinitionAction​(java.lang.String name,
                                             WindowInterface wi)
        Update the decoder definitions in the roster.
        Parameters:
        name - the name (Action.NAME) for the action; a value of null is ignored
        wi - the window interface controlling how this action is displayed
      • UpdateDecoderDefinitionAction

        public UpdateDecoderDefinitionAction​(java.lang.String name,
                                             javax.swing.Icon i,
                                             WindowInterface wi)
        Update the decoder definitions in the roster.
        Parameters:
        name - the name (Action.NAME) for the action; a value of null is ignored
        i - the small icon (Action.SMALL_ICON) for the action; a value of null is ignored
        wi - the window interface controlling how this action is displayed
    • Method Detail

      • getOptionPane

        javax.swing.JOptionPane getOptionPane​(javax.swing.JComponent source)
        Fetch the JOptionPane associated with this JComponent.

        Note that:
        • The source must be within (or itself be) a JOptionPane.
        • If source is a JOptionPane, the returned element will be source
        Parameters:
        source - the JComponent
        Returns:
        the JOptionPane associated with source
      • multiReplacementDialog

        int multiReplacementDialog​(java.lang.String text,
                                   boolean missing)
        Creates the "Multiple Replacements Found" dialog box with custom buttons and tooltips.
        Parameters:
        text - the explanatory text to display
        missing - if true, displays a "missing definition" title rather than a "multiple replacements" title
        Returns:
        sequence number of the button selected
      • setLastActionDisplay

        void setLastActionDisplay​(java.lang.String propertyName)
        Updates the lastActionDisplay JLabel to be the text fetched by the key named "TextLastAction", after inclusion of the text fetched by the key named "propertyName".
        Parameters:
        propertyName - the name of a ResourceBundle key
      • makePanel

        public JmriPanel makePanel()
        Never invoked, because we overrode actionPerformed above.
        Specified by:
        makePanel in class JmriAbstractAction
        Returns:
        never because it deliberately throws an IllegalArgumentException