Class CategoryChart
- 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.CategoryChart
-
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
public class CategoryChart extends AbstractJ2DShape
This shape is used as the bar chart component for the reporting module. It renders using a JFreeChart pie plot.
-
-
Nested Class Summary
-
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 static java.lang.String
ARCHIVE_NAME
static org.jfree.chart.axis.CategoryLabelPositions[]
CATEGORY_LABEL_POSITIONS
static int
RENDER_BAR
static int
RENDER_LAYERED
static int
RENDER_STACKED
protected java.util.Map
reportData
-
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 Constructor Description CategoryChart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
fromXML(RXArchiver anArchiver, RXElement e)
XML unarchival.java.awt.Font
getAxisFont()
java.lang.String
getAxisFormat()
java.lang.String
getAxisLabel()
int
getCategoryLabelPosition()
double
getCategoryMargin()
java.awt.Color[]
getColors()
java.lang.String
getDatasetKey()
Returns the dataset key associated with this shape.int
getExtractOrder()
double
getItemMargin()
java.awt.Color
getLabelColor()
java.awt.Font
getLabelFont()
float
getLabelOffset()
java.awt.Font
getLegendFont()
double
getLowerBound()
java.awt.Color
getParetoColor()
java.lang.String
getParetoLabel()
java.lang.String
getScript()
int
getStyle()
double
getUpperBound()
boolean
isAutoRange()
boolean
isLabels()
boolean
isLegend()
boolean
isPareto()
boolean
isPareto80Pct()
boolean
isRender3d()
boolean
isScriptEnabled()
boolean
isVertical()
protected void
render(java.awt.Graphics2D g, int width, int height)
This is where implementations of AbstractJ2DShape actuall paint themselves to a graphics context.protected RMShape
rpgShape(ReportOwner owner, RMShape aParent)
Generate report with report owner.void
setAutoRange(boolean autoRange)
void
setAxisFont(java.awt.Font axisFont)
void
setAxisFormat(java.lang.String axisFormat)
void
setAxisLabel(java.lang.String axisLabel)
void
setCategoryLabelPosition(int categoryLabelPosition)
void
setCategoryMargin(double categoryMargin)
void
setColors(java.awt.Color[] colors)
void
setDatasetKey(java.lang.String key)
void
setExtractOrder(int extractOrder)
void
setItemMargin(double itemMargin)
void
setLabelColor(java.awt.Color labelColor)
void
setLabelFont(java.awt.Font labelFont)
void
setLabelOffset(float labelOffset)
void
setLabels(boolean labels)
void
setLegend(boolean legend)
void
setLegendFont(java.awt.Font legendFont)
void
setLowerBound(double lowerBound)
void
setPareto(boolean pareto)
void
setPareto80Pct(boolean pareto80Pct)
void
setParetoColor(java.awt.Color paretoColor)
void
setParetoLabel(java.lang.String paretoLabel)
void
setRender3d(boolean render3d)
void
setScript(java.lang.String script)
void
setScriptEnabled(boolean scriptEnabled)
void
setStyle(int style)
void
setUpperBound(double upperBound)
void
setVertical(boolean vertical)
RXElement
toXML(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
-
ARCHIVE_NAME
public static final java.lang.String ARCHIVE_NAME
- See Also:
- Constant Field Values
-
CATEGORY_LABEL_POSITIONS
public static final org.jfree.chart.axis.CategoryLabelPositions[] CATEGORY_LABEL_POSITIONS
-
RENDER_BAR
public static final int RENDER_BAR
- See Also:
- Constant Field Values
-
RENDER_STACKED
public static final int RENDER_STACKED
- See Also:
- Constant Field Values
-
RENDER_LAYERED
public static final int RENDER_LAYERED
- See Also:
- Constant Field Values
-
reportData
protected java.util.Map reportData
-
-
Method Detail
-
rpgShape
protected RMShape rpgShape(ReportOwner owner, RMShape aParent)
Description copied from class:RMShape
Generate report with report owner.
-
render
protected void render(java.awt.Graphics2D g, int width, int height)
Description copied from class:AbstractJ2DShape
This is where implementations of AbstractJ2DShape actuall paint themselves to a graphics context.- Specified by:
render
in classAbstractJ2DShape
-
getColors
public java.awt.Color[] getColors()
-
setColors
public void setColors(java.awt.Color[] colors)
-
getDatasetKey
public java.lang.String getDatasetKey()
Description copied from class:RMShape
Returns the dataset key associated with this shape.- Overrides:
getDatasetKey
in classRMShape
-
setDatasetKey
public void setDatasetKey(java.lang.String key)
-
getExtractOrder
public int getExtractOrder()
-
setExtractOrder
public void setExtractOrder(int extractOrder)
-
getStyle
public int getStyle()
-
setStyle
public void setStyle(int style)
-
getCategoryLabelPosition
public int getCategoryLabelPosition()
-
setCategoryLabelPosition
public void setCategoryLabelPosition(int categoryLabelPosition)
-
isRender3d
public boolean isRender3d()
-
setRender3d
public void setRender3d(boolean render3d)
-
isPareto
public boolean isPareto()
-
setPareto
public void setPareto(boolean pareto)
-
getParetoLabel
public java.lang.String getParetoLabel()
-
setParetoLabel
public void setParetoLabel(java.lang.String paretoLabel)
-
getParetoColor
public java.awt.Color getParetoColor()
-
setParetoColor
public void setParetoColor(java.awt.Color paretoColor)
-
isPareto80Pct
public boolean isPareto80Pct()
-
setPareto80Pct
public void setPareto80Pct(boolean pareto80Pct)
-
getAxisLabel
public java.lang.String getAxisLabel()
-
setAxisLabel
public void setAxisLabel(java.lang.String axisLabel)
-
getAxisFont
public java.awt.Font getAxisFont()
-
setAxisFont
public void setAxisFont(java.awt.Font axisFont)
-
getAxisFormat
public java.lang.String getAxisFormat()
-
setAxisFormat
public void setAxisFormat(java.lang.String axisFormat)
-
isAutoRange
public boolean isAutoRange()
-
setAutoRange
public void setAutoRange(boolean autoRange)
-
getLowerBound
public double getLowerBound()
-
setLowerBound
public void setLowerBound(double lowerBound)
-
getUpperBound
public double getUpperBound()
-
setUpperBound
public void setUpperBound(double upperBound)
-
isLegend
public boolean isLegend()
-
setLegend
public void setLegend(boolean legend)
-
getLegendFont
public java.awt.Font getLegendFont()
-
setLegendFont
public void setLegendFont(java.awt.Font legendFont)
-
getItemMargin
public double getItemMargin()
-
setItemMargin
public void setItemMargin(double itemMargin)
-
getCategoryMargin
public double getCategoryMargin()
-
setCategoryMargin
public void setCategoryMargin(double categoryMargin)
-
isVertical
public boolean isVertical()
-
setVertical
public void setVertical(boolean vertical)
-
isLabels
public boolean isLabels()
-
setLabels
public void setLabels(boolean labels)
-
getLabelFont
public java.awt.Font getLabelFont()
-
setLabelFont
public void setLabelFont(java.awt.Font labelFont)
-
getLabelColor
public java.awt.Color getLabelColor()
-
setLabelColor
public void setLabelColor(java.awt.Color labelColor)
-
getLabelOffset
public float getLabelOffset()
-
setLabelOffset
public void setLabelOffset(float labelOffset)
-
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:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMShape
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement e)
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMShape
-
-