Package org.freedesktop.dbus.viewer
Class TabbedSaveAction
java.lang.Object
javax.swing.AbstractAction
org.freedesktop.dbus.viewer.TabbedSaveAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,Iterable<TextFile>,EventListener,Action
- Direct Known Subclasses:
SaveAllAction,SaveFileAction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static JFileChooserFile chooser component.private static final longprotected final JTabbedPaneFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTabbedSaveAction(JTabbedPane _tabbedPane) protectedTabbedSaveAction(JTabbedPane _tabbedPane, String _name) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidactionPerformed(ActionEvent _event) protected StringgetFileName(int _index) Get the file name for the supplied indexprotected TextFilegetTextFile(int _index) Get the text file object associated with the supplied indexMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
chooser
File chooser component. Make static so that previous save location is stored -
tabbedPane
-
-
Constructor Details
-
TabbedSaveAction
-
TabbedSaveAction
-
-
Method Details
-
getTextFile
Get the text file object associated with the supplied index- Parameters:
_index- The tabbed pane index- Returns:
- The text file object for the referenced tab
-
getFileName
Get the file name for the supplied index- Parameters:
_index- The tabbed pane index- Returns:
- The file name for the referenced tab
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-