Class AbstractXYChart
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.shape.RMShape
-
- com.inductiveautomation.rm.shape.j2dshapes.AbstractJ2DShape
-
- com.inductiveautomation.rm.shape.j2dshapes.AbstractXYChart
-
- All Implemented Interfaces:
Archivable,DeepChangeListener,RMPropertyChanger,RMTypes,RMShapeSelfInit,java.beans.PropertyChangeListener,java.lang.Cloneable,java.util.EventListener
- Direct Known Subclasses:
TimeseriesChart,XYChart
public abstract class AbstractXYChart extends AbstractJ2DShape implements RMShapeSelfInit
Created by carl.gould on 7/14/2015.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractXYChart.RenderOptsImpl-
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<ArchivableAxis>axesprotected java.awt.FontaxisLabelFontprotected java.awt.FontaxisTickLabelFontprotected doublebarWidthprotected java.lang.StringdatasetKeyprotected java.lang.StringdomainKeyprotected doublegapThresholdprotected booleanlegendprotected java.lang.StringnoDataMessageprotected java.util.List<Pen>pensprotected java.awt.ColorplotBackgroundprotected java.util.MapreportDataprotected booleanrpgprotected java.util.ListrpgParentDataprotected com.google.common.cache.LoadingCache<java.util.List<Pen>,org.jfree.data.xy.XYDataset>sampleDataCacheprotected java.lang.Stringscriptprotected booleanscriptEnabledprotected booleanshowXAxisprotected java.lang.StringxAxisLabel-
Fields inherited from class com.inductiveautomation.rm.shape.j2dshapes.AbstractJ2DShape
DEFAULT_COLORS, dirty, DPI300, DPI72, log, RasterDPI
-
Fields inherited from class com.inductiveautomation.rm.shape.RMShape
BINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractXYChart(java.lang.String serializationKey)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.jfree.chart.axis.ValueAxiscreateDomainAxis()protected abstract com.google.common.cache.CacheLoader<java.util.List<Pen>,org.jfree.data.xy.XYDataset>createSampleDataCache()java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement e)XML unarchival.java.util.List<ArchivableAxis>getAxes()java.awt.FontgetAxisLabelFont()java.awt.FontgetAxisTickLabelFont()doublegetBarWidth()java.lang.StringgetDatasetKey()Returns the dataset key associated with this shape.java.lang.StringgetDomainKey()doublegetGapThreshold()java.lang.StringgetNoDataMessage()java.util.List<Pen>getPens()java.awt.ColorgetPlotBackground()java.lang.StringgetScript()java.lang.StringgetXAxisLabel()booleanisLegend()booleanisScriptEnabled()booleanisShowXAxis()protected voidrender(java.awt.Graphics2D g, int width, int height)This is where implementations of AbstractJ2DShape actuall paint themselves to a graphics context.protected RMShaperpgShape(ReportOwner owner, RMShape aParent)Generate report with report owner.voidselfInit()voidsetAxes(java.util.List<ArchivableAxis> axes)voidsetAxisLabelFont(java.awt.Font axisLabelFont)voidsetAxisTickLabelFont(java.awt.Font axisTickLabelFont)voidsetBarWidth(double barWidth)voidsetDatasetKey(java.lang.String key)voidsetDomainKey(java.lang.String domainKey)voidsetGapThreshold(double gapThreshold)voidsetLegend(boolean legend)voidsetNoDataMessage(java.lang.String noDataMessage)voidsetPens(java.util.List<Pen> pens)voidsetPlotBackground(java.awt.Color plotBackground)voidsetScript(java.lang.String script)voidsetScriptEnabled(boolean scriptEnabled)voidsetShowXAxis(boolean showXAxis)voidsetXAxisLabel(java.lang.String xAxisLabel)RXElementtoXML(RXArchiver anArchiver)XML archival.-
Methods inherited from class com.inductiveautomation.rm.shape.j2dshapes.AbstractJ2DShape
getDefaultColorCodes, getDefaultColors, getDisplayedFill, paintShape, setDirty
-
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, clone, cloneDeep, computePrefHeight, computePrefWidth, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, divideShapeFromTop, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChild, getChildAnimator, getChildAnimator, getChildClipShape, getChildCount, getChildren, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDisplayedStroke, getDocument, getEffect, getEventAdapter, getFill, getFont, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPath, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEditing, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgAll, rpgBindings, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setWidth, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Field Detail
-
rpg
protected boolean rpg
-
rpgParentData
protected java.util.List rpgParentData
-
pens
protected java.util.List<Pen> pens
-
axes
protected java.util.List<ArchivableAxis> axes
-
datasetKey
protected java.lang.String datasetKey
-
domainKey
protected java.lang.String domainKey
-
axisLabelFont
protected java.awt.Font axisLabelFont
-
axisTickLabelFont
protected java.awt.Font axisTickLabelFont
-
plotBackground
protected java.awt.Color plotBackground
-
noDataMessage
protected java.lang.String noDataMessage
-
legend
protected boolean legend
-
showXAxis
protected boolean showXAxis
-
xAxisLabel
protected java.lang.String xAxisLabel
-
scriptEnabled
protected boolean scriptEnabled
-
script
protected java.lang.String script
-
barWidth
protected double barWidth
-
gapThreshold
protected double gapThreshold
-
reportData
protected java.util.Map reportData
-
sampleDataCache
protected final com.google.common.cache.LoadingCache<java.util.List<Pen>,org.jfree.data.xy.XYDataset> sampleDataCache
-
-
Method Detail
-
selfInit
public void selfInit()
- Specified by:
selfInitin interfaceRMShapeSelfInit
-
rpgShape
protected RMShape rpgShape(ReportOwner owner, RMShape aParent)
Description copied from class:RMShapeGenerate report with report owner.
-
createSampleDataCache
protected abstract com.google.common.cache.CacheLoader<java.util.List<Pen>,org.jfree.data.xy.XYDataset> createSampleDataCache()
-
createDomainAxis
protected abstract org.jfree.chart.axis.ValueAxis createDomainAxis()
-
render
protected void render(java.awt.Graphics2D g, int width, int height)Description copied from class:AbstractJ2DShapeThis is where implementations of AbstractJ2DShape actuall paint themselves to a graphics context.- Specified by:
renderin classAbstractJ2DShape
-
getPens
public java.util.List<Pen> getPens()
-
setPens
public void setPens(java.util.List<Pen> pens)
-
getAxes
public java.util.List<ArchivableAxis> getAxes()
-
setAxes
public void setAxes(java.util.List<ArchivableAxis> axes)
-
getDatasetKey
public java.lang.String getDatasetKey()
Description copied from class:RMShapeReturns the dataset key associated with this shape.- Overrides:
getDatasetKeyin classRMShape
-
setDatasetKey
public void setDatasetKey(java.lang.String key)
-
getAxisLabelFont
public java.awt.Font getAxisLabelFont()
-
setAxisLabelFont
public void setAxisLabelFont(java.awt.Font axisLabelFont)
-
getAxisTickLabelFont
public java.awt.Font getAxisTickLabelFont()
-
setAxisTickLabelFont
public void setAxisTickLabelFont(java.awt.Font axisTickLabelFont)
-
getBarWidth
public double getBarWidth()
-
setBarWidth
public void setBarWidth(double barWidth)
-
getDomainKey
public java.lang.String getDomainKey()
-
setDomainKey
public void setDomainKey(java.lang.String domainKey)
-
getNoDataMessage
public java.lang.String getNoDataMessage()
-
setNoDataMessage
public void setNoDataMessage(java.lang.String noDataMessage)
-
getPlotBackground
public java.awt.Color getPlotBackground()
-
setPlotBackground
public void setPlotBackground(java.awt.Color plotBackground)
-
isLegend
public boolean isLegend()
-
setLegend
public void setLegend(boolean legend)
-
isShowXAxis
public boolean isShowXAxis()
-
setShowXAxis
public void setShowXAxis(boolean showXAxis)
-
getXAxisLabel
public java.lang.String getXAxisLabel()
-
setXAxisLabel
public void setXAxisLabel(java.lang.String xAxisLabel)
-
getGapThreshold
public double getGapThreshold()
-
setGapThreshold
public void setGapThreshold(double gapThreshold)
-
setScriptEnabled
public void setScriptEnabled(boolean scriptEnabled)
-
isScriptEnabled
public boolean isScriptEnabled()
-
getScript
public java.lang.String getScript()
-
setScript
public void setScript(java.lang.String script)
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.- Specified by:
toXMLin interfaceArchivable- Overrides:
toXMLin classRMShape
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement e)
XML unarchival.- Specified by:
fromXMLin interfaceArchivable- Overrides:
fromXMLin classRMShape
-
-