Documentation of 'jas2.hist.JASHistData' Java class
JASHistData
jas2.hist

Class JASHistData

  • All Implemented Interfaces:
    java.util.Observer
    Direct Known Subclasses:
    JASHist1DFunctionData


    public abstract class JASHistData
    extends java.util.Observable
    implements java.util.Observer
    This class is returned whenever a DataSource is added to a JASHist It supports making the data visible/invisible, and controlling the style (color etc) in which the data is shown.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int YAXIS_LEFT
      Y Axis on the left of the data area
      static int YAXIS_RIGHT
      Y Axis on the right of the data area
    • Constructor Summary

      Constructors 
      Constructor and Description
      JASHistData()
      Only used for object serialization, do not call
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract DataSource getDataSource()
      Get the DataSource associated with this JASHistData
      DataSource getFittableDataSource()
      Get a DataSource suitable for using as the source for fit operations.
      java.lang.String getLegendText() 
      Normalizer getNormalization() 
      boolean getShowStatistics() 
      abstract JASHistStyle getStyle()
      Get the JASHistStyle associated with this DataSource
      abstract java.lang.String getTitle()
      Get the title of the associated DataSource
      int getYAxis()
      Get the y axis against which this data is plotted
      boolean isShowing()
      Find out if this DayaSource is visible
      void setLegendText(java.lang.String text)
      Set the text for the legene entry corresponding to this data item
      void setNormalization(Normalizer factor)
      Set the normalization for this dataset.
      void setShowing(boolean value)
      Equivalent to show(boolean)
      void setShowLegend(boolean show)
      Controls whether statistics associated with this datasource should be shown
      void setShowStatistics(boolean show)
      Controls whether statistics associated with this datasource should be shown
      abstract void setStyle(JASHistStyle style)
      Set a style for this data.
      void setXBounds(double xmin, double xmax) 
      void setYAxis(int i)
      Sets which Y axis the data is plotted against.
      void show(boolean show)
      Controls the visibility of the associated DataSource Only listens to changes in DataSources if visible
      java.lang.String toString() 
      • Methods inherited from class java.util.Observable

        addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Observer

        update
    • Field Detail

      • YAXIS_LEFT

        public static final int YAXIS_LEFT
        Y Axis on the left of the data area
        See Also:
        Constant Field Values
      • YAXIS_RIGHT

        public static final int YAXIS_RIGHT
        Y Axis on the right of the data area
        See Also:
        Constant Field Values
    • Constructor Detail

      • JASHistData

        public JASHistData()
        Only used for object serialization, do not call
    • Method Detail

      • show

        public void show(boolean show)
        Controls the visibility of the associated DataSource Only listens to changes in DataSources if visible
        Parameters:
        show - true if the DataSource should be visible
      • setShowStatistics

        public void setShowStatistics(boolean show)
        Controls whether statistics associated with this datasource should be shown
      • getShowStatistics

        public boolean getShowStatistics()
      • setShowLegend

        public void setShowLegend(boolean show)
        Controls whether statistics associated with this datasource should be shown
      • getDataSource

        public abstract DataSource getDataSource()
        Get the DataSource associated with this JASHistData
        Returns:
        The associated DataSource
      • getFittableDataSource

        public DataSource getFittableDataSource()
        Get a DataSource suitable for using as the source for fit operations. In the case where the binning is set by the plot itself, this will differ from the orginal DataSource attached to the plot in that it reflects the current binning of the plot (remember a binned fit needs to be redone if the binning changes).
        See Also:
        getDataSource()
      • getTitle

        public abstract java.lang.String getTitle()
        Get the title of the associated DataSource
        Returns:
        The title
      • setStyle

        public abstract void setStyle(JASHistStyle style)
        Set a style for this data. The JASHistStyle object passed to this method must be appropriate for the corresponding DataSource, e.g. if the DataSource is a Rebinnable1DHistogramData then the JASHistStyle must be a JASHist1DStyle.
        Parameters:
        style - The style to be set
        Throws:
        java.lang.IllegalArgumentException - If the style is not of the approriate type
      • getStyle

        public abstract JASHistStyle getStyle()
        Get the JASHistStyle associated with this DataSource
        Returns:
        The associated style
      • setYAxis

        public void setYAxis(int i)
        Sets which Y axis the data is plotted against.
        Parameters:
        axis - Either YAXIS_LEFT or YAXIS_RIGHT
      • getYAxis

        public int getYAxis()
        Get the y axis against which this data is plotted
        Returns:
        Either YAXIS_LEFT or YAXIS_RIGHT
      • setShowing

        public void setShowing(boolean value)
        Equivalent to show(boolean)
        Parameters:
        value - true if the corresponding DataSource should be visible
      • isShowing

        public boolean isShowing()
        Find out if this DayaSource is visible
        Returns:
        true if the corresponding DataSource is visible
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setLegendText

        public void setLegendText(java.lang.String text)
        Set the text for the legene entry corresponding to this data item
      • getLegendText

        public java.lang.String getLegendText()
      • setNormalization

        public void setNormalization(Normalizer factor)
        Set the normalization for this dataset.
        Parameters:
        factor - The normalization to apply, or null for no normalization
      • getNormalization

        public Normalizer getNormalization()
      • setXBounds

        public void setXBounds(double xmin,
                               double xmax)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.