Package jmri.jmrit.roster
Class AbstractRosterItemAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.util.swing.JmriAbstractAction
-
- jmri.jmrit.roster.AbstractRosterItemAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
- Direct Known Subclasses:
CopyRosterItemAction
,ExportRosterItemAction
,ImportRosterItemAction
public abstract class AbstractRosterItemAction extends JmriAbstractAction
Base class for Actions to copy, export and import RosterEntry objects.Note that
DeleteRosterItemAction
is sufficiently different that it doesn't use this base class.- See Also:
XmlFile
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JFileChooser
fileChooser
(package private) RosterEntry
mFromEntry
(package private) java.io.File
mFromFile
(package private) java.lang.String
mFromFilename
(package private) java.lang.String
mFromID
(package private) java.lang.String
mFullFromFilename
(package private) java.lang.String
mFullToFilename
(package private) java.awt.Component
mParent
(package private) RosterEntry
mToEntry
(package private) java.io.File
mToFile
(package private) java.lang.String
mToFilename
(package private) java.lang.String
mToID
-
Fields inherited from class jmri.util.swing.JmriAbstractAction
context, hint, wi
-
-
Constructor Summary
Constructors Constructor Description AbstractRosterItemAction(java.lang.String pName, java.awt.Component pWho)
AbstractRosterItemAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi)
AbstractRosterItemAction(java.lang.String s, WindowInterface wi)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
(package private) void
addToEntryToRoster()
(package private) abstract boolean
doTransfer()
JmriPanel
makePanel()
(package private) boolean
selectExistingFromEntry()
protected abstract boolean
selectFrom()
(package private) boolean
selectNewFromFile()
(package private) boolean
selectNewToEntryID()
(package private) boolean
selectNewToFile()
(package private) abstract boolean
selectTo()
void
setExistingEntry(RosterEntry mFromEntry)
Set the roster entry this action acts upon.(package private) void
updateRoster()
Common, but not unique implementation to add the "To" entry to the Roster and rewrite the roster file.-
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
-
mParent
java.awt.Component mParent
-
mFromID
java.lang.String mFromID
-
mFromEntry
RosterEntry mFromEntry
-
mFromFile
java.io.File mFromFile
-
mFromFilename
java.lang.String mFromFilename
-
mFullFromFilename
java.lang.String mFullFromFilename
-
mToID
java.lang.String mToID
-
mToEntry
RosterEntry mToEntry
-
mToFile
java.io.File mToFile
-
mToFilename
java.lang.String mToFilename
-
mFullToFilename
java.lang.String mFullToFilename
-
fileChooser
javax.swing.JFileChooser fileChooser
-
-
Constructor Detail
-
AbstractRosterItemAction
public AbstractRosterItemAction(java.lang.String pName, java.awt.Component pWho)
-
AbstractRosterItemAction
public AbstractRosterItemAction(java.lang.String s, WindowInterface wi)
-
AbstractRosterItemAction
public AbstractRosterItemAction(java.lang.String s, javax.swing.Icon i, WindowInterface wi)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJmriAbstractAction
-
selectFrom
protected abstract boolean selectFrom()
-
selectTo
abstract boolean selectTo()
-
doTransfer
abstract boolean doTransfer()
-
updateRoster
void updateRoster()
Common, but not unique implementation to add the "To" entry to the Roster and rewrite the roster file.
-
selectExistingFromEntry
boolean selectExistingFromEntry()
-
setExistingEntry
public void setExistingEntry(RosterEntry mFromEntry)
Set the roster entry this action acts upon.- Parameters:
mFromEntry
- the roster entry to act upon
-
selectNewToEntryID
boolean selectNewToEntryID()
-
selectNewFromFile
boolean selectNewFromFile()
-
selectNewToFile
boolean selectNewToFile()
-
addToEntryToRoster
void addToEntryToRoster()
-
makePanel
public JmriPanel makePanel()
- Specified by:
makePanel
in classJmriAbstractAction
-
-