Class DataTableFrame

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, AppFrame, Hidable

public class DataTableFrame extends OSPFrame
TableFrame displays a DataTable with a scroll pane in a frame.
Version:
1.0
Author:
Joshua Gould, Wolfgang Christian
See Also:
  • Field Details

    • fileMenu

      protected JMenu fileMenu
    • editMenu

      protected JMenu editMenu
    • saveAsItem

      protected JMenuItem saveAsItem
    • table

      protected DataTable table
  • Constructor Details

    • DataTableFrame

      public DataTableFrame(DataTable table)
      TableFrame Constructor
      Parameters:
      table - Description of the Parameter
    • DataTableFrame

      public DataTableFrame(String title, DataTable _table)
      TableFrame Constructor
      Parameters:
      title -
      _table - Description of the Parameter
  • Method Details

    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class Window
    • loadDisplayMenu

      protected JMenu loadDisplayMenu()
      Adds a Display menu to the menu bar.
      Overrides:
      loadDisplayMenu in class OSPFrame
    • copy

      public void copy()
      Copies the data in the table to the system clipboard
    • refreshTable

      public void refreshTable(int mode)
      Refresh the data in the DataTable, as well as other changes to the table, such as row number visibility. Changes to the TableModels displayed in the table will not be visible until this method is called.
    • getSelectedData

      public StringBuffer getSelectedData(int[] selectedRows, int[] selectedColumns)
      Gets the data selected by the user in the table.
      Parameters:
      selectedRows - Description of the Parameter
      selectedColumns - Description of the Parameter
      Returns:
      the selected data.
    • sort

      public void sort(int col)
      Sorts the table using the given column.
      Parameters:
      col - int
    • saveAs

      public void saveAs()
      Pops open a save file dialog to save the data in this table to a file.