Class RMGraph
- java.lang.Object
- 
- com.inductiveautomation.rm.base.RMListenerList
- 
- com.inductiveautomation.rm.base.RMObject
- 
- com.inductiveautomation.rm.shape.RMShape
- 
- com.inductiveautomation.rm.shape.RMParentShape
- 
- com.inductiveautomation.rm.graphing.RMGraph
 
 
 
 
 
- 
- All Implemented Interfaces:
- Archivable,- DeepChangeListener,- RMPropertyChanger,- RMTypes,- java.beans.PropertyChangeListener,- java.lang.Cloneable,- java.util.EventListener
 
 public class RMGraph extends RMParentShape The RMGraph class provides a template and the machinery for generating graphs. It primarily encapsulates a list key for defining the set of objects to graph and a keys string for defining the attributes of those objects to graph. For instance, the list key might be "Movies" and the keys string might be "revenue". You can programatically create a graph like this:RMGraph graph = new RMGraph(); graph.setBounds(0, 0, 640, 480); graph.setDatasetKey("Movies"); graph.setKeysString("revenue"); graph.setType(RMGraph.TYPE_PIE);
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classRMGraph.FontBoxReturns the part rect.static classRMGraph.ItemLayoutstatic classRMGraph.SectionLayoutstatic classRMGraph.Type- 
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypesRMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
 
- 
 - 
Field Summary- 
Fields inherited from class com.inductiveautomation.rm.shape.RMShapeBINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
 
- 
 - 
