Class ModelItem

    • Constructor Detail

      • ModelItem

        public ModelItem​(String name)
        Initialize
        Parameters:
        name - Name of the PV or the formula
    • Method Detail

      • getUniqueId

        public String getUniqueId()
        Returns:
        UUID
      • getModel

        public Optional<Model> getModel()
        Returns:
        Model that contains this item
      • getName

        public String getName()
        Returns:
        Name of this item (PV, Formula, ...), may contain macros
      • getResolvedName

        public String getResolvedName()
        Returns:
        Name of this item (PV, Formula, ...) with all macros resolved
      • setName

        public boolean setName​(String new_name)
                        throws Exception
        Parameters:
        new_name - New item name
        Returns:
        true if name was actually changed
        Throws:
        Exception - on error (cannot create PV for new name, ...)
        See Also:
        getName()
      • getDisplayName

        public String getDisplayName()
        Returns:
        Preferred display name, used in plot legend. May contain macros.
      • getResolvedDisplayName

        public String getResolvedDisplayName()
        Returns:
        Preferred display name, used in plot legend, with macros resolved.
      • setDisplayName

        public void setDisplayName​(String new_display_name)
        Parameters:
        new_display_name - New display name
        See Also:
        getDisplayName()
      • setUnits

        public void setUnits​(String units)
        Parameters:
        units - Units, may be null
      • getUnits

        public String getUnits()
        Returns:
        Units, may be null
      • isVisible

        public boolean isVisible()
        Returns:
        true if item should be displayed
      • setVisible

        public void setVisible​(boolean visible)
        Parameters:
        visible - Should item be displayed?
      • getPaintColor

        public javafx.scene.paint.Color getPaintColor()
        Get item's color. For new items, the color is null until it's either set via setColor() or by adding it to a Model.
        Returns:
        Item's color
        See Also:
        setColor(Color)
      • setColor

        public void setColor​(javafx.scene.paint.Color new_col)
        Parameters:
        new_col - New color for this item
      • getTraceType

        public TraceType getTraceType()
        Returns:
        TraceType for displaying the trace
      • setTraceType

        public void setTraceType​(TraceType trace_type)
        Parameters:
        trace_type - New TraceType for displaying the trace
      • getLineWidth

        public int getLineWidth()
        Returns:
        Line width
      • setLineWidth

        public void setLineWidth​(int width)
        Parameters:
        width - New line width
      • getLineStyle

        public LineStyle getLineStyle()
        Returns:
        Line Style
      • setLineStyle

        public void setLineStyle​(LineStyle line_style)
        Parameters:
        line_style - Line Style
      • getPointType

        public PointType getPointType()
        Returns:
        PointType for displaying the trace
      • setPointType

        public void setPointType​(PointType point_type)
        Parameters:
        point_type - New PointType for displaying the trace
      • getPointSize

        public int getPointSize()
        Returns:
        Point size
      • setPointSize

        public void setPointSize​(int size)
        Parameters:
        size - New point size
      • getAxis

        public AxisConfig getAxis()
        Returns:
        Y-Axis
      • getAxisIndex

        public int getAxisIndex()
        Returns:
        Index of Y-Axis in model
      • setAxis

        public void setAxis​(AxisConfig axis)
        Parameters:
        axis - New X-Axis index
      • getWaveformIndex

        public int getWaveformIndex()
        This method should be overridden if the instance needs to change its behavior according to waveform index. If it is not overridden, this method always return 0.
        Returns:
        Waveform index
      • setWaveformIndex

        public void setWaveformIndex​(int index)
        This method should be overridden if the instance needs to change its behavior according to waveform index.
        Parameters:
        index - New waveform index
      • getSamples

        public abstract PlotSamples getSamples()
        Returns:
        Samples held by this item
      • setSelectedSample

        public void setSelectedSample​(Optional<PlotDataItem<Instant>> selected_sample)
        Parameters:
        selected_sample - Sample that is currently selected, for example via cursor
      • getSelectedSample

        public Optional<PlotDataItem<Instant>> getSelectedSample()
        Returns:
        Sample that is currently selected, for example via cursor
      • dispose

        public abstract void dispose()
        Dispose all data
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        Debug representation