Class JTableToCsvAction

java.lang.Object
javax.swing.AbstractAction
jmri.util.table.JTableToCsvAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class JTableToCsvAction extends AbstractAction
Save a JTable or AbstractTableModel to CSV file after prompting for filename.

First line contains Column Headings. Save order can replicate current JTable sort, filters, visible columns and column order. Entire Table Model can be saved by not specifying a JTable. Can exclude specific columns ( e.g. JButtons ) from the save.

Since:
4.19.5
See Also:
  • Constructor Details

    • JTableToCsvAction

      public JTableToCsvAction(String actionName, JTable jtable, @Nonnull TableModel model, @Nonnull String defaultFileName, @Nonnull int[] excludedCols)
      Create a new Save to CSV Action.
      Parameters:
      actionName - Action Name
      jtable - to save the view, else null for whole table.
      model - Table Model to use.
      defaultFileName - File Name to use as default.
      excludedCols - int Array of Table Model columns to exclude.
  • Method Details