Constructor SummaryConstructors Constructor Description RMGraph()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddKey(java.lang.String aKey)Adds a key.voidclearKeys()Removes all keys.RMGraphclone()Standard clone implementation.RMShapecreateSampleGraph()Returns a graph area configured like this one showing sample data.RMShapefromXML(RXArchiver anArchiver, RXElement anElement)Legacy unarchival.protected voidfromXMLChildren(RXArchiver anArchiver, RXElement anElement)XML unarchival - override to suppress unarchival of children (don't really need this).protected voidfromXMLShape(RXArchiver anArchiver, RXElement anElement)XML unarchival.RMScene3Dget3D()Returns the 3d shape.RMGraphPartBarsgetBars()Returns the bars shape.RMColorgetColor(int anIndex)Returns the specific color at the given index.intgetColorCount()Returns the number of colors set for this graph.java.util.List<RMColor>getColors()Returns the list of colors to be used by this graph (or the default graph colors, if null).java.lang.StringgetDatasetKey()Returns the dataset key associated with the graph.static java.util.ListgetDefaultColors()Returns the default list of colors to be used by any graph without an explicit list of colors.booleangetDraw3D()Returns whether the graph draws in 3D.java.lang.StringgetFilterKey()Returns the optional key chain (expression) used to limit the table list derived from dataset key.RMGraph.FontBoxgetFontBox(int anIndex)Returns the font box for part at index.java.lang.StringgetGraphTypeString()Returns the graph type as a simple string: bar, pie or hbar.RMGroupinggetGrouping()Returns the graph grouping.RMGraph.ItemLayoutgetItemsLayout()Returns the layout of section items.java.lang.StringgetKey(int anIndex)Returns the specific key at the given index.intgetKeyCount()Returns the number of keys for this graph.RMGraphPartLabelAxisgetLabelAxis()Returns the label axis shape.RMGraphLegendgetLegend()Returns the child of the graph that represents the legend (if present).RMShapegetPart(int anIndex)Returns the individual part at index.intgetPartCount()Returns the number of graph parts.java.lang.StringgetPartName(int anIndex)Returns the individual part at index.RMShape[]getParts()Returns the parts.RMGraphPartPiegetPie()Returns the pie shape.static RMShapegetSampleGraph()RMGraph.SectionLayoutgetSectionLayout()Returns the layout of series values.RMGraphPartSeriesgetSeries(int anIndex)Returns the individual series object and the given index.intgetSeriesCount()Returns the number of series.booleangetShowLegend()Returns whether the graph shows a legend.RMGraph.TypegetType()Returns the graph type (TYPE_BAR, TYPE_PIE, etc.).RMGraphPartValueAxisgetValueAxis()Returns the value axis shape.booleanisAbreast()Returns whether section items layout is abreast.protected booleanisHittable(RMShape aChild)Override to suppress selection of children.booleanisLayered()Returns whether section items layout is layered.booleanisStacked()Returns whether section items layout is stacked.booleanisVertical()Returns whether graph area is considered vertical.protected voidlayoutChildren()Creates and adds new GraphArea.voidpaintShape(RMShapePainter aPntr)Override to suppress background paint.voidpaintShapeOver(RMShapePainter aPntr)Override to paint GraphArea parts.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)Overrides normal version to suppress child changes and propagate part changes.voidrelayout()Overrides to relayout legend too.voidremoveKey(int anIndex)Removes a key.voidrepaint()Overrides shape implementation to repaint parent too.RMParentShaperpgAll(ReportOwner anRptOwner, RMShape aParent)Set ReportMill (which tries to get a dataset from reportmill and calls setObjects).voidsetColors(java.util.List aColorList)Sets the list of colors to be used by this graph.voidsetDatasetKey(java.lang.String aKeyPath)Sets the dataset key associated with the graph.static voidsetDefaultColors(java.util.List aList)Sets the default list of colors to be used by any graph without an explicit list of colors.voidsetDraw3D(boolean aFlag)Sets whether the graph draws in 3D.voidsetFilterKey(java.lang.String aKeyExpr)Sets the optional key chain (expression) used to limit the table list derived from dataset key.voidsetGraphTypeString(java.lang.String aString)Sets the graph type as a simple string: bar, pie or hbar.voidsetItemsLayout(RMGraph.ItemLayout aLayout)Sets the layout of section items.voidsetSectionLayout(RMGraph.SectionLayout aLayout)Sets the layout of series values.voidsetShowLegend(boolean aFlag)Sets whether the graph shows a legend.voidsetType(RMGraph.Type aType)Sets the graph type (TYPE_BAR, TYPE_PIE, etc.).protected voidtoXMLChildren(RXArchiver anArchiver, RXElement anElement)XML archival - override shape implementation to suppress archival of children.protected RXElementtoXMLShape(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.inductiveautomation.rm.shape.RMParentShapeaddChild, addChild, addChild, addChild, addLayoutChild, bringShapesToFront, cloneDeep, computePrefHeight, computePrefWidth, divideShapeFromTop, getBoundsOfChildren, getChild, getChildArray, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWithClass, getChildrenWithClass, getChildWithClass, getChildWithName, getLayout, getNeedsLayout, getSourceURL, indexOfChild, isShowing, isSourceURLSet, layout, removeChild, removeChild, removeChildren, removeLayoutChild, rpgChildren, sendShapesToBack, setHeight, setLayout, setNeedsLayout, setSourceURL, setWidth, toXML
 - 
Methods inherited from class com.inductiveautomation.rm.shape.RMShapeacceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChildAnimator, getChildAnimator, getChildClipShape, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDisplayedFill, 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, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, resolvePageReferences, rpgBindings, rpgShape, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, 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, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getDatasetKeypublic java.lang.String getDatasetKey() Returns the dataset key associated with the graph.- Overrides:
- getDatasetKeyin class- RMShape
 
 - 
setDatasetKeypublic void setDatasetKey(java.lang.String aKeyPath) Sets the dataset key associated with the graph.
 - 
getFilterKeypublic java.lang.String getFilterKey() Returns the optional key chain (expression) used to limit the table list derived from dataset key.
 - 
setFilterKeypublic void setFilterKey(java.lang.String aKeyExpr) Sets the optional key chain (expression) used to limit the table list derived from dataset key.
 - 
getKeyCountpublic int getKeyCount() Returns the number of keys for this graph.
 - 
getKeypublic java.lang.String getKey(int anIndex) Returns the specific key at the given index.
 - 
addKeypublic void addKey(java.lang.String aKey) Adds a key.
 - 
removeKeypublic void removeKey(int anIndex) Removes a key.
 - 
clearKeyspublic void clearKeys() Removes all keys.
 - 
getTypepublic RMGraph.Type getType() Returns the graph type (TYPE_BAR, TYPE_PIE, etc.).
 - 
setTypepublic void setType(RMGraph.Type aType) Sets the graph type (TYPE_BAR, TYPE_PIE, etc.).
 - 
getGraphTypeStringpublic java.lang.String getGraphTypeString() Returns the graph type as a simple string: bar, pie or hbar.
 - 
setGraphTypeStringpublic void setGraphTypeString(java.lang.String aString) Sets the graph type as a simple string: bar, pie or hbar.
 - 
getGroupingpublic RMGrouping getGrouping() Returns the graph grouping.
 - 
getSectionLayoutpublic RMGraph.SectionLayout getSectionLayout() Returns the layout of series values.
 - 
setSectionLayoutpublic void setSectionLayout(RMGraph.SectionLayout aLayout) Sets the layout of series values.
 - 
getItemsLayoutpublic RMGraph.ItemLayout getItemsLayout() Returns the layout of section items.
 - 
setItemsLayoutpublic void setItemsLayout(RMGraph.ItemLayout aLayout) Sets the layout of section items.
 - 
isVerticalpublic boolean isVertical() Returns whether graph area is considered vertical.
 - 
isAbreastpublic boolean isAbreast() Returns whether section items layout is abreast.
 - 
isStackedpublic boolean isStacked() Returns whether section items layout is stacked.
 - 
isLayeredpublic boolean isLayered() Returns whether section items layout is layered.
 - 
repaintpublic void repaint() Overrides shape implementation to repaint parent too.
 - 
relayoutpublic void relayout() Overrides to relayout legend too.- Overrides:
- relayoutin class- RMParentShape
 
 - 
getValueAxispublic RMGraphPartValueAxis getValueAxis() Returns the value axis shape.
 - 
getLabelAxispublic RMGraphPartLabelAxis getLabelAxis() Returns the label axis shape.
 - 
getBarspublic RMGraphPartBars getBars() Returns the bars shape.
 - 
getPiepublic RMGraphPartPie getPie() Returns the pie shape.
 - 
getSeriesCountpublic int getSeriesCount() Returns the number of series.
 - 
getSeriespublic RMGraphPartSeries getSeries(int anIndex) Returns the individual series object and the given index.
 - 
get3Dpublic RMScene3D get3D() Returns the 3d shape.
 - 
getDraw3Dpublic boolean getDraw3D() Returns whether the graph draws in 3D.
 - 
setDraw3Dpublic void setDraw3D(boolean aFlag) Sets whether the graph draws in 3D.
 - 
getLegendpublic RMGraphLegend getLegend() Returns the child of the graph that represents the legend (if present).
 - 
getShowLegendpublic boolean getShowLegend() Returns whether the graph shows a legend.
 - 
setShowLegendpublic void setShowLegend(boolean aFlag) Sets whether the graph shows a legend.
 - 
getColorCountpublic int getColorCount() Returns the number of colors set for this graph.
 - 
getColorpublic RMColor getColor(int anIndex) Returns the specific color at the given index. Automatically wraps if index exceeds color count.
 - 
getColorspublic java.util.List<RMColor> getColors() Returns the list of colors to be used by this graph (or the default graph colors, if null).
 - 
setColorspublic void setColors(java.util.List aColorList) Sets the list of colors to be used by this graph.
 - 
getDefaultColorspublic static java.util.List getDefaultColors() Returns the default list of colors to be used by any graph without an explicit list of colors.
 - 
setDefaultColorspublic static void setDefaultColors(java.util.List aList) Sets the default list of colors to be used by any graph without an explicit list of colors.
 - 
layoutChildrenprotected void layoutChildren() Creates and adds new GraphArea.- Overrides:
- layoutChildrenin class- RMParentShape
 
 - 
isHittableprotected boolean isHittable(RMShape aChild) Override to suppress selection of children.- Overrides:
- isHittablein class- RMParentShape
 
 - 
createSampleGraphpublic RMShape createSampleGraph() Returns a graph area configured like this one showing sample data.
 - 
getSampleGraphpublic static RMShape getSampleGraph() 
 - 
propertyChangepublic void propertyChange(java.beans.PropertyChangeEvent anEvent) Overrides normal version to suppress child changes and propagate part changes.- Specified by:
- propertyChangein interface- java.beans.PropertyChangeListener
- Overrides:
- propertyChangein class- RMShape
 
 - 
rpgAllpublic RMParentShape rpgAll(ReportOwner anRptOwner, RMShape aParent) Set ReportMill (which tries to get a dataset from reportmill and calls setObjects).- Overrides:
- rpgAllin class- RMParentShape
 
 - 
paintShapepublic void paintShape(RMShapePainter aPntr) Override to suppress background paint.- Overrides:
- paintShapein class- RMShape
 
 - 
paintShapeOverpublic void paintShapeOver(RMShapePainter aPntr) Override to paint GraphArea parts.- Overrides:
- paintShapeOverin class- RMShape
 
 - 
getPartCountpublic int getPartCount() Returns the number of graph parts.
 - 
getPartpublic RMShape getPart(int anIndex) Returns the individual part at index.
 - 
getPartNamepublic java.lang.String getPartName(int anIndex) Returns the individual part at index.
 - 
getPartspublic RMShape[] getParts() Returns the parts.
 - 
getFontBoxpublic RMGraph.FontBox getFontBox(int anIndex) Returns the font box for part at index.
 - 
clonepublic RMGraph clone() Standard clone implementation.- Overrides:
- clonein class- RMParentShape
 
 - 
toXMLShapeprotected RXElement toXMLShape(RXArchiver anArchiver) XML archival.- Overrides:
- toXMLShapein class- RMParentShape
 
 - 
fromXMLShapeprotected void fromXMLShape(RXArchiver anArchiver, RXElement anElement) XML unarchival.- Overrides:
- fromXMLShapein class- RMParentShape
 
 - 
toXMLChildrenprotected void toXMLChildren(RXArchiver anArchiver, RXElement anElement) XML archival - override shape implementation to suppress archival of children.- Overrides:
- toXMLChildrenin class- RMParentShape
 
 - 
fromXMLChildrenprotected void fromXMLChildren(RXArchiver anArchiver, RXElement anElement) XML unarchival - override to suppress unarchival of children (don't really need this).- Overrides:
- fromXMLChildrenin class- RMParentShape
 
 - 
fromXMLpublic RMShape fromXML(RXArchiver anArchiver, RXElement anElement) Legacy unarchival.- Specified by:
- fromXMLin interface- Archivable
- Overrides:
- fromXMLin class- RMParentShape
 
 
- 
 
-