Package hec.dataTable

Class HecDataTableFrame

All Implemented Interfaces:
ActionListener, ComponentListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, Modifiable, FindListener

public class HecDataTableFrame extends RmaJFrame implements ActionListener, FindListener
See Also:
  • Field Details

  • Constructor Details

    • HecDataTableFrame

      public HecDataTableFrame(Object parent)
  • Method Details

    • setParent

      public void setParent(Object parent)
    • getDecimalPlacesProp

      public static String getDecimalPlacesProp()
    • newTable

      public static HecDataTableFrame newTable()
    • newTable

      public static HecDataTableFrame newTable(String title)
    • showTable

      public void showTable()
    • buildMenu

      protected void buildMenu()
    • setData

      public int setData(List dataSets)
    • setData

      public int setData(DataContainer dataContainer)
    • setData

      public int setData(TimeSeriesContainer timeSeriesContainer)
    • setData

      public int setData(PairedDataContainer pairedDataContainer)
    • compareDataSets

      public int compareDataSets(List dataSets, int compareType, int precision, HecDouble compareValue, boolean ignoreMissing)
    • getCompareDataSetOrdinates

      public int[] getCompareDataSetOrdinates(List dataSets, int compareType, int precision, HecDouble compareValue, boolean ignoreMissing)
    • getCompareMessage

      public String getCompareMessage()
    • addDisplayObject

      @Deprecated public int addDisplayObject(DataContainer dc)
      Deprecated.
      Use addData(DataContainer) instead.
      Adds data (DataContainer) to the HecDataTableFrame object.
      Parameters:
      dc - The DataContainer to add to the object.
      Returns:
      The status.
    • addData

      public int addData(DataContainer dc)
      Adds data (DataContainer) to the HecDataTableFrame object.
      Parameters:
      dc - The DataContainer to add to the object.
      Returns:
      The status.
    • setTransferHandler

      public void setTransferHandler(TransferHandler transferHandler)
      Overrides:
      setTransferHandler in class JFrame
    • setCommasState

      public void setCommasState(boolean showCommas)
    • setDecimalPlaces

      public void setDecimalPlaces(int decimalPlaces)
    • getCommasState

      public boolean getCommasState()
    • setReverseOrderState

      public void setReverseOrderState(boolean reverseOrder)
    • disableReverseOrder

      public void disableReverseOrder()
    • setDateTimeAsTwoColumnsState

      public void setDateTimeAsTwoColumnsState(boolean showDateTimeAsTwoColumns)
    • getDateTimeAsTwoColumnsState

      public boolean getDateTimeAsTwoColumnsState()
    • setQualityState

      public void setQualityState(int qualityStyle)
    • completeTable

      protected void completeTable()
    • tableResized

      protected void tableResized()
    • tableMoved

      protected void tableMoved()
    • setSize

      public void setSize()
    • getPreferredTableWidth

      protected int getPreferredTableWidth()
    • allowEditing

      public void allowEditing(boolean allowEdit)
      This method just indicates if editing is allowed, i.e., the user has write access, etc. It does not indicate that the data is being edited.
    • editData

      public void editData(boolean doEdit)
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      this method is public as an implementation side effect. It shouldn't be called directly by user code
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event -
    • Exit_Action

      protected void Exit_Action()
    • terminate

      protected void terminate()
    • updateContainers

      public int updateContainers()
    • saveAs

      public void saveAs()
    • save

      public int save()
    • Edit_Action

      protected void Edit_Action()
    • enableEditMenuItems

      protected void enableEditMenuItems(boolean edit)
    • insertRows_Action

      protected void insertRows_Action()
    • appendRows_Action

      protected void appendRows_Action()
    • deleteRows_Action

      protected void deleteRows_Action()
    • insertColumn_Action

      protected void insertColumn_Action()
    • appendColumn_Action

      protected void appendColumn_Action()
    • deleteColumn_Action

      protected void deleteColumn_Action()
    • setEditSelection

      protected void setEditSelection()
    • showDecimalChange

      public void showDecimalChange(int numberDecimals)
    • showUndefinedStyle

      public void showUndefinedStyle(int undefinedStyle)
    • ViewCommas_Action

      protected void ViewCommas_Action()
    • reverseOrder_Action

      protected void reverseOrder_Action(boolean setProperty)
    • ViewDateTime_Action

      protected void ViewDateTime_Action()
    • ViewDate4Digit_Action

      protected void ViewDate4Digit_Action()
    • getTableType

      public String getTableType()
    • addDataToExistingTable

      public boolean addDataToExistingTable(Vector newDataContainers)
    • ViewQuality_Action

      protected void ViewQuality_Action(int qualityStyle)
    • printString

      public void printString()
    • printPreview

      public void printPreview()
    • export

      public void export()
    • export

      public void export(String fileName, TableExportOptions options)
    • export

      public void export(BufferedWriter writer, TableExportOptions options)
    • getExportString

      public String getExportString(TableExportOptions options)
    • exportAsXML

      public void exportAsXML(BufferedWriter writer, String title, String indent)
    • exportAsXML

      public void exportAsXML(BufferedWriter writer)
    • exportAsXML

      public void exportAsXML(String fileName, String title, String indent)
    • exportAsXML

      public void exportAsXML(String fileName)
    • getXMLExportString

      public String getXMLExportString(String title, String indent)
    • getXMLExportString

      public String getXMLExportString()
    • exportAsHTML

      public void exportAsHTML(BufferedWriter writer, String title, String indent)
    • exportAsHTML

      public void exportAsHTML(BufferedWriter writer)
    • exportAsHTML

      public void exportAsHTML(String fileName, String title, String indent)
    • exportAsHTML

      public void exportAsHTML(String fileName)
    • getHTMLExportString

      public String getHTMLExportString(String title, String indent)
    • getHTMLExportString

      public String getHTMLExportString()
    • getColumn

      public int getColumn(String columnHeader)
    • getColumn

      public int getColumn(DataContainer dc)
    • getColumnLabels

      public String[] getColumnLabels()
    • getColumnLabel

      public String getColumnLabel(int colNum)
    • setColumnLabels

      public void setColumnLabels(String[] labels)
    • setColumnLabel

      public void setColumnLabel(int colNum, String label)
    • getColumnWidths

      public int[] getColumnWidths()
    • setColumnWidths

      public void setColumnWidths(int[] widths)
    • getColumnWidth

      public int getColumnWidth(int col)
    • setColumnWidth

      public void setColumnWidth(int col, int width)
    • setColumnPrecision

      public void setColumnPrecision(int col, int precision)
    • getColumnPrecision

      public int getColumnPrecision(int col)
    • getColumnHeaderForeground

      public Color getColumnHeaderForeground(int col)
    • getColumnHeaderForegroundString

      public String getColumnHeaderForegroundString(int col)
    • setColumnHeaderForeground

      public void setColumnHeaderForeground(int colNum, Color color)
    • setColumnHeaderForeground

      public void setColumnHeaderForeground(int colNum, String color)
    • getColumnHeaderBackground

      public Color getColumnHeaderBackground(int col)
    • getColumnHeaderBackgroundString

      public String getColumnHeaderBackgroundString(int col)
    • setColumnHeaderBackground

      public void setColumnHeaderBackground(int colNum, Color color)
    • setColumnHeaderBackground

      public void setColumnHeaderBackground(int colNum, String color)
    • getColumnHeaderFont

      public Font getColumnHeaderFont(int colNum)
    • getColumnHeaderFontString

      public String getColumnHeaderFontString(int colNum)
    • setColumnHeaderFont

      public void setColumnHeaderFont(int colNum, Font font)
    • setColumnHeaderFont

      public void setColumnHeaderFont(int colNum, String font)
    • getRowForeground

      public Color getRowForeground(int rowNum)
    • getRowForegroundString

      public String getRowForegroundString(int rowNum)
    • setRowForeground

      public void setRowForeground(int rowNum, Color color)
    • setRowForeground

      public void setRowForeground(int rowNum, String color)
    • getRowBackground

      public Color getRowBackground(int rowNum)
    • getRowBackgroundString

      public String getRowBackgroundString(int rowNum)
    • setRowBackground

      public void setRowBackground(int rowNum, Color color)
    • setRowBackground

      public void setRowBackground(int rowNum, String color)
    • getColumnForeground

      public Color getColumnForeground(int columnNum)
    • getColumnForegroundString

      public String getColumnForegroundString(int columnNum)
    • setColumnForeground

      public void setColumnForeground(int columnNum, Color color)
    • setColumnForeground

      public void setColumnForeground(int columnNum, String color)
    • getColumnBackground

      public Color getColumnBackground(int columnNum)
    • getColumnBackgroundString

      public String getColumnBackgroundString(int columnNum)
    • setColumnBackground

      public void setColumnBackground(int columnNum, Color color)
    • setColumnBackground

      public void setColumnBackground(int columnNum, String color)
    • getCellForeground

      public Color getCellForeground(int row, int col)
    • getCellForegroundString

      public String getCellForegroundString(int row, int col)
    • setCellForeground

      public void setCellForeground(int row, int col, Color color)
    • setCellForeground

      public void setCellForeground(int row, int col, String color)
    • getCellBackground

      public Color getCellBackground(int row, int col)
    • getCellBackgroundString

      public String getCellBackgroundString(int row, int col)
    • setCellBackground

      public void setCellBackground(int row, int col, Color color)
    • setCellBackground

      public void setCellBackground(int row, int col, String color)
    • selectAll

      public void selectAll()
    • find

      public void find(ActionEvent event)
    • selectFirstRecord

      public boolean selectFirstRecord(String match, boolean wrap, boolean wholeWord, boolean searchTimes)
      Specified by:
      selectFirstRecord in interface FindListener
    • selectLastRecord

      public boolean selectLastRecord(String match, boolean wholeWord, boolean searchTimes)
      Specified by:
      selectLastRecord in interface FindListener
    • search

      protected boolean search(String match, boolean wholeWord, boolean searchTimes, boolean down, int startingRow, int startingColumn)
    • setShownNextOrdinate

      public void setShownNextOrdinate(int[] ordinates)
    • nextDifference

      protected void nextDifference(ActionEvent event)
    • jumpToNextOridnate

      protected boolean jumpToNextOridnate()
    • copyAll

      public void copyAll()
    • updateEdits

      protected void updateEdits()
    • cutSelection

      public void cutSelection()
    • copySelection

      public void copySelection()
    • pasteSelection

      public void pasteSelection()
    • plot

      protected void plot()
    • setTableTitleText

      public void setTableTitleText(String text)
      set the table title text
      Parameters:
      text - the new title text
    • getTableTitleText

      public String getTableTitleText()
      get the current table title text
      Returns:
      the table title text
    • getTableTitle

      public Title getTableTitle()
      get the table Title object
      Returns:
      the Title object
    • compareDataSets

      public int compareDataSets(int compareType, int precision, double compareValue, boolean ignoreMissing)
    • getCompareDataSetOrdinates

      public int[] getCompareDataSetOrdinates(int compareType, int precision, double toleranceOrPrecent, boolean ignoreMissing)
      Parameters:
      compareType - int, 0=exact, 1=within precentage, 2=within tolerance
      precision - int, decimal places from HecDouble if compareType=0
      toleranceOrPrecent - double, for compareType = 1,2
      ignoreMissing - boolean
      Returns:
      int[] returns row number in table, not data position
    • getContainersForSelectedRows

      public List getContainersForSelectedRows(int[] ordinates)
      For the rows given (table rows, not data rows), get the data for those rows and put into containers. Used by the difference functions.
      Parameters:
      ordinates - int[]
    • highlightValues

      public int[] highlightValues(HecDouble value, double tolerance, int compareType)
    • compareValue

      protected boolean compareValue(HecDouble value, double val, double tol, int type)
    • compareData

      public int compareData(int precision)
    • getFileMenu

      public JMenu getFileMenu()
    • getEditMenu

      public JMenu getEditMenu()
    • getViewMenu

      public JMenu getViewMenu()
    • getTable

      public HecDataTable getTable()
    • maximize

      public void maximize()
      Maximizes the frame.
    • minimize

      public void minimize()
      Minimizes (iconifies) the frame.
    • iconify

      public void iconify()
      Minimizes (iconifies) the frame.
    • restore

      public void restore()
      Restores the frame to normal size.
    • setSize

      public void setSize(int width, int height)
      Re-sizes table and forces re-draw.
      Overrides:
      setSize in class Window
    • close

      public void close()
      Closes the frame.