Class ChartConfig

  • Direct Known Subclasses:
    GraphSettings

    public class ChartConfig
    extends Object
    Base class for all chart widget configs
    • Field Detail

      • title

        protected String title
      • legendPosition

        protected int legendPosition
      • showLegend

        protected boolean showLegend
      • extendedLegend

        protected boolean extendedLegend
      • showTitle

        protected boolean showTitle
      • showGrid

        protected boolean showGrid
      • showHostNames

        protected boolean showHostNames
      • autoRefresh

        protected boolean autoRefresh
      • logScale

        protected boolean logScale
      • stacked

        protected boolean stacked
      • translucent

        protected boolean translucent
      • area

        protected boolean area
      • lineWidth

        protected int lineWidth
      • autoScale

        protected boolean autoScale
      • minYScaleValue

        protected double minYScaleValue
      • maxYScaleValue

        protected double maxYScaleValue
      • refreshRate

        protected int refreshRate
      • timeUnits

        protected int timeUnits
      • timeRange

        protected int timeRange
      • timeFrameType

        protected int timeFrameType
      • timeFrom

        protected Date timeFrom
      • timeTo

        protected Date timeTo
    • Constructor Detail

      • ChartConfig

        public ChartConfig()
    • Method Detail

      • createFromXml

        public static ChartConfig createFromXml​(String xml)
                                         throws Exception
        Create chart settings object from XML document
        Parameters:
        xml - XML document
        Returns:
        deserialized object
        Throws:
        Exception - if the object cannot be fully deserialized
      • createXml

        public String createXml()
                         throws Exception
        Create XML from configuration.
        Returns:
        XML document
        Throws:
        Exception - if the schema for the object is not valid
      • getTimeRangeMillis

        public long getTimeRangeMillis()
        Get time range covered by graph in milliseconds
        Returns:
        The time range
      • getTitle

        public String getTitle()
        Returns:
        the title
      • setTitle

        public void setTitle​(String title)
        Parameters:
        title - the title to set
      • getDciList

        public ChartDciConfig[] getDciList()
        Returns:
        the dciList
      • setDciList

        public void setDciList​(ChartDciConfig[] dciList)
        Parameters:
        dciList - the dciList to set
      • getLegendPosition

        public int getLegendPosition()
        Returns:
        the legendPosition
      • setLegendPosition

        public void setLegendPosition​(int legendPosition)
        Parameters:
        legendPosition - the legendPosition to set
      • isShowLegend

        public boolean isShowLegend()
        Returns:
        the showLegend
      • setShowLegend

        public void setShowLegend​(boolean showLegend)
        Parameters:
        showLegend - the showLegend to set
      • getRefreshRate

        public int getRefreshRate()
        Returns:
        the refreshRate
      • setRefreshRate

        public void setRefreshRate​(int refreshRate)
        Parameters:
        refreshRate - the refreshRate to set
      • isShowTitle

        public boolean isShowTitle()
        Returns:
        the showTitle
      • setShowTitle

        public void setShowTitle​(boolean showTitle)
        Parameters:
        showTitle - the showTitle to set
      • getTimeUnits

        public int getTimeUnits()
        Returns:
        the timeUnits
      • setTimeUnits

        public void setTimeUnits​(int timeUnits)
        Parameters:
        timeUnits - the timeUnits to set
      • getTimeRange

        public int getTimeRange()
        Returns:
        the timeRange
      • setTimeRange

        public void setTimeRange​(int timeRange)
        Parameters:
        timeRange - the timeRange to set
      • isShowHostNames

        public boolean isShowHostNames()
        Returns:
        the showHostNames
      • setShowHostNames

        public void setShowHostNames​(boolean showHostNames)
        Parameters:
        showHostNames - the showHostNames to set
      • isAutoRefresh

        public boolean isAutoRefresh()
        Returns:
        the autoRefresh
      • setAutoRefresh

        public void setAutoRefresh​(boolean autoRefresh)
        Parameters:
        autoRefresh - the autoRefresh to set
      • isLogScale

        public boolean isLogScale()
        Returns:
        the logScale
      • setLogScale

        public void setLogScale​(boolean logScale)
        Parameters:
        logScale - the logScale to set
      • getTimeFrameType

        public int getTimeFrameType()
        Returns:
        the timeFrameType
      • setTimeFrameType

        public void setTimeFrameType​(int timeFrameType)
        Parameters:
        timeFrameType - the timeFrameType to set
      • getTimeFrom

        public Date getTimeFrom()
        Returns:
        the timeFrom
      • setTimeFrom

        public void setTimeFrom​(Date timeFrom)
        Parameters:
        timeFrom - the timeFrom to set
      • getTimeTo

        public Date getTimeTo()
        Returns:
        the timeTo
      • setTimeTo

        public void setTimeTo​(Date timeTo)
        Parameters:
        timeTo - the timeTo to set
      • isShowGrid

        public boolean isShowGrid()
        Returns:
        the showGrid
      • setShowGrid

        public void setShowGrid​(boolean showGrid)
        Parameters:
        showGrid - the showGrid to set
      • isStacked

        public boolean isStacked()
        Returns:
        the stacked
      • setStacked

        public void setStacked​(boolean stacked)
        Parameters:
        stacked - the stacked to set
      • isTranslucent

        public boolean isTranslucent()
        Returns:
        the translucent
      • setTranslucent

        public void setTranslucent​(boolean translucent)
        Parameters:
        translucent - the translucent to set
      • isExtendedLegend

        public boolean isExtendedLegend()
        Returns:
        the extendedLegend
      • setExtendedLegend

        public void setExtendedLegend​(boolean extendedLegend)
        Parameters:
        extendedLegend - the extendedLegend to set
      • getLineWidth

        public int getLineWidth()
        Returns:
        the lineWidth
      • setLineWidth

        public void setLineWidth​(int lineWidth)
        Parameters:
        lineWidth - the lineWidth to set
      • isAutoScale

        public boolean isAutoScale()
        Returns:
        true if auto scale is set
      • setAutoScale

        public void setAutoScale​(boolean autoScale)
        Parameters:
        autoScale - Set auto scale
      • isArea

        public boolean isArea()
        Returns:
        the area
      • setArea

        public void setArea​(boolean area)
        Parameters:
        area - the area to set
      • getMinYScaleValue

        public double getMinYScaleValue()
        Returns:
        Minimal Y scale
      • setMinYScaleValue

        public void setMinYScaleValue​(double minYScaleValue)
        Parameters:
        minYScaleValue - The scale value to set
      • getMaxYScaleValue

        public double getMaxYScaleValue()
        Returns:
        Max Y scale
      • setMaxYScaleValue

        public void setMaxYScaleValue​(double maxYScaleValue)
        Parameters:
        maxYScaleValue - max Y scale
      • timePeriod

        public TimePeriod timePeriod()
        Returns:
        The time period
      • setTimePeriod

        public void setTimePeriod​(TimePeriod tp)
        Parameters:
        tp - The time period to set
      • addChangeListener

        public void addChangeListener​(GraphSettingsChangeListener listener)
        Add change listener
        Parameters:
        listener - change listener
      • removeChangeListener

        public void removeChangeListener​(GraphSettingsChangeListener listener)
        Remove change listener
        Parameters:
        listener - change listener to remove
      • fireChangeNotification

        public void fireChangeNotification()
        Fire change notification
      • setModifyYBase

        public void setModifyYBase​(boolean modifyYBase)
        Set modify Y base
        Parameters:
        modifyYBase - if true, use min DCI value as Y base
      • modifyYBase

        public boolean modifyYBase()
        Modify Y base
        Returns:
        true if use min DCI value as Y base
      • setConfig

        public void setConfig​(ChartConfig config)
      • isUseMultipliers

        public boolean isUseMultipliers()
        Returns:
        the useMultipliers
      • setUseMultipliers

        public void setUseMultipliers​(boolean useMultipliers)
        Parameters:
        useMultipliers - the useMultipliers to set