Class TableFrame

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

public class TableFrame extends OSPFrame
See Also:
  • Field Details

  • Constructor Details

    • TableFrame

      public TableFrame(String frameTitle)
      Constructs a TableFrame with the given title.
      Parameters:
      frameTitle - String
  • Method Details

    • setRefreshDelay

      public void setRefreshDelay(int delay)
      Sets the delay time for table refresh timer.
      Parameters:
      delay - the delay in millisecond
    • setStride

      public void setStride(int stride)
      Sets the stride between rows.
      Parameters:
      tableModel -
      stride -
    • setRowNumberVisible

      public void setRowNumberVisible(boolean vis)
      Sets the display row number flag. Table displays row number.
      Parameters:
      vis - true<\code> if table display row number
    • setColumnNames

      public void setColumnNames(String[] names)
      Sets the column names in this JTable.
      Parameters:
      names -
    • appendArray

      public void appendArray(Object obj)
      Appends a two dimensional array to this table.
      Parameters:
      obj - Object
      Throws:
      IllegalArgumentException
    • appendRow

      public void appendRow(double[] x)
      Appends a row of data with the given values to the table.
      Parameters:
      x - double[]
    • appendRow

      public void appendRow(int[] x)
      Appends a row of data with the given values to the table.
      Parameters:
      x - double[]
    • appendRow

      public void appendRow(Object[] x)
      Appends a row of data with the given values to the table.
      Parameters:
      x - double[]
    • appendRow

      public void appendRow(byte[] x)
      Appends a row of data with the given values to the table.
      Parameters:
      x - double[]
    • setColumnNames

      public void setColumnNames(int column, String name)
      Sets the column names in a JTable.
      Parameters:
      column - the index
      name -
    • setColumnFormat

      public void setColumnFormat(int column, String format)
      Sets the format for displaying decimals.
      Parameters:
      column - the index
      format -
    • setMaxPoints

      public void setMaxPoints(int max)
      Sets the maximum number of points to display
      Parameters:
      max -
    • setFirstRowIndex

      public void setFirstRowIndex(int index)
      Sets the first row's index.
      Parameters:
      index -
    • setVisible

      public void setVisible(boolean vis)
      Shows or hides this TableFrame depending on the value of parameter vis.
      Overrides:
      setVisible in class OSPFrame
      Parameters:
      vis - if true, shows this component; otherwise, hides this component
    • refreshTable

      public void refreshTable(String from)
      Refresh the data in the table.
    • refreshTable

      public void refreshTable()
    • clearData

      public void clearData()
      Clears data from drawing objects within this frame. The default method does nothing. Override this method to select the object(s) and the data to be cleared.
      Overrides:
      clearData in class OSPFrame