Class DeleteRosterItemAction

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

    public class DeleteRosterItemAction
    extends JmriAbstractAction
    Remove a locomotive from the roster.

    In case of error, this moves the definition file to a backup. This action posts a dialog box to select the loco to be deleted, and then posts an "are you sure" dialog box before acting.

    See Also:
    XmlFile, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.awt.Component _who  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)  
      JmriPanel makePanel()  
      protected RosterEntry[] selectRosterEntry​(java.lang.String rosterGroup)  
      (package private) boolean userOK​(java.lang.String entry, java.lang.String filename, java.lang.String fullFileName)
      Can provide some mechanism to prompt for user for one last chance to change his/her mind.
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Field Detail

      • _who

        java.awt.Component _who
    • Method Detail

      • userOK

        boolean userOK​(java.lang.String entry,
                       java.lang.String filename,
                       java.lang.String fullFileName)
        Can provide some mechanism to prompt for user for one last chance to change his/her mind.
        Parameters:
        entry - Roster entry being operated on
        filename - Just name of file
        fullFileName - including path
        Returns:
        true if user says to continue