java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.factorypmi.application.components.PMIEasyChart
All Implemented Interfaces:
DynamicPropertyProvider, LoadingMonitor, LocaleListener, ComponentLifecycle, DesignerInitializable, ExtensibleComponent, QualityMonitor, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

See Also:
  • Field Details

  • Constructor Details

    • PMIEasyChart

      public PMIEasyChart()
  • Method Details

    • translate

      protected String translate(String key)
    • translateTerm

      protected String translateTerm(String term)
    • createRealtimeDateRange

      protected RealtimeDateRange createRealtimeDateRange()
    • createEasyChart

      protected PMIEasyChart.EasyChart createEasyChart()
    • createDateRange

      protected PMIDateRange createDateRange()
    • createDropTargetListener

      protected void createDropTargetListener()
    • localeChanged

      public void localeChanged(Locale newLocale)
      Specified by:
      localeChanged in interface LocaleListener
    • getToolTipText

      public String getToolTipText()
      Overrides:
      getToolTipText in class JComponent
    • getMaximizeText

      protected String getMaximizeText()
    • getRestoreText

      protected String getRestoreText()
    • getPrintText

      protected String getPrintText()
    • getSaveText

      protected String getSaveText()
    • isPolling

      public boolean isPolling()
      Returns true if the mode is currently real-time, or manual with a positive poll rate, and the chart is not zoomed in
    • couldPoll

      public boolean couldPoll()
    • getEffectivePollRate

      public int getEffectivePollRate()
      Returns the effective poll rate. This will be zero if isPolling() returns false, or the poll rate with a lower bound of 250ms if we are currently polling.
    • initialize

      public void initialize()
      Specified by:
      initialize in interface DesignerInitializable
    • setMode

      public void setMode(int mode)
      Forwards to the internal chart's setMode function
    • setName

      public void setName(String newName)
      Overrides:
      setName in class Component
    • isOpaque

      public boolean isOpaque()
      Overrides:
      isOpaque in class JComponent
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class JComponent
    • setInvertTimeAxis

      public void setInvertTimeAxis(boolean inverted)
    • isInvertTimeAxis

      public boolean isInvertTimeAxis()
    • paintComponent

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • actionPerformed

      public void actionPerformed(ActionEvent evt)
      Specified by:
      actionPerformed in interface ActionListener
    • exportExcel

      public String exportExcel(String filename)
    • exportExcel

      public String exportExcel()
    • exportDatasets

      public List<Dataset> exportDatasets()
    • print

      public void print()
    • createRenderer

      public org.jfree.chart.renderer.xy.XYItemRenderer createRenderer(int style, PenCollection attrs)
    • toggleMaximized

      public void toggleMaximized()
    • updateConfig

      protected void updateConfig()
    • penIterator

      protected Iterator<Pen> penIterator()
      Creates a new Iterator<Pen> that will return all Pen objects represented by the three dataset fields:
      • pens (db pens)
      • tagPens (SQLTags history pens)
      • calcPens (calculated pens)
    • isAllowPenManipulation

      public boolean isAllowPenManipulation()
    • setAllowPenManipulation

      public void setAllowPenManipulation(boolean allowPenManipulation)
    • isAllowColorChanges

      public boolean isAllowColorChanges()
    • setAllowColorChanges

      public void setAllowColorChanges(boolean allowColorChanges)
    • getChartMode

      public int getChartMode()
    • setChartMode

      public void setChartMode(int newMode)
    • getDateRangeLocation

      public int getDateRangeLocation()
    • setDateRangeLocation

      public void setDateRangeLocation(int newLocation)
    • getDateRangeBorder

      public Border getDateRangeBorder()
    • setDateRangeBorder

      public void setDateRangeBorder(Border dateRangeBorder)
    • getDateRange

      public PMIDateRange getDateRange()
    • getRtDateRange

      public RealtimeDateRange getRtDateRange()
    • getPenBorder

      public Border getPenBorder()
    • setPenBorder

      public void setPenBorder(Border penBorder)
    • getChartBorder

      public Border getChartBorder()
    • setChartBorder

      public void setChartBorder(Border chartBorder)
    • getTranslatedPens

      protected Dataset getTranslatedPens(Dataset penDataset)
    • getPens

      public Dataset getPens()
    • setPens

      public void setPens(Dataset pens)
    • getTagPens

      public Dataset getTagPens()
    • setTagPens

      public void setTagPens(Dataset tagPens)
    • getCalcPens

      public Dataset getCalcPens()
    • setCalcPens

      public void setCalcPens(Dataset calcPens)
    • setLegend

      public void setLegend(int i)
    • getLegend

      public int getLegend()
    • getDateStyle

      public int getDateStyle()
    • setDateStyle

      public void setDateStyle(int dateStyle)
    • getTimeStyle

      public int getTimeStyle()
    • setTimeStyle

      public void setTimeStyle(int timeStyle)
    • setTooltips

      public void setTooltips(boolean b)
    • isTooltips

      public boolean isTooltips()
    • getSelectedXValue

      public String getSelectedXValue()
    • setSelectedXValue

      public void setSelectedXValue(String domainAnchor)
    • getBoxFill

      public Color getBoxFill()
    • getHighDensityColor

      public Color getHighDensityColor()
    • getSelectionHighlight

      public Color getSelectionHighlight()
    • getTickDensity

      public float getTickDensity()
    • getTodayIndicatorColor

      public Color getTodayIndicatorColor()
    • getTrackMargin

      public int getTrackMargin()
    • setBoxFill

      public void setBoxFill(Color boxFill)
    • setHighDensityColor

      public void setHighDensityColor(Color color)
    • setSelectionHighlight

      public void setSelectionHighlight(Color selectionHighlight)
    • getBarMargin

      public double getBarMargin()
    • setBarMargin

      public void setBarMargin(double barMargin)
    • getCursorCode

      public int getCursorCode()
    • setCursorCode

      public void setCursorCode(int cursorCode)
    • getGapThreshold

      public double getGapThreshold()
    • getHorizontalResolution

      public int getHorizontalResolution()
      Returns the chart width.
    • getTagHistoryResolution

      public int getTagHistoryResolution()
    • setTagHistoryResolution

      public void setTagHistoryResolution(int tagHistoryResolution)
    • getTagHistoryResolutionMode

      public int getTagHistoryResolutionMode()
    • setTagHistoryResolutionMode

      public void setTagHistoryResolutionMode(int mode)
    • getTagHistoryAllowInterpolation

      public boolean getTagHistoryAllowInterpolation()
    • setTagHistoryAllowInterpolation

      public void setTagHistoryAllowInterpolation(boolean value)
    • getTagHistoryValidateScanclass

      public boolean getTagHistoryValidateScanclass()
    • setTagHistoryValidateScanclass

      public void setTagHistoryValidateScanclass(boolean value)
    • getTagHistoryIgnoreBadData

      public boolean getTagHistoryIgnoreBadData()
    • setTagHistoryIgnoreBadData

      public void setTagHistoryIgnoreBadData(boolean value)
    • getTagHistoryBypassCache

      public boolean getTagHistoryBypassCache()
    • setTagHistoryBypassCache

      public void setTagHistoryBypassCache(boolean value)
    • setPlotOrientation

      public void setPlotOrientation(int orientation)
    • setPenControlMode

      public void setPenControlMode(int penControlMode)
    • getPlotOrientation

      public int getPlotOrientation()
    • getPenControlMode

      public int getPenControlMode()
    • setGapThreshold

      public void setGapThreshold(double gapThreshold)
    • getDigitalGap

      public double getDigitalGap()
    • setDigitalGap

      public void setDigitalGap(double digitalGap)
    • getXOffset3D

      public int getXOffset3D()
    • getxOffset3D

      public int getxOffset3D()
    • setXOffset3D

      public void setXOffset3D(int offset3D)
    • setxOffset3D

      public void setxOffset3D(int offset3D)
    • getYOffset3D

      public int getYOffset3D()
    • getyOffset3D

      public int getyOffset3D()
    • setYOffset3D

      public void setYOffset3D(int offset3D)
    • setyOffset3D

      public void setyOffset3D(int offset3D)
    • setTickDensity

      public void setTickDensity(float tickDensity)
    • setTodayIndicatorColor

      public void setTodayIndicatorColor(Color todayIndicatorColor)
    • setTrackMargin

      public void setTrackMargin(int trackMargin)
    • getMaxSelectionSize

      public String getMaxSelectionSize()
    • getOuterRangeStart

      public Date getOuterRangeStart()
    • setOuterRangeStart

      public void setOuterRangeStart(Date startDate)
    • getOuterRangeEnd

      public Date getOuterRangeEnd()
    • setOuterRangeEnd

      public void setOuterRangeEnd(Date endDate)
    • getStartupRange

      public String getStartupRange()
    • getStartupSelection

      public String getStartupSelection()
    • setStartupRange

      public void setStartupRange(String startupRange)
    • setStartupSelection

      public void setStartupSelection(String startupSelection)
    • setMaxSelectionSize

      public void setMaxSelectionSize(String maxSelectionSize)
    • getPlotBackground

      public Color getPlotBackground()
    • setPlotBackground

      public void setPlotBackground(Color color)
    • getEditorForegroundColor

      public Color getEditorForegroundColor()
    • setEditorForegroundColor

      public void setEditorForegroundColor(Color color)
    • getEditorBackgroundColor

      public Color getEditorBackgroundColor()
    • setEditorBackgroundColor

      public void setEditorBackgroundColor(Color editorBackgroundColor)
    • getGridlineColor

      public Color getGridlineColor()
    • getGridlineDashPattern

      public String getGridlineDashPattern()
    • getGridlineWidth

      public float getGridlineWidth()
    • isShowPopup

      public boolean isShowPopup()
    • setShowPopup

      public void setShowPopup(boolean showPopup)
    • setGridlineColor

      public void setGridlineColor(Color gridlineColor)
    • setGridlineDashPattern

      public void setGridlineDashPattern(String gridlineDashPattern)
    • setGridlineWidth

      public void setGridlineWidth(float gridlineWidth)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String string)
    • getTitleFont

      public Font getTitleFont()
    • setTitleFont

      public void setTitleFont(Font font)
    • setPropertiesLoading

      public void setPropertiesLoading(int i)
      Specified by:
      setPropertiesLoading in interface LoadingMonitor
    • histogramDataUpdated

      public void histogramDataUpdated()
    • getPropertiesLoading

      public int getPropertiesLoading()
      Specified by:
      getPropertiesLoading in interface LoadingMonitor
    • getAxes

      public Dataset getAxes()
    • setAxes

      public void setAxes(Dataset axes)
    • getPollRate

      public int getPollRate()
    • setPollRate

      public void setPollRate(int pollRate)
    • getGlobalWhereClause

      public String getGlobalWhereClause()
    • setGlobalWhereClause

      public void setGlobalWhereClause(String globalWhereClause)
    • getEndDate

      public Date getEndDate()
    • setEndDate

      public void setEndDate(Date endDate)
    • getStartDate

      public Date getStartDate()
    • getZoomedStartDate

      public Date getZoomedStartDate()
    • getZoomedEndDate

      public Date getZoomedEndDate()
    • setStartDate

      public void setStartDate(Date startDate)
    • getHistogramStartDate

      public Date getHistogramStartDate()
    • getHistogramEndDate

      public Date getHistogramEndDate()
    • isShowHistogram

      public boolean isShowHistogram()
    • setShowHistogram

      public void setShowHistogram(boolean showHistogram)
    • isShowWarnings

      public boolean isShowWarnings()
    • setShowWarnings

      public void setShowWarnings(boolean showWarnings)
    • isShowLoading

      public boolean isShowLoading()
    • setShowLoading

      public void setShowLoading(boolean showLoading)
    • getXAxisLabel

      public String getXAxisLabel()
    • getxAxisLabel

      public String getxAxisLabel()
    • setXAxisLabel

      public void setXAxisLabel(String axisLabel)
    • setxAxisLabel

      public void setxAxisLabel(String axisLabel)
    • isXAxisVisible

      public boolean isXAxisVisible()
    • isxAxisVisible

      public boolean isxAxisVisible()
    • setXAxisVisible

      public void setXAxisVisible(boolean xAxisVisible)
    • setxAxisVisible

      public void setxAxisVisible(boolean xAxisVisible)
    • getSubplots

      public Dataset getSubplots()
    • setSubplots

      public void setSubplots(Dataset subplots)
    • getAxisLabelFont

      public Font getAxisLabelFont()
    • setAxisLabelFont

      public void setAxisLabelFont(Font axisLabelFont)
    • getAxisTickLabelFont

      public Font getAxisTickLabelFont()
    • setAxisTickLabelFont

      public void setAxisTickLabelFont(Font axisTickLabelFont)
    • getPlotOutlineColor

      public Color getPlotOutlineColor()
    • setPlotOutlineColor

      public void setPlotOutlineColor(Color plotOutlineColor)
    • getDatapoints

      public int getDatapoints()
    • setDatapoints

      public void setDatapoints(int datapoints)
    • isAutoPositionAxes

      public boolean isAutoPositionAxes()
    • setAutoPositionAxes

      public void setAutoPositionAxes(boolean autoPositionAxes)
    • getAutoColorList

      public Color[] getAutoColorList()
    • setAutoColorList

      public void setAutoColorList(Color[] autoColorList)
    • isAutoColorPens

      public boolean isAutoColorPens()
    • setAutoColorPens

      public void setAutoColorPens(boolean autoColorPens)
    • isAntialias

      public boolean isAntialias()
    • setAntialias

      public void setAntialias(boolean ignored)
    • setFont

      public void setFont(Font font)
      Overrides:
      setFont in class JComponent
    • setForeground

      public void setForeground(Color fg)
      Overrides:
      setForeground in class JComponent
    • setBackground

      public void setBackground(Color fg)
      Overrides:
      setBackground in class JComponent
    • isPenGrouping

      public boolean isPenGrouping()
    • setPenGrouping

      public void setPenGrouping(boolean penGrouping)
    • isAlphabetizePens

      public boolean isAlphabetizePens()
    • setAlphabetizePens

      public void setAlphabetizePens(boolean alphabetizePens)
    • isAutoApply

      public boolean isAutoApply()
    • setAutoApply

      public void setAutoApply(boolean autoApply)
    • getEmptyGroupName

      public String getEmptyGroupName()
    • setEmptyGroupName

      public void setEmptyGroupName(String emptyGroupName)
    • getUnit

      public int getUnit()
    • setUnit

      public void setUnit(int unit)
    • getUnitCount

      public int getUnitCount()
    • setUnitCount

      public void setUnitCount(int unitCount)
    • getRtLabel

      public String getRtLabel()
    • setRtLabel

      public void setRtLabel(String text)
    • getHGap

      public int getHGap()
    • gethGap

      public int gethGap()
    • setHGap

      public void setHGap(int gap)
    • sethGap

      public void sethGap(int gap)
    • getVGap

      public int getVGap()
    • getvGap

      public int getvGap()
    • setVGap

      public void setVGap(int gap)
    • setvGap

      public void setvGap(int gap)
    • getSubplotGap

      public double getSubplotGap()
    • setSubplotGap

      public void setSubplotGap(double gap)
    • isCurrentlyMaximized

      public boolean isCurrentlyMaximized()
    • setCurrentlyMaximized

      public void setCurrentlyMaximized(boolean currentlyMaximized)
    • isShowMaximize

      public boolean isShowMaximize()
    • setShowMaximize

      public void setShowMaximize(boolean showMaximize)
    • isShowPrint

      public boolean isShowPrint()
    • setShowPrint

      public void setShowPrint(boolean showPrint)
    • isShowSave

      public boolean isShowSave()
    • setShowSave

      public void setShowSave(boolean showSave)
    • getUtilityButtonSize

      public int getUtilityButtonSize()
    • setUtilityButtonSize

      public void setUtilityButtonSize(int u)
    • getGroupWheres

      public Map<String,String> getGroupWheres()
    • setGroupWheres

      public void setGroupWheres(Map<String,String> groupWheres)
    • getProperties

      public DynamicPropertyDescriptor[] getProperties()
      Specified by:
      getProperties in interface DynamicPropertyProvider
    • getPropertyValue

      public Object getPropertyValue(String name)
      Specified by:
      getPropertyValue in interface DynamicPropertyProvider
    • setPropertyValue

      public void setPropertyValue(String name, Object value) throws ClassCastException
      Specified by:
      setPropertyValue in interface DynamicPropertyProvider
      Throws:
      ClassCastException
    • isPropertyDefined

      public boolean isPropertyDefined(String name)
      Specified by:
      isPropertyDefined in interface DynamicPropertyProvider
    • startupComponent

      public void startupComponent(VisionClientContext context)
      Description copied from interface: ComponentLifecycle
      Called when the component is first shown.
      Specified by:
      startupComponent in interface ComponentLifecycle
    • shutdownComponent

      public void shutdownComponent()
      Description copied from interface: ComponentLifecycle
      Called when the component is now shown anymore. Any long-running processes should be stopped. All bindings will have also been shutdown.
      Specified by:
      shutdownComponent in interface ComponentLifecycle
    • getAppContext

      public VisionClientContext getAppContext()
      Specified by:
      getAppContext in interface ComponentLifecycle
    • isXAxisAutoRange

      public boolean isXAxisAutoRange()
    • isxAxisAutoRange

      public boolean isxAxisAutoRange()
    • setXAxisAutoRange

      public void setXAxisAutoRange(boolean axisAutoRange)
    • setxAxisAutoRange

      public void setxAxisAutoRange(boolean axisAutoRange)
    • getXAxisMargin

      public double getXAxisMargin()
    • getxAxisMargin

      public double getxAxisMargin()
    • setXAxisMargin

      public void setXAxisMargin(double axisMargin)
    • setxAxisMargin

      public void setxAxisMargin(double axisMargin)
    • getXTraceNumberFormatThreshold

      public double getXTraceNumberFormatThreshold()
    • getxTraceNumberFormatThreshold

      public double getxTraceNumberFormatThreshold()
    • setXTraceNumberFormatThreshold

      public void setXTraceNumberFormatThreshold(double xTraceNumberFormatThreshold)
    • setxTraceNumberFormatThreshold

      public void setxTraceNumberFormatThreshold(double xTraceNumberFormatThreshold)
    • getXTraceLargeNumberFormat

      public String getXTraceLargeNumberFormat()
    • getxTraceLargeNumberFormat

      public String getxTraceLargeNumberFormat()
    • setXTraceLargeNumberFormat

      public void setXTraceLargeNumberFormat(String xTraceLargeNumberFormat)
    • setxTraceLargeNumberFormat

      public void setxTraceLargeNumberFormat(String xTraceLargeNumberFormat)
    • getXTraceSmallNumberFormat

      public String getXTraceSmallNumberFormat()
    • getxTraceSmallNumberFormat

      public String getxTraceSmallNumberFormat()
    • setXTraceSmallNumberFormat

      public void setXTraceSmallNumberFormat(String xTraceSmallNumberFormat)
    • setxTraceSmallNumberFormat

      public void setxTraceSmallNumberFormat(String xTraceSmallNumberFormat)
    • setXTraceTrackMouse

      public void setXTraceTrackMouse(Boolean value)
    • setxTraceTrackMouse

      public void setxTraceTrackMouse(Boolean value)
    • getXTraceTrackMouse

      public Boolean getXTraceTrackMouse()
    • getxTraceTrackMouse

      public Boolean getxTraceTrackMouse()
    • getQuality

      public QualityCode getQuality()
      Description copied from interface: QualityMonitor
      Retrieves the data quality code.
      Specified by:
      getQuality in interface QualityMonitor
    • getDataQuality

      public int getDataQuality()
      Description copied from interface: QualityMonitor
      For backwards compatibility with scripts. Would be awesome if this could just be a default method, but there's a bug (JDK-8071693) that makes that not work with property introspection.
      Specified by:
      getDataQuality in interface QualityMonitor
    • setDataQuality

      public void setDataQuality(int value)
      Specified by:
      setDataQuality in interface QualityMonitor
    • setQuality

      public void setQuality(QualityCode value)
      Description copied from interface: QualityMonitor
      Sets the current data quality to the given value
      Specified by:
      setQuality in interface QualityMonitor
    • updateQuality

      public void updateQuality(String propName, QualityCode quality)
      Description copied from interface: QualityMonitor
      Updates the quality for the given property name. The monitor will then evaluate a new quality based on the quality of its other properties. Overall, the worst quality is chosen.
      Specified by:
      updateQuality in interface QualityMonitor
    • paintChildren

      protected void paintChildren(Graphics g)
      Overrides:
      paintChildren in class JComponent
    • resetAxes

      public void resetAxes()
    • getExtensionFunctions

      public Map<String,ExtensionFunction> getExtensionFunctions()
      Specified by:
      getExtensionFunctions in interface ExtensibleComponent
    • setExtensionFunctions

      public void setExtensionFunctions(Map<String,ExtensionFunction> map)
      Specified by:
      setExtensionFunctions in interface ExtensibleComponent
    • onPowerTableDrop

      public void onPowerTableDrop(SelectedRows rows)