public class LineGraph extends RMShape implements RMShapePainter.Paint, Java2DShapePainter
RMGraph graph = new RMGraph(); graph.setBounds(0, 0, 640, 480); graph.setListKey("Movies"); graph.setKeysString("revenue"); graph.setType(RMGraph.TYPE_PIE);
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TYPE_AREA |
static java.lang.String |
TYPE_LINE |
static java.lang.String |
TYPE_SCATTER |
static java.lang.String[] |
TYPES |
WRAP_TYPE_BOTH, WRAP_TYPE_NONE
Constructor and Description |
---|
LineGraph()
Creates a plain graph shape.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsFormat()
RMEditor method (indicates that graphs have settable format).
|
void |
basePaint(java.awt.Graphics2D g,
java.awt.geom.Rectangle2D rect) |
void |
buildChart() |
void |
copy(java.lang.Object anObj)
Copies the attributes from the given object into receiver (for undo).
|
java.util.Date |
dateValueForKeyChain(java.lang.Object anObj,
java.lang.Object aKey)
Returns a date value for the given object and key (automatically handles "swapped" case).
|
double |
doubleValueForKeyChain(java.lang.Object anObj,
java.lang.Object aKey)
Returns a double value for the given object and key (automatically handles "swapped" case).
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
java.lang.Object |
fromXML(RXArchiver anArchiver,
RXElement anElement)
XML unarchival.
|
java.lang.String |
getAxisMinMaxCount()
Returns the value axis' min, max and number of increments as a single string.
|
RMColor |
getColor(int anIndex)
Returns the specific color at the given index.
|
int |
getColorCount()
Returns the number of colors set for this graph.
|
java.util.List |
getColors()
Returns the list of colors to be used by this graph (or the default graph colors, if null).
|
static java.util.List |
getDefaultColors()
Returns the default list of colors to be used by any graph without an explicit list of colors.
|
boolean |
getDraw3D()
Returns whether the graph draws in 3D.
|
java.lang.String |
getFilterKey()
Returns the optional key chain (expression) used to limit the table list derived from list key.
|
RMFont |
getFont()
Returns the font associated with the graph.
|
RMFormat |
getFormat()
Returns the format associated with the value axis of the graph.
|
java.lang.String |
getGraphTypeString()
Returns the graph type as a simple string: bar, pie or hbar.
|
java.util.List |
getGroups()
Returns the keys to be graphed (unless swapped, in which case it returns the objects).
|
java.util.List |
getKeys()
Returns a list of the individual keys in the (potentialy) comma separated keys string.
|
java.lang.String |
getKeysString()
Returns keys string - a comma separated list of keys evaluated on list key objects to represent in graph.
|
java.lang.String |
getListKey()
Returns the list key associated with the graph.
|
java.util.List |
getSeries()
Returns the objects to be graphed (unless swapped, in which case it returns the keys).
|
boolean |
getShowLegend()
Returns whether the graph shows a legend.
|
RMSort |
getSort(int anIdex)
Returns the individual RMSort at the given index.
|
int |
getSortCount()
Returns the number of sorts associated with this graph.
|
java.util.List |
getSorts()
Returns the list of sorts associated with the graph.
|
boolean |
getSwapSeries()
Returns whether the graph groups bars by keys (normal) or by objects (swapped).
|
java.lang.String |
getToolClassName()
Editor method - returns the tool class name for this shape.
|
java.lang.String |
getType()
Returns the graph type (TYPE_LINE, TYPE_AREA, etc.).
|
java.lang.String |
getXAxisLabel() |
java.lang.String |
getYAxisLabel() |
boolean |
isShowXAxis() |
boolean |
isShowYAxis() |
boolean |
isTimeseries() |
void |
paintShape(RMShapePainter aPainter,
java.awt.Graphics2D g) |
RMShape |
rpgClone(ReportMill aReportMill)
Returns a clone of this shape with report generation.
|
void |
setAxisMinMaxCount(java.lang.String aValue)
Sets the value axis' min, max and number of increments as a single string.
|
void |
setColors(java.util.List aList)
Sets the list of colors to be used by this graph.
|
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.
|
void |
setDraw3D(boolean aFlag)
Sets whether the graph draws in 3D.
|
void |
setFilterKey(java.lang.String aKeyExpr)
Returns the optional key chain (expression) used to limit the table list derived from list key.
|
void |
setFont(RMFont aFont)
Sets the font associated with the graph.
|
void |
setFormat(RMFormat f)
Sets the format associated with the value axis of the graph.
|
void |
setGraphTypeString(java.lang.String aString)
Sets the graph type as a simple string: bar, pie or hbar.
|
void |
setKeysString(java.lang.String aString)
Sets keys string - a comma separated list of keys evaluated on list key objects to represent in graph.
|
void |
setListKey(java.lang.String aKeyPath)
Sets the list key associated with the graph.
|
void |
setShowLegend(boolean aFlag)
Sets whether the graph shows a legend.
|
void |
setShowXAxis(boolean axis) |
void |
setShowYAxis(boolean axis) |
void |
setSwapSeries(boolean aFlag)
Sets whether the graph groups bars by keys (normal) or by objects (swapped).
|
void |
setTimeseries(boolean _timeseries) |
void |
setType(java.lang.String aType)
Sets the graph type (TYPE_LINE, TYPE_AREA, etc.).
|
void |
setXAxisLabel(java.lang.String axisLabel) |
void |
setYAxisLabel(java.lang.String axisLabel) |
RXElement |
toXML(RXArchiver anArchiver)
XML archival.
|
acceptsChildren, acceptsDragKeys, acceptsMouse, addChild, addChild, addChildBelowLastChild, bounds, boundsChanged, boundsChanged, bringShapesToFront, canBeUngrouped, childrenSuperSelectImmediately, clone, cloneDeep, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, delete, didChange, divideShapeFromEdge, divideShapeFromTop, dragExit, dragKeyAtPoint, dropKeyAtPoint, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getAutosizing, getBounds, getBoundsInside, getBoundsMarked, getBoundsOfChildren, getBoundsOfChildren, getBoundsSuperSelected, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildAnimator, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWhoDraw, getChildrenWhoHitTest, getChildSortedByX, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getDocument, getFill, getFill, getFill, getFillCount, getFills, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getGroupShape, getHeight, getHeightToFit, getImageFill, getLineWidth, getListKeyDeep, getListKeyShape, getMaxX, getMaxY, getName, getOpacity, getOpacityDeep, getOutline, getPageCount, getPageShape, getParent, getParentCount, getParents, getPath, getPathInBounds, getPropertyKey, getPropertyKeyCount, getPropertyKeyName, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getWidth, getWidthToFit, getX, getXY, getXYP, getY, groupShapes, hasPageBreaks, height, indexOf, indexOf, initWithArchiver, intersects, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, notRSS, offsetChildrenXY, offsetXY, page, pageBreakMax, pageBreakPageMax, pageMax, put, putPropertyKey, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, setActionScript, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setCausesWrapType, setChildren, setColor, setFill, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setLocked, setName, setNeedsRepaint, setNeedsRepaint, setOpacity, setOutline, setParent, setRoll, setScaleX, setScaleXY, setScaleY, setSize, setSize, setSizeDeep, setSizeP, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setWidth, setWidthDeep, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYP, setY, sizesToFitChildren, superSelectable, toString, undoClone, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, willChange, x, y
didUndo, getAnimAttribute, getClassNameShort
public static final java.lang.String TYPE_LINE
public static final java.lang.String TYPE_AREA
public static final java.lang.String TYPE_SCATTER
public static final java.lang.String[] TYPES
public void buildChart()
public java.lang.String getListKey()
getListKey
in class RMShape
public void setListKey(java.lang.String aKeyPath)
setListKey
in class RMShape
public java.lang.String getFilterKey()
public void setFilterKey(java.lang.String aKeyExpr)
public java.lang.String getKeysString()
public void setKeysString(java.lang.String aString)
public java.util.List getKeys()
public java.lang.String getType()
public void setType(java.lang.String aType)
public java.lang.String getGraphTypeString()
public void setGraphTypeString(java.lang.String aString)
public int getSortCount()
public RMSort getSort(int anIdex)
public java.util.List getSorts()
public boolean getDraw3D()
public void setDraw3D(boolean aFlag)
public boolean getSwapSeries()
public void setSwapSeries(boolean aFlag)
public java.lang.String getAxisMinMaxCount()
public void setAxisMinMaxCount(java.lang.String aValue)
public boolean getShowLegend()
public void setShowLegend(boolean aFlag)
public int getColorCount()
public RMColor getColor(int anIndex)
public java.util.List getColors()
public void setColors(java.util.List aList)
public static java.util.List getDefaultColors()
public static void setDefaultColors(java.util.List aList)
public RMFont getFont()
public void setFont(RMFont aFont)
public RMFormat getFormat()
public void setFormat(RMFormat f)
public boolean acceptsFormat()
acceptsFormat
in class RMShape
public boolean equals(java.lang.Object anObj)
public void copy(java.lang.Object anObj)
public RXElement toXML(RXArchiver anArchiver)
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
public void paintShape(RMShapePainter aPainter, java.awt.Graphics2D g)
paintShape
in interface RMShapePainter.Paint
public void basePaint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D rect)
basePaint
in interface Java2DShapePainter
public RMShape rpgClone(ReportMill aReportMill)
public java.util.List getGroups()
public java.util.List getSeries()
public double doubleValueForKeyChain(java.lang.Object anObj, java.lang.Object aKey)
public java.util.Date dateValueForKeyChain(java.lang.Object anObj, java.lang.Object aKey)
public java.lang.String getToolClassName()
RMShape
getToolClassName
in class RMShape
public boolean isShowXAxis()
public void setShowXAxis(boolean axis)
public boolean isShowYAxis()
public void setShowYAxis(boolean axis)
public boolean isTimeseries()
public void setTimeseries(boolean _timeseries)
public java.lang.String getXAxisLabel()
public void setXAxisLabel(java.lang.String axisLabel)
public java.lang.String getYAxisLabel()
public void setYAxisLabel(java.lang.String axisLabel)