Package jmri.jmrit.roster
Class DeleteRosterItemAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.util.swing.JmriAbstractAction
-
- jmri.jmrit.roster.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 jmri.util.swing.JmriAbstractAction
context, hint, wi
-
-
Constructor Summary
Constructors Constructor Description DeleteRosterItemAction(java.lang.String s, java.awt.Component who)
DeleteRosterItemAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi)
DeleteRosterItemAction(java.lang.String s, WindowInterface wi)
-
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 jmri.util.swing.JmriAbstractAction
dispose, setContext, setHint, setName, setParameter, setParameter, setWindowInterface, toString
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
_who
java.awt.Component _who
-
-
Constructor Detail
-
DeleteRosterItemAction
public DeleteRosterItemAction(java.lang.String s, WindowInterface wi)
-
DeleteRosterItemAction
public DeleteRosterItemAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi)
-
DeleteRosterItemAction
public DeleteRosterItemAction(java.lang.String s, java.awt.Component who)
- Parameters:
s
- Name of this action, e.g. in menuswho
- Component that action is associated with, used to ensure proper position in of dialog boxes
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJmriAbstractAction
-
selectRosterEntry
protected RosterEntry[] selectRosterEntry(java.lang.String rosterGroup)
-
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 onfilename
- Just name of filefullFileName
- including path- Returns:
- true if user says to continue
-
makePanel
public JmriPanel makePanel()
- Specified by:
makePanel
in classJmriAbstractAction
-
-