Package hec.gfx2d

Class ComplexSeasonalData

All Implemented Interfaces:
G2dObject, Serializable

public class ComplexSeasonalData extends G2dData implements G2dObject
This plot object calculates a single plot line for mulitple SimpleSeasonalData. It collects all of the unique date values from each SimpleSeasonalData and interpolates values for each date from all records and sums them together. This acts similar to the SimpleSeasonalData object which plots a single SeasonalRecord.
See Also:
  • Field Details

    • _tdata

      public int[] _tdata
    • _ydata

      public double[] _ydata
    • _tdataOrg

      public int[] _tdataOrg
    • _ydataOrg

      public double[] _ydataOrg
    • _xtype

      public String _xtype
    • _ytype

      public String _ytype
    • _srVector

      protected Vector _srVector
    • _interpolationType

      protected String _interpolationType
    • _nyears

      protected int _nyears
  • Constructor Details

    • ComplexSeasonalData

      public ComplexSeasonalData()
  • Method Details

    • setData

      public void setData(Vector seasonalData)
      sets the vector of seasonal records
    • addData

      public void addData(SimpleSeasonalData ssd)
      Adds a new seasonal record to the list. The user should call calcPlotArrays to redo the calculation
    • calcPlotArrays

      public boolean calcPlotArrays()
    • setInterpolationType

      public void setInterpolationType(String interpType)
      set interpolation type
    • 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
    • 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
    • setYAxisName

      public void setYAxisName(String name)
      Set the name of the y-axis
    • getXAxisType

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

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

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

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

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