Class TimeseriesContainer

    • Field Detail

      • m_Visible

        protected boolean m_Visible
        whether the timeseries is visible.
      • m_Color

        protected Color m_Color
        the associated color.
    • Constructor Detail

      • TimeseriesContainer

        public TimeseriesContainer​(TimeseriesContainerManager manager,
                                   Timeseries data)
        Initializes the container.
        Parameters:
        manager - the owning manager
        data - the timeseries to store (visible)
    • Method Detail

      • getDisplayID

        public String getDisplayID()
        Returns an ID to be used in the GUI (the DB ID with added single quotes to make it unique among the timeseries in the container manager).
        Specified by:
        getDisplayID in interface NamedContainer
        Returns:
        a short ID for the GUI
      • setData

        public void setData​(Timeseries value)
        Sets the timeseries.
        Parameters:
        value - the timeseries
      • getData

        public Timeseries getData()
        Returns the stored timeseries.
        Returns:
        the timeseries
      • setVisible

        public void setVisible​(boolean value)
        Sets the timeseries visibility.
        Specified by:
        setVisible in interface VisibilityContainer
        Parameters:
        value - if true then the timeseries will be visible
      • isVisible

        public boolean isVisible()
        Returns whether the timeseries is visible.
        Specified by:
        isVisible in interface VisibilityContainer
        Returns:
        true if the timeseries is visible
      • setColor

        public void setColor​(Color value)
        Sets the color to use.
        Specified by:
        setColor in interface ColorContainer
        Parameters:
        value - the color
      • getColor

        public Color getColor()
        Returns the current color in use.
        Specified by:
        getColor in interface ColorContainer
        Returns:
        the color
      • getDatabaseID

        public int getDatabaseID()
        Returns the database ID.
        Specified by:
        getDatabaseID in interface DatabaseIDHandler
        Returns:
        the database ID
      • assign

        public void assign​(AbstractContainer c)
        Updates itself with the values from given container (the manager is excluded!). Derived classes need to override this method.
        Overrides:
        assign in class AbstractContainer
        Parameters:
        c - the container to get the values from
      • hashCode

        public int hashCode()
        Returns the hashcode of the ID string.
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode
      • toString

        public String toString()
        Returns a short string representation of the container.
        Overrides:
        toString in class AbstractContainer
        Returns:
        a string representation