Package hec.gfx2d

Class SimpleJTableData

All Implemented Interfaces:
G2dObject, Serializable

public class SimpleJTableData extends G2dData implements G2dObject
Simple data object for holding a table structure for ploting.
See Also:
  • Field Details

    • xdata

      public double[][] xdata
    • ydata

      public double[][] ydata
    • _startRow

      public int _startRow
  • Constructor Details

    • SimpleJTableData

      public SimpleJTableData()
  • Method Details

    • getXAxisName

      public String getXAxisName()
      Returns the name of the x axis
      Specified by:
      getXAxisName in interface G2dObject
    • getYAxisName

      public String getYAxisName()
      Returns the name of the y axis
      Specified by:
      getYAxisName in interface G2dObject
    • setXAxisType

      public void setXAxisType(int xAxis)
      set the x axis type
    • getXAxisType

      public int getXAxisType()
      Returns the type of the x axis
      Specified by:
      getXAxisType in interface G2dObject
    • setYAxisType

      public void setYAxisType(int yAxis)
      set the y axis type
    • getYAxisType

      public int getYAxisType()
      Returns the type of the y axis
      Specified by:
      getYAxisType in interface G2dObject
    • getCurveCount

      public int getCurveCount()
      Description copied from class: G2dData
      Returns the number of curves that this object contains.
      Specified by:
      getCurveCount in interface G2dObject
      Overrides:
      getCurveCount in class G2dData
    • getCurveName

      public String getCurveName(int curveIdx)
    • clearData

      public void clearData()
      clears the data, in effect, erases the plot
    • setMultipleColumnData

      public void setMultipleColumnData(RmaJTable tbl, int[] xCol, int[] yCol)
      Sets the data from a table so that you can have a single y-data point with multiple x-data points or visa-versa.
      Parameters:
      tbl -
      xCol -
      yCol -
    • setData

      public void setData(RmaJTable tbl, int[] xCol, int[] yCol)
      Sets the data for this plot data model from a table. This sets the data as 1 X data point and 1 Y data point
      Parameters:
      tbl - the table to ge the data from
      xCol - an array of columns that together provide the xdata
      yCol - ad array of columns that together provide the ydata.
    • setData

      public void setData(RmaJTable tbl, int xCol, int yCol)
      sets the data Vector and notifies observers
    • getDataResetType

      public String getDataResetType()
    • stripUnitsFromLabel

      protected String stripUnitsFromLabel(String labelString)
      strip units from string to use in plot legend
    • parseValue

      protected double parseValue(Object dataObj, int axisType)
      get double value for table cell object
    • setXDataElement

      public void setXDataElement(int xPos, double data)
    • setYDataElement

      public void setYDataElement(int yPos, double data)
    • setStartRow

      public void setStartRow(int row)
    • getStartRow

      public int getStartRow()
    • load

      public void load()
      Causes the object to load its data into memory
      Specified by:
      load in interface G2dObject
    • unload

      public void unload()
      Causes the object to unload its data from memory
      Specified by:
      unload in interface G2dObject
    • getBounds

      public WorldRect getBounds()
      Returns the extents of the object in world coordinates
      Specified by:
      getBounds in interface G2dObject
      Specified by:
      getBounds in class G2dData
    • setCurveNames

      public void setCurveNames(String[] names)
    • getPairedDataContainer

      public PairedDataContainer getPairedDataContainer()
    • addToPairedDataContainerReveresed

      public void addToPairedDataContainerReveresed(boolean rev)
    • addToPairedDataContainer

      public int addToPairedDataContainer(PairedDataContainer pairedDataContainer)
    • getNearestDataPt

      public WorldPt getNearestDataPt(WorldPt pt)
      Returns the point in local coordinates of the closest data point to the given pt